Actions12
Overview
This node integrates with the Square API to perform operations related to invoices, specifically here focusing on searching invoices. It allows users to search for invoices based on filters such as location IDs and customer IDs. The node supports returning either all matching invoices or a limited number of results.
Common scenarios where this node is beneficial include:
- Retrieving invoices for specific customers or locations to generate reports.
- Automating invoice management workflows by filtering invoices dynamically.
- Integrating invoice data into other systems or dashboards.
For example, you could use this node to find all invoices associated with certain customer IDs within a particular location, then process or analyze those invoices further in your workflow.
Properties
| Name | Meaning |
|---|---|
| Return All | Whether to return all matching invoices or only up to a specified limit. |
| Limit | Maximum number of invoices to return when "Return All" is false. Minimum value is 1. |
| Search Fields | Collection of fields to filter the search: |
| - Location IDs | Comma-separated list of location IDs to filter invoices by specific locations. |
| - Customer IDs | Comma-separated list of customer IDs to filter invoices by specific customers. |
Output
The node outputs an array of JSON objects representing the invoices that match the search criteria. Each object corresponds to one invoice and contains all relevant invoice details as returned by the Square API.
If binary data were involved (not applicable here), it would be summarized accordingly, but this operation deals solely with JSON invoice data.
Dependencies
- Requires a valid API authentication token for the Square API.
- The node uses the Square API endpoints, switching between sandbox and production environments based on credential configuration.
- No additional external dependencies beyond the Square API and n8n's HTTP request capabilities.
Troubleshooting
- Empty Results: If no invoices are returned, verify that the location IDs and customer IDs used in the search fields are correct and exist in your Square account.
- API Errors: Common errors may include invalid authentication tokens or insufficient permissions. Ensure the API key credential is correctly configured and has access to invoice data.
- Limit Exceeded: When not using "Return All," ensure the limit is set appropriately; setting it too high might cause performance issues or API rate limiting.
- Malformed Filters: Comma-separated lists must be properly formatted without extra spaces or invalid characters.
- Continue On Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error messages in the output.