Skip to main content

Generate Daily E-Commerce Order Reports with Supabase, GPT-4.1 and Gmail

Workflow preview

Workflow preview
100%
Generate Daily E-Commerce Order Reports with Supabase, GPT-4.1 and Gmail preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This n8n workflow automates the generation and delivery of a daily order summary via email. It leverages an AI Agent to fetch and summarize e commerce order data from the last 24 hours stored in Su...

Best for

  • Document Extraction automation workflows
  • AI Summarization automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.agent, n8n-nodes-base.supabasetool, n8n-nodes-base.gmailtool, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.scheduletrigger, n8n-nodes-base.set, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Aitor | 1Node.

Original n8n.io source

1.1 Workflow description

Title
Generate Daily E-Commerce Order Reports with Supabase, GPT-4.1 and Gmail
Workflow name
Generate Daily E-Commerce Order Reports with Supabase, GPT-4.1 and Gmail

This n8n workflow automates the generation and delivery of a daily order summary via email. It leverages an AI Agent to fetch and summarize e-commerce order data from the last 24 hours stored in Supabase, providing a concise overview of the daily business operations.

How it works

  • Scheduled Trigger: The workflow is triggered every day at 8 AM.
  • Sender Email Configuration: A manual step allows you to set the sender's email address.
  • AI Agent: An AI Agent node acts as the central intelligence, interacting with various tools to gather and process data.
  • Supabase Data Fetching: The AI Agent calls "Get Orders," "Get Order Items," "Get Clients," and "Get Products" tables to retrieve relevant e-commerce data from your Supabase database.
  • OpenAI Chat Model: An OpenAI Chat Model with the 4.1 model is integrated to help the AI Agent understand and summarize the fetched data into a human-readable format.
  • Gmail Summary: Finally, the workflow sends a summarized report to your specified email address using the "Send Gmail Summary" node.

Set up steps

This setup will take approximately 15-20 minutes.

  1. Download the workflow: Download this workflow and import it into your n8n instance.
  2. Configure the Daily 8am trigger: Ensure the "Daily 8am" trigger is active and set to your desired timezone.
  3. Set Sender Email: In the "Set Sender Email" node, manually enter the email address you wish to use as the sender for the daily reports.
  4. Configure AI Agent:
    • Chat Model: Connect your OpenAI Chat Model credential.
    • Memory & Tools: Ensure all the necessary nodes ("Get Orders", "Get Order Items", "Get Clients", "Get Products", "Send Gmail Summary") are correctly linked to the AI Agent. In our workflow we call data from 4 tables in Supabase.
  5. Configure Supabase Database Connections:
    • For each of the "Get Orders," "Get Order Items," "Get Clients," and "Get Products" nodes, you will need to configure your Supabase credentials to access your e-commerce database.
    • Select the tables (e.g., orders, order_items, clients, products) that you want the AI agent to pull data from in your Supabase schema.
  6. Configure Gmail Credentials: In the "Send Gmail Summary" node, connect your Gmail account credentials to allow n8n to send emails on your behalf.
  7. Test the workflow: Run the workflow manually to ensure all connections are working correctly and the email summary is generated as expected.

Requirements

  • n8n instance: An active n8n instance (self-hosted or cloud).
  • Supabase Account: A Supabase account with your e-commerce order data accessible.
  • OpenAI API Key: An OpenAI API key for the Chat Model.
  • Gmail Account: A Gmail account credentials to send the daily summaries.

Need help?

Feel free to contact us at 1 Node. Get instant access to a library of free resources we created.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.9

Block 2 - Get Orders

Type / Role
n8n-nodes-base.supabaseTool - supabaseTool
Config choices
Version 1

Block 3 - Get Order Items

Type / Role
n8n-nodes-base.supabaseTool - supabaseTool
Config choices
Version 1

Block 4 - Get Clients

Type / Role
n8n-nodes-base.supabaseTool - supabaseTool
Config choices
Version 1

Block 5 - Get Products

Type / Role
n8n-nodes-base.supabaseTool - supabaseTool
Config choices
Version 1

Block 6 - Send Gmail Summary

Type / Role
n8n-nodes-base.gmailTool - gmailTool
Config choices
Version 2.1

Block 7 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 8 - Daily 8am

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 9 - Set Sender Email

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Generate Daily E-Commerce Order Reports with Supabase, GPT-4.1 and Gmail
Complexity intermediate
Nodes 10
Categories Document Extraction, AI Summarization
Author Aitor | 1Node
Published 26 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4406/4406.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate Daily E-Commerce Order Reports with Supabase, GPT-4.1 and Gmail do?

This n8n workflow automates the generation and delivery of a daily order summary via email. It leverages an AI Agent to fetch and summarize e commerce order data from the last 24 hours stored in Su...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI Summarization use case.