This workflow follows the Agent → OpenAI Embeddings recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "Novacart_Monthly_Report_Code_V3",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "months"
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [
0,
0
],
"id": "ac45fa28-a21e-4f81-9d6a-4dd49cebc576",
"name": "Schedule Trigger",
"disabled": true
},
{
"parameters": {
"options": {
"systemMessage": "=You are a senior finance & strategy analyst writing for NovaCart executives.\n\nYou MUST:\n- Use BOTH tools at least once: (1) Internal Finance Vector Store Tool and (2) External Market Reports Vector Store Tool.\n- Ground all key claims in retrieved evidence.\n- If evidence is insufficient for a claim, say so explicitly.\n\nOutput requirements:\n- Return a SINGLE HTML string only (no Markdown, no code fences).\n- Use simple inline CSS for email readability.\n- Structure the report with these sections:\n 1) Title + reporting period\n 2) Executive Summary (3\u20136 bullets)\n 3) KPI Dashboard (table)\n 4) Performance Deep Dive (by product/category and any available dimensions)\n 5) Market Context (external trends)\n 6) Drivers & Correlations (internal vs external)\n 7) Risks, Opportunities, Recommendations (bullets)\n 8) Sources (list the retrieved sources with file_name and drive_url when available)\n\nWhen citing, include the source in parentheses, e.g. (Source: <file_name> <drive_url>)."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 3.1,
"position": [
880,
0
],
"id": "a88468f4-27a0-4f01-9484-cc905acd68de",
"name": "AI Agent"
},
{
"parameters": {
"model": "text-embedding-3-large",
"options": {
"dimensions": 1024
}
},
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"typeVersion": 1.2,
"position": [
960,
576
],
"id": "adb49c5a-dfd9-4fc0-8df7-a3961908f01d",
"name": "Embeddings OpenAI",
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-4o-mini",
"mode": "list",
"cachedResultName": "gpt-4o-mini"
},
"builtInTools": {},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.3,
"position": [
736,
208
],
"id": "0a43259b-ea56-4cd2-b55c-09fad74085ff",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"sendTo": "jattaaihq@gmail.com",
"subject": "Monthly Report",
"message": "={{ $json.output }}",
"options": {}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [
1680,
0
],
"id": "82ca3b35-04bd-4c94-a87e-6b819ec9d4fa",
"name": "Send a message",
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"mode": "retrieve-as-tool",
"toolDescription": "Extract from internal store",
"pineconeIndex": {
"__rl": true,
"value": "nova-cart-n8n",
"mode": "list",
"cachedResultName": "nova-cart-n8n"
},
"options": {
"pineconeNamespace": "int-finance-data"
}
},
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"typeVersion": 1.3,
"position": [
800,
336
],
"id": "9ef9aa31-6a4a-421c-8647-a7e90fb02d96",
"name": "Internal Finance Vector Store",
"credentials": {
"pineconeApi": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"jsCode": "const meta = $items(\"Set Reporting Period\")\n .all()\n .map((item) => item.json);\nconst aiOutput = $input.first().json;\nconst fields = [\"output\", \"text\", \"response\", \"answer\", \"result\"];\nlet html = \"\";\n\nfor (let field of fields) {\n if (aiOutput[field]) {\n html = aiOutput[field];\n break;\n }\n}\n\nif (typeof html !== \"string\") {\n html = JSON.stringify(html);\n}\n\nhtml = html.replace(/```/g, \"\"); // remove markdown code fences\n\nif (!/<[a-z][\\s\\S]*>/i.test(html)) {\n // check if it's not a valid HTML\n html = `<pre>${html.replace(/</g, \"<\").replace(/>/g, \">\")}</pre>`; // escape characters and wrap in <pre>\n}\n\nconst subject = \"NovaCart Monthly Financial Standing Report \u2014 Month Year\";\n\nreturn [{ json: { ...meta, report_subject: subject, report_html: html } }];\n"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1440,
608
],
"id": "c0dc8088-2000-4362-8b96-5353ce891fa0",
"name": "Format Report"
},
{
"parameters": {
"jsCode": "const now = new Date();\nconst generated_at = now.toISOString();\n\n// Calculate previous month\nconst previousMonthDate = new Date(now.getFullYear(), now.getMonth() - 1, 1);\nconst report_year = previousMonthDate.getFullYear();\nconst report_month = previousMonthDate.getMonth() + 1; // Months are 0-based in JavaScript\n\n// Month name\nconst monthNames = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n];\nconst report_month_name = monthNames[previousMonthDate.getMonth()];\n\n// Period start and end\nconst period_start = `${report_year}-${report_month.toString().padStart(2, \"0\")}-01`;\nconst period_end = new Date(report_year, report_month, 0)\n .toISOString()\n .split(\"T\")[0]; // Last day of previous month\n\nreturn [\n {\n json: {\n generated_at,\n report_year,\n report_month,\n report_month_name,\n period_start,\n period_end,\n },\n },\n];\n"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
272,
0
],
"id": "6cd9d583-a7c9-4f8c-a99d-0a5c808a6df9",
"name": "Set Reporting Period"
},
{
"parameters": {
"jsCode": "const meta = $input.all().map((item) => item.json)[0];\n\nconst sessionId = `monthly_finance_report_${String(meta.report_year).padStart(4, \"0\")}_${String(meta.report_month).padStart(2, \"0\")}`;\n\nconst chatInput = `I need a \"Monthly Financial Standing Report\" for NovaCart for the month of ${meta.report_month_name} ${meta.report_year} (period: ${meta.period_start} to ${meta.period_end}). Please use the Internal Finance and External Market vector stores, correlate insights, and provide a narrative with tables. The output should be valid HTML only. Also, mention any assumptions or data gaps.`;\n\nreturn [{ json: { ...meta, sessionId, chatInput, text: chatInput } }];\n"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
544,
0
],
"id": "d2e9e646-7b43-47f3-b625-cd3af3a657ba",
"name": "Generate Report Query"
},
{
"parameters": {
"mode": "retrieve-as-tool",
"toolDescription": "Extract data from external documents",
"pineconeIndex": {
"__rl": true,
"value": "nova-cart-n8n",
"mode": "list",
"cachedResultName": "nova-cart-n8n"
},
"options": {
"pineconeNamespace": "ext-market-reports"
}
},
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"typeVersion": 1.3,
"position": [
1168,
304
],
"id": "72a6bccf-b9de-4489-b101-e437a092ac39",
"name": "External Market Vector Store",
"credentials": {
"pineconeApi": {
"name": "<your credential>"
}
}
}
],
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "Set Reporting Period",
"type": "main",
"index": 0
}
]
]
},
"Embeddings OpenAI": {
"ai_embedding": [
[
{
"node": "Internal Finance Vector Store",
"type": "ai_embedding",
"index": 0
},
{
"node": "External Market Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"Internal Finance Vector Store": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Set Reporting Period": {
"main": [
[
{
"node": "Generate Report Query",
"type": "main",
"index": 0
}
]
]
},
"Generate Report Query": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"External Market Vector Store": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1",
"binaryMode": "separate"
},
"versionId": "db3f1c40-48fc-4b75-a469-9dbd5cfa9b74",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "OZLyu9RsWP7Z5Oyc",
"tags": []
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
gmailOAuth2openAiApipineconeApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Novacart_Monthly_Report_Code_V3. Uses agent, embeddingsOpenAi, lmChatOpenAi, gmail. Scheduled trigger; 10 nodes.
Source: https://github.com/praveenjatta/novaCart-n8n-finance-agent/blob/main/Novacart_Monthly_Report_Code_V3.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
WooriFisa. Uses agent, httpRequest, documentDefaultDataLoader, vectorStorePinecone. Scheduled trigger; 86 nodes.
This workflow automates patient communication for medical clinics using the WhatsApp Business API. It supports appointment booking, rescheduling, service inquiries, follow-ups, and document submission
WooriFisa 최종. Uses memoryMongoDbChat, agent, httpRequest, documentDefaultDataLoader. Scheduled trigger; 68 nodes.
Collects cybersecurity news from trusted RSS feeds and uses OpenAI’s Retrieval-Augmented Generation (RAG) capabilities with Pinecone to filter for content that is directly relevant to your organizatio
Email_sequencing_SDR. Uses gmail, lmChatOpenAi, googleSheets, agent. Scheduled trigger; 25 nodes.