Key Sections of n8n Workflow
Configured with Agent, Date Time, Filter, Html, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- Data store
- Routing
- Transform
- Code
- Messaging
- Wait
- Integration
- AI & models
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| Schedule Trigger | Trigger | Schedule Trigger | See node parameters |
| YTD vs Prevoius Month1 | Data store | My Sql | executeQuery |
| Loop Over Items | Routing | Loop Over Items | See node parameters |
| CostCentrs | Transform | Edit Fields | See node parameters |
| Date & Time | Transform | Date Time | See node parameters |
| PreviousMonth | Code | Code | See node parameters |
| Selected Cost Center | Transform | Edit Fields | See node parameters |
| Get Cost Centers with Budgets | Data store | My Sql | executeQuery |
| Filter | Routing | Filter | See node parameters |
| HTML | Transform | Html | See node parameters |
| verticalPL | Code | Code | See node parameters |
| Merge | Transform | Merge | See node parameters |
| Code | Code | Code | See node parameters |
| Microsoft Outlook2 | Messaging | Microsoft Outlook | See node parameters |
| CostCenter | Code | Code | See node parameters |
| WIP1 | Code | Code | See node parameters |
| Employees | Data store | My Sql | executeQuery |
| Employees1 | Code | Code | See node parameters |
| Wait | Wait | Wait | See node parameters |
| Financial Performance | Code | Code | See node parameters |
| Email Data | Transform | Edit Fields | See node parameters |
| Calculator | Integration | Tool Calculator | See node parameters |
| Business Performance AI Agent (Analyst) | AI & models | Agent | See node parameters |
| Think | AI & models | Tool Think | See node parameters |
| Google Gemini Chat Model | AI & models | LM Chat Google Gemini | See node parameters |
| Departments | Data store | My Sql | executeQuery |
| Projects | Data store | My Sql | executeQuery |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
None declared. HTTP requests and Code nodes may still need configuration.
Workflow notes
Key Sections of n8n Workflow
Key Sections of n8n Workflow
🟢 Schedule Trigger
- Triggers the automation on the 5th of every month.
- Sets the cadence for monthly reporting.
📅 Date & Time + 🧮 PreviousMonth
- Captures the current date and derives the previous month/year for dynamic filtering.
- Used throughout all SQL queries for monthly slicing.
📊 Get Cost Centers with Budgets
- Dynamically fetches all cost centers that have relevant budget and GL data for the selected period.
- Ensures only active, relevant divisions are processed.
🔍 Filter
- Narrows the analysis to a specific Cost Center (e.g., "AI DEPARTMENT") during testing or preview.
🔁 Loop Over Items
- Iterates over all fetched Cost Centers to individually generate reports for each business unit.
- Powers multi-division reporting automation.
🧾 YTD vs Previous Month1
- Performs detailed financial comparison between Year-To-Date and Previous Month.
- Outputs revenue, expenses, and variance figures.
🏢 Departments + 🧱 verticalPL
- Analyzes financial performance by sub-divisions (Verticals) within the cost center.
- Data is transformed into an HTML table for final report.
🧱 Projects + 🧮 WIP1
- Gathers project status and WIP metrics.
- Calculates % invoiced, cost % used, and revenue recognition stats.
👥 Employees + 📊 Employees1
- Counts total employees, joined this month/year for the selected cost center.
- Used to calculate per-employee KPIs.
🔗 Merge + 🧾 Code
- Combines all HTML tables into a single responsive report with visual formatting.
- Clean, structured layout for email and review.
💡 Business Performance AI Agent (Analyst)
- Uses Google Gemini 2.5 Pro to analyze financial HTML output.
- Executes structured analysis and generates business insights, executive summary, profitability, and recommendations.
📩 Email Data + Microsoft Outlook
- Sends the final HTML report via email.
- Ready for business manager distribution with personalized message.
⏳ Wait
- Enables looping and batch control across multiple cost centers.
- Prevents overloading or email spamming.
🧠 Think + Calculator
- Used by the AI Agent to "reason" and perform precise financial computations.
- Ensures accuracy in gross/net profit, percentages, and insights.
SQL Query Nodes
SQL Query Nodes
(e.g., YTD vs Previous Month, Projects, Employees, Departments) These nodes fetch structured financial data (like revenue, expenses, WIP, employee count) directly from your database (e.g., ERPNext on MySQL).
You can use any database (MySQL, PostgreSQL, MSSQL, etc.) as long as the schema is mapped accordingly.
To generate these queries faster, use ChatGPT or any AI chat tool: 👉 Just describe what you want (e.g., “monthly budget vs actual grouped by cost center”), and it will write SQL for you.
You can also replace these SQL nodes with any other data source:
Excel/CSV File (via Google Drive or n8n Read Binary File)
Google Sheets
Airtable
REST APIs
Internal apps
✅ The key is to produce the same structured data format expected by the next steps in the workflow.
Developed by Amjid Ali
Developed by Amjid Ali
Thank you for using this workflow template. It has taken me countless hours of hard work, research, and dedication to develop, and I sincerely hope it adds value to your work.
If you find this template helpful, I kindly ask you to consider supporting my efforts. Your support will help me continue improving and creating more valuable resources.
You can contribute via PayPal here:
http://paypal.me/pmptraining
For Full Course about ERPNext or Automation using AI follow below link
http://lms.syncbricks.com
Additionally, when sharing this template, I would greatly appreciate it if you include my original information to ensure proper credit is given.
Thank you for your generosity and support! Email : user@example.com https://linkedin.com/in/amjidali https://syncbricks.com https://youtube.com/@syncbricks
Key Sections of n8n Workflow
Key Sections of n8n Workflow
Purpose and structure
This folder contains the Key Sections of n8n Workflow workflow. Its executable nodes use agent, code, dateTime, filter, html, lmChatGoogleGemini, merge, microsoftOutlook, mySql, scheduleTrigger, set, splitInBatches, toolCalculator, toolThink, wait. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
Schedule Trigger
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Wait/0869_Wait_Datetime_Send_Scheduled.json MIT; preserve source notices.