Use this specialized n8n workflow to automatically generate accurate daily sales summary reports from the Square API for all locations. Ideal for automated accounting and reporting pipelines.
Download this n8n workflow template and start using it instantly.
Manually extracting and compiling sales reports across multiple physical locations from the Square Dashboard is a tedious, error-prone task. This comprehensive n8n workflow solves this by programmatically connecting to the Square API to pull detailed daily order data.
Designed as a robust sub-workflow, it accepts a date input and then iterates through all defined Square locations. A dedicated Code n8n node performs meticulous calculations, handling complex financial details such as returns, taxes, tips, discounts, cash rounding, and various tender types. The output data is formatted to match the exact totals displayed in the Square Sales Summary Dashboard, providing a reliable foundation for automated accounting, archival storage, and business intelligence systems. This is an essential n8n template for any serious retail operation using Square.
The execution of this robust n8n workflow begins with the When Executed by Another Workflow n8n trigger, which requires a report_date (YYYY-MM-DD) as input.
Get Square Locations, uses an HTTP Request n8n node to fetch a list of all active location IDs via the Square API.Turn Locations Into List Split Out n8n node then itemizes these locations, ensuring subsequent steps process the sales data for each location individually.Get Sales from Square HTTP Request n8n node queries the Square API for all 'COMPLETED' orders within the specified date range for the current location. It is important to check the timezone setting in this n8n node to ensure data accuracy.Ignore Locations w/o Sales If n8n node acts as a guardrail, proceeding only if the location generated orders on the specified date.Compile Sales Reports Code n8n node. This extensive JavaScript block iterates through all retrieved orders, calculating and aggregating key financial metrics (gross sales, net sales, taxes, fees, tender breakdowns) to produce a unified, accurate daily sales summary report item for each location. This powerful custom n8n node ensures data parity with Square’s internal reporting.To implement this powerful n8n workflow, follow these steps:
Authorization.Bearer .Get Square Locations and Get Sales from Square HTTP Request n8n node and select the newly created Square Header Auth credential under the 'Authentication' setting.Get Sales from Square n8n node is defaulted to the New York/Toronto timezone (-05:00). If your Square locations operate in a different timezone, you must edit the startat and endat parameters within the JSON body of this n8n node to reflect your local offset (e.g., -07:00 for Pacific Time).report_date input. When Executed by Another Workflow (n8n trigger): This special n8n trigger node sets up the workflow to run as a sub-workflow, accepting the crucial report_date input (YYYY-MM-DD) which drives all subsequent data retrieval.
Get Square Locations (HTTP Request n8n node): Connects to https://connect.squareup.com/v2/locations to retrieve all location data, necessary for looping and reporting.
Turn Locations Into List (Split Out n8n node): Essential for flow control, this n8n node transforms the array of locations into individual items, allowing the n8n workflow to process sales data for each location sequentially.
Get Sales from Square (HTTP Request n8n node): This highly configured n8n node POSTs a query to the /v2/orders/search endpoint, filtering for completed orders based on the current location ID and the dynamic date provided by the initial n8n trigger.
Ignore Locations w/o Sales (If n8n node): A simple conditional check using an n8n node to ensure processing resources are only used when sales data ($json.orders) actually exists for a given location.
Compile Sales Reports (Code n8n node): The core intelligence of this n8n workflow. This JavaScript n8n node performs all mathematical calculations—including complex return handling, rounding, and fee attribution—to generate an accurate, detailed sales summary that can be exported to databases or external reports.
Automate SERP tracking for Google's AI Mode answers. This n8n workflow uses the DataForSEO n8n node to extract source references and log them directly into Google Sheets on a schedule.

Automate video posting across 9 social platforms (Instagram, YouTube, TikTok, Facebook, etc.) using this comprehensive n8n workflow. Integrate Google Sheets and Blotato for seamless content scheduling.

Automate cross-posting images and videos to X, Instagram, Facebook, and more using a custom n8n workflow. Simplify content distribution and content management with this robust n8n template.

Use this essential n8n workflow template to automatically purge old execution history records (older than 30 days) from your self-hosted n8n MySQL database instance.









































