Skip to main content

Send monthly P&L email reports with Google Sheets, GPT-4o-mini and Gmail

Workflow preview

Workflow preview
100%
Send monthly P&L email reports with Google Sheets, GPT-4o-mini and Gmail preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow runs monthly and pulls income and expense data from Google Sheets, calculates a prior month profit and loss statement with budget vs actual variances, uses OpenAI GPT 4...

Best for

  • Document Extraction automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger, n8n-nodes-base.code, n8n-nodes-base.googlesheets, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.gmail

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Incrementors.

Original n8n.io source

1.1 Workflow description

Title
Send monthly P&L email reports with Google Sheets, GPT-4o-mini and Gmail
Workflow name
Send monthly P&L email reports with Google Sheets, GPT-4o-mini and Gmail

Quick Overview

This workflow runs monthly and pulls income and expense data from Google Sheets, calculates a prior-month profit and loss statement with budget vs actual variances, uses OpenAI GPT-4o-mini to generate an executive HTML report, emails it via Gmail, and logs key metrics back to Google Sheets.

How it works

  1. Runs on a schedule on the 5th day of every month.
  2. Calculates the previous month and year to define the reporting period.
  3. Fetches all rows from the Income and Expenses tabs in Google Sheets.
  4. Filters the sheet data to the reporting period and calculates Revenue, COGS, Gross Profit, Operating Expenses, Net Profit, and related variances and margins.
  5. Sends the structured P&L text to OpenAI (GPT-4o-mini) to generate a full executive financial report in HTML.
  6. Cleans the returned HTML and then emails the report via Gmail while also appending the run metrics to a “Report Log” tab in Google Sheets.

Setup

  1. Create a Google Sheet with tabs named Income, Expenses, and Report Log, using numeric Month and Year columns and the required fields (Income: Category, Budget, Actual, Month, Year; Expenses: Category, Type, Budget, Actual, Month, Year).
  2. Add Google Sheets credentials in n8n and replace the Income/Expense document IDs (and the logging document ID) with your sheet ID(s).
  3. Add an OpenAI API credential and update the system prompt to replace YOUR_COMPANY_NAME.
  4. Add Gmail credentials and set the recipient email address used to send the report.
  5. Ensure the previous month has at least a few Income and Expense rows so the workflow does not error due to missing period data.

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 - Overview

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

Block 2 - Section — Monthly Schedule Trigger

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

Block 3 - Section — Previous Month Calculation and Financial Data Fetch

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

Block 4 - Section — GPT-4o-mini Executive Report and HTML Cleanup

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

Block 5 - Section — Email and Log (Parallel)

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

Block 6 - 1. Schedule Trigger — 5th of Every Month

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

Block 7 - 2. Code — Get Previous Month

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - 3. Google Sheets — Get Income Data

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 9 - 4. Google Sheets — Get Expense Data

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 10 - 5. Code — Build P&L Statement

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - 6. AI Agent — Generate HTML Report

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

Block 12 - OpenAI — GPT-4o-mini Model

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

Block 13 - 7. Code — Clean HTML Output

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - 8. Gmail — Email Report to Finance Team

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

Block 15 - 9. Google Sheets — Log Report Run

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 16 - Section — P&L Statement Build

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

3. Summary Table

Workflow Send monthly P&L email reports with Google Sheets, GPT-4o-mini and Gmail
Complexity advanced
Nodes 16
Categories Document Extraction, Multimodal AI
Author Incrementors
Published 13 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16328/16328.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 Send monthly P&L email reports with Google Sheets, GPT-4o-mini and Gmail do?

Quick Overview This workflow runs monthly and pulls income and expense data from Google Sheets, calculates a prior month profit and loss statement with budget vs actual variances, uses OpenAI GPT 4...

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, Multimodal AI use case.