Square icon

Square

Consume the Square API

Overview

This node integrates with the Square API to manage customer data. Specifically, the "Get Many" operation under the "Customer" resource retrieves multiple customer records from a Square account. It supports fetching either all customers or a limited subset based on user-defined parameters.

Common scenarios for this node include:

  • Synchronizing customer lists from Square into other systems.
  • Generating reports or analytics on customer data.
  • Automating workflows that require bulk access to customer information.

For example, a user might use this node to fetch all customers to update a CRM system or to retrieve a limited number of recent customers for targeted marketing campaigns.

Properties

Name Meaning
Return All Boolean option to return all customer records available or not.
Limit When "Return All" is false, limits the maximum number of customer records to retrieve.

Output

The node outputs an array of JSON objects representing customer records retrieved from the Square API. Each object corresponds to a single customer and contains fields as defined by Square's customer schema (e.g., name, contact details, metadata).

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 API base URL depending on whether the environment is set to sandbox or production.
  • Uses internal helper functions to make authenticated HTTP requests to Square endpoints.

Troubleshooting

  • Error: No fields to update — This error occurs if an update operation is attempted without specifying any fields. For "Get Many," this is not applicable but relevant for update operations.
  • API request failures — Network issues or invalid credentials can cause request errors. Ensure the API key is valid and has appropriate permissions.
  • Limit parameter ignored when Return All is true — If users expect a limit but have "Return All" enabled, only all results will be returned.
  • Handling large datasets — Retrieving all customers may take time or hit rate limits; consider using the limit option for large accounts.

If the node encounters an error during execution and "Continue On Fail" is enabled, it will output error details per item instead of stopping the workflow.

Links and References

Discussion