Skip to main content

Generate multi-period financial reports from Google Sheets with AI analysis

Workflow preview

Workflow preview
100%
Generate multi-period financial reports from Google Sheets with AI analysis preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Description: 1. Overview This workflow generates automated revenue and expense comparison reports from a structured Google Sheet. It enables users to compare financial data across the current perio...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.lmchatdeepseek, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.toolworkflow, @n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.stickynote, n8n-nodes-base.executeworkflowtrigger, n8n-nodes-base.set

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Generate multi-period financial reports from Google Sheets with AI analysis
Workflow name
Generate multi-period financial reports from Google Sheets with AI analysis

Description:

  1. Overview This workflow generates automated revenue and expense comparison reports from a structured Google Sheet. It enables users to compare financial data across the current period, last month, and last year, then uses an AI agent to analyze and summarize the results for business reporting.

  2. Prerequisites A connected Google Sheets OAuth2 credential.

A valid DeepSeek AI API (or replaceable with another Chat Model).

A sub-workflow (child workflow) that handles processing logic.

Properly structured Google Sheets data (see below).

  1. Required Google Sheet Structure Column headers must include at least: Date, Amount, Type.

  2. Setup Steps Import the workflow into your n8n instance.

Connect your Google Sheets and DeepSeek API credentials.

Update:

Sheet ID and Tab Name (already embedded in node: Get revenual from google sheet).

Custom sub-workflow ID (in the Call n8n Workflow Tool node).

Optionally configure chatbot webhook in the When chat message received node.

  1. What the Workflow Does Accepts date inputs via AI chat interface (ChatTrigger + AI Agent).

Fetches raw transaction data from Google Sheets.

Segments and pivots revenue by classification for:

Current period

Last month

Last year

Aggregates totals and applies custom titles for comparison.

Merges all summaries into a final unified JSON report.

  1. Customization Options Replace DeepSeek with OpenAI or other LLMs.

Change the date fields or cycle comparisons (e.g., quarterly, weekly).

Add more AI analysis steps such as sentiment scoring or forecasting.

Modify the pivot logic to suit specific KPI tags or labels.

  1. Troubleshooting Tips If Google Sheets fetch fails: ensure the document is shared with your n8n Google credential.

If parsing errors: verify that all dates follow the expected format.

Sub-workflow must be active and configured to accept the correct inputs (6 dates).

  1. SEO Keywords: Google Sheets report, AI financial report, compare revenue by month, expense analysis automation, chatbot n8n report generator, n8n Google Sheet integration

More template: https://auton8n.pw/product_info.php?cPath=5&sort=1a&products_id=13

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 - DeepSeek Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatDeepSeek - lmChatDeepSeek
Config choices
Version 1

Block 2 - Window Buffer Memory1

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

Block 3 - Call n8n Workflow Tool

Type / Role
@n8n/n8n-nodes-langchain.toolWorkflow - toolWorkflow
Config choices
Version 2.2

Block 4 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 5 - AI Agent

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

Block 6 - Sticky Note

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

Block 7 - When Executed by Another Workflow

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Block 8 - Format Date

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

Block 9 - Get revenual from google sheet

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

Block 10 - Pivot last circle

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

Block 11 - Pivot current circle

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

Block 12 - Format data current circle

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

Block 13 - Sum current circle

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

Block 14 - Format data last circle

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

Block 15 - Sum last circle

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

Block 16 - Sum data last transfer month

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.1

Block 17 - Sum data current transfer month

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.1

Block 18 - Change title 1

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

Block 19 - Change title 2

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

Block 20 - Collect all

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.1

Block 21 - Change title out come

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

Block 22 - Format data last year circle

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

Block 23 - Pivot last year cirle

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

Block 24 - Sum last year circle

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

Showing the first 24 of 26 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Generate multi-period financial reports from Google Sheets with AI analysis
Complexity advanced
Nodes 26
Categories Document Extraction, AI Chatbot
Author DuyTran
Published 30 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6679/6679.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 multi-period financial reports from Google Sheets with AI analysis do?

Description: 1. Overview This workflow generates automated revenue and expense comparison reports from a structured Google Sheet. It enables users to compare financial data across the current perio...

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 Chatbot use case.