Actions12
Overview
This node integrates with the Square API to manage customer data. Specifically, for the "Customer" resource and "Delete" operation, it deletes a customer record identified by a given Customer ID. This is useful in scenarios where you need to programmatically remove customers from your Square account, such as cleaning up test data, removing inactive customers, or automating customer lifecycle management.
Example use cases:
- Automatically deleting customers who unsubscribe or request data removal.
- Cleaning up customer records after a certain period of inactivity.
- Integrating with other systems to synchronize customer deletions.
Properties
| Name | Meaning |
|---|---|
| Customer ID | The unique identifier of the customer to delete |
Output
The output JSON contains the response from the Square API after attempting to delete the specified customer. Typically, this will be an empty object or confirmation of deletion if successful. If there is an error (e.g., customer not found), the output will contain an error message describing the issue.
No binary data is output by this operation.
Dependencies
- Requires an active connection to the Square API via an API key credential configured in n8n.
- The node uses the Square API endpoint for customers, switching between sandbox and production environments based on the credential environment setting.
- No additional external dependencies beyond the Square API and n8n's HTTP request capabilities.
Troubleshooting
Common issues:
- Providing an invalid or non-existent Customer ID will result in an error from the Square API.
- Network or authentication errors if the API key is missing, invalid, or lacks required permissions.
- Attempting to delete a customer that is linked to other resources may fail depending on Square's API constraints.
Error messages:
- Errors returned by the Square API are passed through. For example, "Customer not found" indicates the provided Customer ID does not exist.
- Authentication errors indicate issues with the API key credential.
Resolution tips:
- Verify the Customer ID is correct and exists in your Square account.
- Ensure the API key credential is properly set up and has necessary permissions.
- Use the "Continue On Fail" option in n8n to handle errors gracefully during batch operations.