workflows.fit
Back to n8n workflows
n8n templateFreeBy Rosh Ragel

Automatically send weekly sales reports from Square via Outlook

Automatically Send Weekly Sales Reports from Square via Outlook What It Does This workflow automatically connects to the Square API and generates a weekly sales summary report for all your Square locations. The report...

DevelopmentCore NodesCommunicationHITLHttp RequestSplit OutIfCode
Loading interactive preview...

Template notes

Automatically Send Weekly Sales Reports from Square via Outlook

What It Does This workflow automatically connects to the Square API and generates a weekly sales summary report for all your Square locations. The report matches the figures displayed in Square Dashboard > Reports > Sales Summary.

It's designed to run weekly and pull the previous week’s sales into a CSV file, which is then sent to a manager/finance team for analysis.

This workflow builds on my previous template, which allows users to automatically pull data from the Square API into n8n for processing. (See here: https://n8n.io/workflows/6358)

Prerequisites To use this workflow, you'll need: - A Square API credential (configured as a Header Auth credential) - A Microsoft Outlook credential

How to Set Up Square Credentials: - Go to Credentials > Create New - Choose Header Auth - Set the Name to Authorization - Set the Value to your Square Access Token (e.g., Bearer <your-api-key>)

How It Works 1. Trigger: The workflow runs every Monday at 4:00 AM 2. Fetch Locations: An HTTP request retrieves all Square locations linked to your account 3. Fetch Orders: For each location, an HTTP request pulls completed orders for the previous week (e.g., Monday to Sunday) 4. Filter Empty Locations: Locations with no sales are ignored 5. Aggregate Sales Data: A Code node processes the order data and produces a summary identical to Square’s built-in Sales Summary report 6. Create CSV File: A CSV file is created containing the relevant data 7. Send Email: An email is sent via Microsoft Outlook to the chosen third party

Example Use Cases - Automatically send weekly Square sales data to management to improve the quality of planning and scheduling decisions - Automatically send data to an external third party, such as a landlord or agent, who is paid via commission - Automatically send data to a bookkeeper for entry into QuickBooks