Daily E-Commerce Order Report Generator
Every day at 8 AM, an agent fetches yesterday's e-commerce orders from Supabase and emails you a concise business summary.
founders and execsops and IT teams
What it does
Get a concise summary of your e-commerce orders delivered to your inbox every morning at 8 AM. The agent automatically pulls data from Supabase, synthesizes it with AI, and emails you the report so you can start your day informed.
Step by step
- Configure an n8n cron trigger set to run at 08:00 UTC daily.
- Set up four distinct Supabase nodes to query orders, items, clients, and products tables using specific SQL or REST endpoints.
- Connect the AI Agent node to the OpenAI Chat Model with a system prompt template that defines the report structure.
- Configure the Gmail send node to accept the synthesized text as the email body and set the recipient address.
Where the LLM does the work
- Craft a precise system prompt that instructs the model to filter out cancelled orders and focus only on completed transactions for accuracy.
- Define the output format requirements in the prompt so the AI generates a clean, readable summary rather than raw JSON data.
- Iteratively refine the prompt instructions based on sample outputs to ensure key metrics like total revenue and top-selling items are highlighted correctly.
Watch out for
Supabase queries may return large datasets that exceed token limits so you must aggregate or filter data before sending it to the AI model.
Email delivery can fail if Gmail authentication tokens expire so implement a retry mechanism or monitor for auth errors in n8n.
Timezone mismatches between Supabase timestamps and your business day can skew daily reports so ensure all date filters use consistent UTC conversion.
Tools that fit
The agent brief
Everything your agent needs, including the gotchas. Copy it and go.
You are helping me build the following AI agent workflow. ## Goal Daily E-Commerce Order Report Generator: Every day at 8 AM, an agent fetches yesterday's e-commerce orders from Supabase and emails you a concise business summary. ## Specification - What it does: Get a concise summary of your e-commerce orders delivered to your inbox every morning at 8 AM. The agent automatically pulls data from Supabase, synthesizes it with AI, and emails you the report so you can start your day informed. - Trigger: On a schedule (Scheduled · daily 8:00 AM) - Autonomy: Fully hands-off - Expected setup effort: under an hour - Tools/services involved: - n8n: Workflow orchestration platform - Supabase: Fetching e-commerce order data - OpenAI Chat Model: Summarizing order data into human readable format - Gmail: Sending daily summary emails ## Known pitfalls, handle each one explicitly in your implementation 1. Supabase queries may return large datasets that exceed token limits so you must aggregate or filter data before sending it to the AI model. 2. Email delivery can fail if Gmail authentication tokens expire so implement a retry mechanism or monitor for auth errors in n8n. 3. Timezone mismatches between Supabase timestamps and your business day can skew daily reports so ensure all date filters use consistent UTC conversion. ## Reference implementation https://n8n.io/workflows/4406 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/daily-e-commerce-order-report-generator/ via usecasesforagents.com
Frequently asked questions
Can I use a different Automation Platform than n8n?
Yes. n8n is only the example automation platform in this recipe. The same flow works with Home Assistant. Swap the automation platform connection and keep the rest of the setup as written.
Want this running in your business?
This is what I do. I design and build AI agents like this one, and keep them running. If you want it set up for your team instead of doing it yourself, get in touch.
Who it's for
Built for founders and execs who need e-commerce handled without hiring for it.
Ops-IT teams triaging their own internal requests get the same pattern, different queue.