Square Daily Sales Summary Report Generator - n8n Workflow

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.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Accounting and Finance professionals needing automated daily sales reconciliation.

  • Business owners or operations managers seeking reliable, timely sales metrics.

  • Developers creating custom Business Intelligence (BI) dashboards using Square data.

  • Users looking for advanced n8n templates focusing on complex data aggregation.

Overview

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.

How it Works

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.


  1. Location Fetching: The first n8n node, Get Square Locations, uses an HTTP Request n8n node to fetch a list of all active location IDs via the Square API.

  2. Itemization: The Turn Locations Into List Split Out n8n node then itemizes these locations, ensuring subsequent steps process the sales data for each location individually.

  3. Data Extraction: The 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.

  4. Conditional Flow: The Ignore Locations w/o Sales If n8n node acts as a guardrail, proceeding only if the location generated orders on the specified date.

  5. Report Compilation: The final, critical step is handled by the 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.

Installation Guide

To implement this powerful n8n workflow, follow these steps:


  1. Import the n8n template: Copy the provided JSON and import it into your n8n instance via the 'Workflows' section using the 'New' -> 'Import from JSON' option.

  2. Set up Square Credentials: This workflow relies on Header Authentication.

In n8n, navigate to 'Credentials' and click 'New'.
Select 'Header Auth'.
Set the Name to Authorization.
Set the Value to your Square Access Token, formatted as Bearer .
* Save this credential.

  1. Assign Credentials: Edit the 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.

  2. Adjust Timezone (Crucial): The 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).

  3. Execution: This reusable n8n workflow is meant to be called by a parent workflow, supplying the required report_date input.

Node Details

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.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by
Rosh Ragel
Rosh Ragel

Featured*