Pennylane icon

Pennylane

n8n community node for Pennylane External API v2 - Complete & Working

Actions69

👤 Customer → Create

AI-generated

Summary

Creates a new customer (company or individual) via the Pennylane API.

Inputs

  • customerType (required) — Type of customer (company or individual). Mandatory; determines which optional fields appear and the API endpoint used (/customers/companies vs /customers/individuals).
  • customerName (required) — Customer name (company name or individual full name). Required payload field sent to the API.
  • customerEmail (required) — Customer email address. Required payload field; validated via regex pattern for standard email format.
  • customerPhone — Customer phone number (optional). Included in the API request only if non-empty after trimming whitespace.
  • customerAddress — Customer address (optional). Included in the API request only if non-empty after trimming whitespace.
  • customerSiret — Company SIRET number (optional). Shown exclusively when customerType is company; included only if non-empty.
  • customerVatNumber — Company VAT number (optional). Shown exclusively when customerType is company; included only if non-empty.
  • customerFirstName — Individual first name (optional). Shown exclusively when customerType is individual; included only if non-empty.
  • customerLastName — Individual last name (optional). Shown exclusively when customerType is individual; included only if non-empty.

Output shape

The raw JSON response from the Pennylane API, delivered as a single n8n item. No auto-splitting occurs, as this is a CREATE operation (not GET ALL).

Empty or whitespace-only optional fields are omitted from the request body. The API endpoint is POST /customers/companies when customerType is company, otherwise POST /customers/individuals. Credentials requiring apiToken and companyId must be configured.

Examples

Example 1: Create a company customer with SIRET and VAT number.

Set customerType to 'company', provide customerName and customerEmail, optionally fill customerSiret and customerVatNumber. The node sends a POST to /customers/companies with body { name, email, siret, vat_number } (omitting empty fields).

Example 2: Create an individual customer with first and last name.

Set customerType to 'individual', provide customerName, customerEmail, and optionally customerFirstName and customerLastName. The node sends a POST to /customers/individuals with body { name, email, first_name, last_name } (omitting empty fields).

Links

Discussion