Actions21
Overview
This node integrates with the Square API to manage customer data. Specifically, the Customer - Update operation allows you to update details of an existing customer in your Square account. This is useful for keeping customer records current, such as changing contact information, updating addresses, or adding notes.
Common scenarios include:
- Updating a customer's email or phone number after they provide new contact info.
- Modifying address details when a customer moves.
- Adding or changing notes related to customer preferences or history.
- Correcting or adding missing personal information like birthday or company name.
Example: You receive updated customer information from a form submission and want to sync it with your Square customer database automatically.
Properties
| Name | Meaning |
|---|---|
| Customer ID | The unique identifier of the customer to update. This is required to specify which customer record will be modified. |
| Update Fields | A collection of fields that can be updated for the customer. These include: - Address (with subfields: Address Line 1, Address Line 2, City, State, Postal Code, Country [ISO 3166-1 alpha-2 code]) - Birthday (YYYY-MM-DD or MM-DD format) - Company Name - Email Address - Family Name - Given Name - Nickname - Note - Phone Number - Reference ID |
Output
The output is a JSON object representing the updated customer data returned by the Square API. It typically includes all customer properties after the update, such as:
id: Customer's unique IDgiven_name,family_name,nicknameemail_addressphone_numberbirthdaycompany_namenotereference_idaddressobject with detailed address fields
If the update fails, the output may contain an error message describing the issue.
No binary data is produced by this operation.
Dependencies
- Requires a valid API key credential for Square with permissions to update customers.
- The node uses the Square API endpoint
/customers/{customerId}with HTTP PUT method. - The base URL depends on the environment (sandbox or production), configured via credentials.
- No additional external dependencies beyond the Square API and n8n core modules.
Troubleshooting
Error: "Please enter at least one field to update for the customer"
This occurs if no update fields are provided. Ensure you specify at least one property to change.API errors related to invalid Customer ID
Verify that the Customer ID exists and is correctly formatted.Authentication errors
Check that the API key credential is valid and has sufficient permissions.Invalid address or country code
Make sure the country code follows ISO 3166-1 alpha-2 format and address fields are properly filled.Handling continue on fail
If enabled, errors for individual items will be returned as part of the output instead of stopping execution.