Actions12
Overview
This node integrates with the Square API to manage customer data. Specifically, the "Customer - Create" operation allows users to create a new customer record in their Square account by providing essential details such as the customer's given name and optional additional information like address, birthday, company name, email, phone number, and notes.
Common scenarios where this node is beneficial include:
- Automating customer onboarding processes by adding new customers from form submissions or CRM systems.
- Synchronizing customer data between different platforms and Square.
- Creating customer profiles programmatically during sales or marketing workflows.
For example, when a new user signs up on a website, this node can be used to automatically create a corresponding customer profile in Square with their name, contact details, and other relevant information.
Properties
| Name | Meaning |
|---|---|
| Given Name | The first name of the customer. |
| Additional Fields | Optional extra information about the customer. This includes: - Address: Detailed address fields including Address Line 1, Address Line 2, City, State, Postal Code, and Country (two-letter ISO code). - Birthday: Customer's birthday in YYYY-MM-DD or MM-DD format. - Company Name: The company the customer is associated with. - Email Address: Customer's email. - Family Name: Last name of the customer. - Nickname: A nickname for the customer. - Note: Any note about the customer. - Phone Number: Customer's phone number. - Reference ID: An external reference ID for the customer. |
Output
The node outputs JSON data representing the newly created customer object as returned by the Square API. This typically includes all the customer details that were sent, along with additional metadata such as the unique customer ID assigned by Square, timestamps, and any other relevant response fields.
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to the Square API via an API key credential configured in n8n.
- The node dynamically selects the Square API base URL depending on whether the environment is set to sandbox or production.
- Proper permissions on the Square API key are necessary to create customers.
Troubleshooting
- Missing Required Fields: If the "Given Name" is not provided, the API may reject the request. Ensure mandatory fields are filled.
- Invalid Address Format: The country field must be a valid two-letter ISO 3166-1 alpha-2 code; otherwise, the API might return an error.
- API Authentication Errors: If the API key is invalid or missing, requests will fail with authentication errors. Verify credentials in n8n settings.
- Rate Limits: Frequent calls to the Square API may hit rate limits; handle such errors by implementing retries or delays.
- Empty Additional Fields: While optional, if additional fields are provided, ensure they conform to expected formats to avoid validation errors.
If the node encounters an error during execution and "Continue On Fail" is enabled, it will output the error message in the JSON output for that item instead of stopping the workflow.