Automatically send monthly sales reports from Square via Outlook
Automatically Send Monthly Sales Reports from Square via Outlook
What It Does
This workflow automatically connects to the Square API and generates a monthly 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 monthly and pull the previous month’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
- Trigger: The workflow runs on the 1st of every month at 8:00 AM
- Fetch Locations: An HTTP request retrieves all Square locations linked to your account
- Fetch Orders: For each location, an HTTP request pulls completed orders for the previous calendar month
- Filter Empty Locations: Locations with no sales are ignored
- Aggregate Sales Data: A Code node processes the order data and produces a summary identical to Square’s built-in Sales Summary report
- Create CSV File: A CSV file is created containing the relevant data
- Send Email: An email is sent using Microsoft Outlook to the chosen third party
Example Use Cases
- Automatically send monthly Square sales data to management for forecasting and planning
- 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
How to Use
- Configure both HTTP Request nodes to use your Square API credential
- Set the workflow to Active so it runs automatically
- Enter the email address of the person you want to send the report to and update the message body
- If you want to remove the n8n attribution, you can do so in the last node
Customization Options
- Add pagination to handle locations with more than 1,000 orders per month
- Adjust the date filters in the HTTP node to cover the full calendar month (e.g., use Luxon or JavaScript to calculate
start_dateandend_date)
Why It's Useful
This workflow saves time, reduces manual report pulling from Square, and enables smarter automation around sales data — whether for operations, finance, or performance monitoring.
Automatically Send Monthly Sales Reports from Square via Outlook
This n8n workflow automates the process of fetching monthly sales data from Square, converting it into a CSV file, and sending it as an email attachment via Microsoft Outlook. This ensures that stakeholders receive timely and consistent sales reports without manual intervention.
What it does
- Schedules Execution: The workflow is triggered on a recurring schedule (e.g., once a month) to ensure reports are sent regularly.
- Fetches Sales Data: Makes an HTTP request to the Square API to retrieve sales data for the previous month.
- Processes Data: Uses a Code node to parse and prepare the raw JSON data received from Square.
- Converts to CSV: Transforms the processed sales data into a CSV file format.
- Splits Data (if necessary): If the data contains multiple items, it ensures each item is processed individually for the next step.
- Sends Email: Sends an email via Microsoft Outlook with the generated CSV file attached, delivering the monthly sales report to specified recipients.
Prerequisites/Requirements
- n8n Instance: A running n8n instance.
- Square Account: Access to the Square API with appropriate permissions to fetch sales data. You will need to configure an HTTP Request node with your Square API credentials (e.g., API key, base URL).
- Microsoft Outlook Account: An Outlook account configured as a credential in n8n to send emails.
Setup/Usage
- Import the Workflow:
- Copy the provided JSON code.
- In your n8n instance, go to "Workflows" and click "New".
- Click on the "Import from JSON" button and paste the copied JSON.
- Click "Import".
- Configure Credentials:
- HTTP Request (Square API):
- Locate the "HTTP Request" node.
- You will need to configure the URL, HTTP Method (likely GET), and authentication details for your Square API. This typically involves setting up an "OAuth2" or "Header Auth" credential with your Square API token.
- Adjust the URL and any query parameters to fetch the desired monthly sales data (e.g., date ranges).
- Microsoft Outlook:
- Locate the "Microsoft Outlook" node.
- Select or create a new "Microsoft Outlook Account" credential. Follow the n8n documentation for connecting your Microsoft account if you haven't already.
- HTTP Request (Square API):
- Customize Email Details:
- In the "Microsoft Outlook" node, configure the "To", "Subject", and "Body" fields of the email as needed. You can use expressions to dynamically include the month/year in the subject or body.
- Adjust Schedule:
- Locate the "Schedule Trigger" node.
- Configure the desired schedule for the workflow to run (e.g., "Every 1st day of the month" at a specific time).
- Activate the Workflow:
- Once all configurations are complete, save the workflow and activate it by toggling the "Active" switch in the top right corner of the workflow editor.
Related Templates
Send WooCommerce cross-sell offers to customers via WhatsApp using Rapiwa API
Who Is This For? This n8n workflow enables automated cross-selling by identifying each WooCommerce customer's most frequently purchased product, finding a related product to recommend, and sending a personalized WhatsApp message using the Rapiwa API. It also verifies whether the user's number is WhatsApp-enabled before sending, and logs both successful and unsuccessful attempts to Google Sheets for tracking. What This Workflow Does Retrieves all paying customers from your WooCommerce store Identifies each customer's most purchased product Finds the latest product in the same category as their most purchased item Cleans and verifies customer phone numbers for WhatsApp compatibility Sends personalized WhatsApp messages with product recommendations Logs all activities to Google Sheets for tracking and analysis Handles both verified and unverified numbers appropriately Key Features Customer Segmentation: Automatically identifies paying customers from your WooCommerce store Product Analysis: Determines each customer's most purchased product Smart Recommendations: Finds the latest products in the same category as customer favorites WhatsApp Integration: Uses Rapiwa API for message delivery Phone Number Validation: Verifies WhatsApp numbers before sending messages Dual Logging System: Tracks both successful and failed message attempts in Google Sheets Rate Limiting: Uses batching and wait nodes to prevent API overload Personalized Messaging: Includes customer name and product details in messages Requirements WooCommerce store with API access Rapiwa account with API access for WhatsApp verification and messaging Google account with Sheets access Customer phone numbers in WooCommerce (stored in billing.phone field) How to Use — Step-by-Step Setup Credentials Setup WooCommerce API: Configure WooCommerce API credentials in n8n (e.g., "WooCommerce (get customer)" and "WooCommerce (get customer data)") Rapiwa Bearer Auth: Create an HTTP Bearer credential with your Rapiwa API token Google Sheets OAuth2: Set up OAuth2 credentials for Google Sheets access Configure Google Sheets Ensure your sheet has the required columns as specified in the Google Sheet Column Structure section Verify Code Nodes Code (get paying_customer): Filters customers to include only those who have made purchases Get most buy product id & Clear Number: Identifies the most purchased product and cleans phone numbers Configure HTTP Request Nodes Get customer data: Verify the WooCommerce API endpoint for retrieving customer orders Get specific product data: Verify the WooCommerce API endpoint for product details Get specific product recommend latest product: Verify the WooCommerce API endpoint for finding latest products by category Check valid WhatsApp number Using Rapiwa: Verify the Rapiwa endpoint for WhatsApp number validation Rapiwa Sender: Verify the Rapiwa endpoint for sending messages Google Sheet Required Columns You’ll need two Google Sheets (or two tabs in one spreadsheet): A Google Sheet formatted like this ➤ sample The workflow uses a Google Sheet with the following columns to track coupon distribution: Both must have the following headers (match exactly): | name | number | email | address1 | price | suk | title | product link | validity | staus | | ---------- | ------------- | ----------------------------------------------- | ----------- | ----- | --- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -------- | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | unverified | not sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | Important Notes Phone Number Format: The workflow cleans phone numbers by removing all non-digit characters. Ensure your WooCommerce phone numbers are in a compatible format. API Rate Limits: Rapiwa and WooCommerce APIs have rate limits. Adjust batch sizes and wait times accordingly. Data Privacy: Ensure compliance with data protection regulations when sending marketing messages. Error Handling: The workflow logs unverified numbers but doesn't have extensive error handling. Consider adding error notifications for failed API calls. Product Availability: The workflow recommends the latest product in a category, but doesn't check if it's in stock. Consider adding stock status verification. Testing: Always test with a small batch before running the workflow on your entire customer list. Useful Links Dashboard: https://app.rapiwa.com Official Website: https://rapiwa.com Documentation: https://docs.rapiwa.com Support & Help WhatsApp: Chat on WhatsApp Discord: SpaGreen Community Facebook Group: SpaGreen Support Website: https://spagreen.net Developer Portfolio: Codecanyon SpaGreen
Track SDK documentation drift with GitHub, Notion, Google Sheets, and Slack
📊 Description Automatically track SDK releases from GitHub, compare documentation freshness in Notion, and send Slack alerts when docs lag behind. This workflow ensures documentation stays in sync with releases, improves visibility, and reduces version drift across teams. 🚀📚💬 What This Template Does Step 1: Listens to GitHub repository events to detect new SDK releases. 🧩 Step 2: Fetches release metadata including version, tag, and publish date. 📦 Step 3: Logs release data into Google Sheets for record-keeping and analysis. 📊 Step 4: Retrieves FAQ or documentation data from Notion. 📚 Step 5: Merges GitHub and Notion data to calculate documentation drift. 🔍 Step 6: Flags SDKs whose documentation is over 30 days out of date. ⚠️ Step 7: Sends detailed Slack alerts to notify responsible teams. 🔔 Key Benefits ✅ Keeps SDK documentation aligned with product releases ✅ Prevents outdated information from reaching users ✅ Provides centralized release tracking in Google Sheets ✅ Sends real-time Slack alerts for overdue updates ✅ Strengthens DevRel and developer experience operations Features GitHub release trigger for real-time monitoring Google Sheets logging for tracking and auditing Notion database integration for documentation comparison Automated drift calculation (days since last update) Slack notifications for overdue documentation Requirements GitHub OAuth2 credentials Notion API credentials Google Sheets OAuth2 credentials Slack Bot token with chat:write permissions Target Audience Developer Relations (DevRel) and SDK engineering teams Product documentation and technical writing teams Project managers tracking SDK and doc release parity Step-by-Step Setup Instructions Connect your GitHub account and select your SDK repository. Replace YOURGOOGLESHEETID and YOURSHEET_GID with your tracking spreadsheet. Add your Notion FAQ database ID. Configure your Slack channel ID for alerts. Run once manually to validate setup, then enable automation.
Automate Gmail responses with GPT and human-in-the-loop verification
Try It Out! This n8n template uses AI to automatically respond to your Gmail inbox by drafting response for your approval via email. How it works Gmail Trigger monitors your inbox for new emails AI Analysis determines if a response is needed based on your criteria Draft Generation creates contextually appropriate replies using your business information Human Approval sends you the draft for review before sending Auto-Send replies automatically once approved Setup Connect your Gmail account to the Gmail Trigger node Update the "Your Information" node with: Entity name and description Approval email address Resource guide (FAQs, policies, key info) Response guidelines (tone, style, formatting preferences) Configure your LLM provider (OpenAI, Claude, Gemini, etc.) with API credentials Test with a sample email Requirements n8n instance (self-hosted or cloud) Gmail account with API access LLM provider API key Need Help? Email Nick @ nick@tropicflare.com