This workflow corresponds to n8n.io template #7486 — we link there as the canonical source.
This workflow follows the Agent → Documentdefaultdataloader 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 →
{
"id": "SSNPPZY3Fe7YACQ8",
"meta": {
"templateId": "5453",
"templateCredsSetupCompleted": true
},
"name": "Multi-agent RAG system for smarter BRD (Business Requirement Document) writing",
"tags": [
{
"id": "pg2i0mqcvGPoanrU",
"name": "Sales Workflow",
"createdAt": "2025-08-02T06:00:12.615Z",
"updatedAt": "2025-08-02T06:00:12.615Z"
}
],
"nodes": [
{
"id": "38a513fb-1f3d-4d66-9cbe-03e49a769478",
"name": "On form submission",
"type": "n8n-nodes-base.formTrigger",
"position": [
-1312,
1408
],
"parameters": {
"options": {},
"formTitle": "Business Requirements Document Request Form",
"formFields": {
"values": [
{
"fieldLabel": "Project ID",
"placeholder": "Project Identification String",
"requiredField": true
},
{
"fieldLabel": "Project Title",
"placeholder": "Short, descriptive title for the project",
"requiredField": true
},
{
"fieldType": "dropdown",
"fieldLabel": "Business Domain",
"fieldOptions": {
"values": [
{
"option": "Education"
},
{
"option": "E-commerce"
},
{
"option": "Healthcare"
},
{
"option": "Finance & Banking"
},
{
"option": "Manufacturing"
},
{
"option": "Logistics"
},
{
"option": "Real Estate"
},
{
"option": "Retail"
},
{
"option": "Travel & Hospitality"
},
{
"option": "Government"
},
{
"option": "Energy"
},
{
"option": "Media & Entertainment"
},
{
"option": "IT & Software"
}
]
},
"requiredField": true
},
{
"fieldType": "file",
"fieldLabel": "Supporting Documents",
"requiredField": true,
"acceptFileTypes": ".pdf"
},
{
"fieldType": "textarea",
"fieldLabel": "Notes",
"placeholder": "Any quick context or remarks for the BRD team",
"requiredField": true
},
{
"fieldType": "email",
"fieldLabel": "Email",
"placeholder": "Email to receive draft BRD",
"requiredField": true
}
]
},
"formDescription": "Please provide your basic contact details, project overview, and upload all relevant documents containing the background, objectives, scope, constraints, and any other supporting information."
},
"typeVersion": 2.2
},
{
"id": "97aee54a-088d-4c7d-aacc-fbd8f46661f5",
"name": "Extract from File",
"type": "n8n-nodes-base.extractFromFile",
"position": [
-720,
1648
],
"parameters": {
"options": {},
"operation": "pdf"
},
"typeVersion": 1
},
{
"id": "03f021f5-5e64-4b9f-a2fa-282df5c0608d",
"name": "Handle multiple files",
"type": "n8n-nodes-base.code",
"position": [
-1088,
1488
],
"parameters": {
"jsCode": "const data = $input.item.json;\nconst binaryData = $input.item.binary;\n\nlet output = [];\n\nObject.keys(binaryData)\n .filter(label => label.startsWith(\"Supporting_Documents\"))\n .forEach(label => {\n output.push({\n json: data,\n binary: { data: binaryData[label] }\n });\n });\n\nreturn output;"
},
"typeVersion": 2
},
{
"id": "bed0865e-07b6-44b4-b6a1-5e104355622c",
"name": "Create BRD request record",
"type": "n8n-nodes-base.code",
"position": [
-1088,
1152
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const requestForm = $('On form submission').first().json;\n\nreturn {\n ProjectID: requestForm[\"Project ID\"],\n ProjectTitle: requestForm[\"Project Title\"],\n BusinessDomain: requestForm[\"Business Domain\"],\n Notes: requestForm[\"Notes\"],\n Email: requestForm[\"Email\"],\n Status: 'Submitted',\n SubmittedAt: requestForm[\"submittedAt\"]\n }"
},
"typeVersion": 2
},
{
"id": "0dbfe2d6-2bb9-4125-b91b-94c565dc3c7c",
"name": "Insert Data to Store",
"type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
"position": [
-336,
1648
],
"parameters": {
"mode": "insert",
"memoryKey": {
"__rl": true,
"mode": "list",
"value": "vector_store_key",
"cachedResultName": "vector_store_key"
}
},
"typeVersion": 1.2
},
{
"id": "9ab3ac6a-8977-44ca-8733-41024de1c729",
"name": "Default Data Loader",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
-176,
1872
],
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "45685132-63e3-498e-b80a-b7af32bbb367",
"name": "Query Data Tool",
"type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
"position": [
-736,
2064
],
"parameters": {
"mode": "retrieve-as-tool",
"toolName": "knowledge_base",
"memoryKey": {
"__rl": true,
"mode": "list",
"value": "vector_store_key"
},
"toolDescription": "Use this knowledge base to answer questions from the user"
},
"typeVersion": 1.2
},
{
"id": "d08dbc8f-0b88-4e85-b8f8-e7d2c3e9cce0",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-864,
2064
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4",
"cachedResultName": "gpt-4"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "bc1715fa-85da-4942-9225-cb709c76069e",
"name": "Mark request as completed",
"type": "n8n-nodes-base.googleSheets",
"position": [
1408,
2240
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "ProjectID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ProjectID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "ProjectTitle",
"type": "string",
"display": true,
"required": false,
"displayName": "ProjectTitle",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "BusinessDomain",
"type": "string",
"display": true,
"required": false,
"displayName": "BusinessDomain",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Notes",
"type": "string",
"display": true,
"required": false,
"displayName": "Notes",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "SubmittedAt",
"type": "string",
"display": true,
"required": false,
"displayName": "SubmittedAt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [
"ProjectID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/YOUR_AWS_SECRET_KEY_HERE_HGsGCrZ6Pp05_axkxQ/edit#gid=0",
"cachedResultName": "Requests"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ujyhFd8Z02Valtfpi0HFrbbk_HGsGCrZ6Pp05_axkxQ",
"cachedResultUrl": "https://docs.google.com/YOUR_AWS_SECRET_KEY_HERE_HGsGCrZ6Pp05_axkxQ/edit?usp=drivesdk",
"cachedResultName": "BRD"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "af657464-1132-4334-b573-51a0ad9cf220",
"name": "Create record to update Google Sheet row",
"type": "n8n-nodes-base.code",
"position": [
1184,
2240
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const request = $('Merge content').item.json.Request;\nreturn {\n ProjectID:request.ProjectID,\n ProjectTitle:request.ProjectTitle,\n BusinessDomain:request.BusinessDomain,\n Notes:request.Notes,\n Email:request.Email,\n SubmittedAt:request.SubmittedAt,\n Status:'Completed'\n};"
},
"typeVersion": 2
},
{
"id": "d7b864a7-a6e5-4585-a8fa-10f5910e5490",
"name": "Request completed?",
"type": "n8n-nodes-base.filter",
"position": [
-1088,
2144
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "5ea39d89-d6bb-47be-9aa8-34f6d18cacd9",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json.Status }}",
"rightValue": "Completed"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "13d8ecee-6021-494d-b7a4-2793612a8869",
"name": "New request added to tracking sheet",
"type": "n8n-nodes-base.googleSheetsTrigger",
"position": [
-1312,
2144
],
"parameters": {
"event": "rowAdded",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyX",
"unit": "minutes",
"value": 5
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/YOUR_AWS_SECRET_KEY_HERE_HGsGCrZ6Pp05_axkxQ/edit#gid=0",
"cachedResultName": "Requests"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ujyhFd8Z02Valtfpi0HFrbbk_HGsGCrZ6Pp05_axkxQ",
"cachedResultUrl": "https://docs.google.com/YOUR_AWS_SECRET_KEY_HERE_HGsGCrZ6Pp05_axkxQ/edit?usp=drivesdk",
"cachedResultName": "BRD"
}
},
"credentials": {
"googleSheetsTriggerOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "38cc8837-c1d7-498d-a28f-4c70ba151286",
"name": "Archiving PDF File",
"type": "n8n-nodes-base.googleDrive",
"position": [
960,
2048
],
"parameters": {
"name": "={{ $json.name }}.pdf",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1IPcko8bzogO3W4mxhrW2Q017QA0Lc5MI",
"cachedResultUrl": "https://drive.google.com/drive/folders/1IPcko8bzogO3W4mxhrW2Q017QA0Lc5MI",
"cachedResultName": "SmartSales"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "26d66c13-fba4-4589-971c-8204407f01c9",
"name": "Send BRD response email",
"type": "n8n-nodes-base.sendGrid",
"position": [
960,
2240
],
"parameters": {
"subject": "=Business Requirements Document \u2013 {{ $('Merge content').item.json.Request.ProjectTitle }} ({{ $('Merge content').item.json.Request.ProjectID }})",
"toEmail": "={{ $('Merge content').item.json.Request.Email }}",
"fromName": "={{ $('Configure metadata ').item.json['Sender Name'] }}",
"resource": "mail",
"fromEmail": "={{ $('Configure metadata ').item.json['Sender Email'] }}",
"contentType": "text/html",
"contentValue": "=<!doctype html>\n<html lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width\">\n <meta http-equiv=\"x-ua-compatible\" content=\"ie=edge\">\n <title>BRD Delivery</title>\n <style>\n /* Clients ignore embedded CSS often\u2014kept minimal. Most styles are inline. */\n @media screen and (max-width:980px) {\n .container {\n width: 100% !important;\n }\n\n .stack {\n display: block !important;\n width: 100% !important;\n }\n\n .px-24 {\n padding-left: 16px !important;\n padding-right: 16px !important;\n }\n }\n </style>\n</head>\n\n<body style=\"margin:0;padding:0;background:#f5f7fb;color:#0f172a;\"> <!-- Preheader (hidden in most clients) -->\n <div style=\"display:none;max-height:0;overflow:hidden;mso-hide:all;\"> BRD for {{ $('Merge content').item.json.Request.ProjectTitle }} ({{ $('Merge content').item.json.Request.ProjectID }}) is attached\n as PDF. Please review and share feedback. </div>\n <table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" style=\"background:#f5f7fb;\">\n <tr>\n <td align=\"center\" style=\"padding:24px;\">\n <table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"980\" class=\"container\"\n style=\"width:980px;max-width:980px;background:#ffffff;border-radius:12px;overflow:hidden;border:1px solid #e5e7eb;\">\n <!-- Header -->\n <tr>\n <td style=\"background:#0ea5e9;padding:20px 24px;color:#ffffff;font-family:Arial,Helvetica,sans-serif;\">\n <div style=\"font-size:18px;font-weight:700;line-height:1.2;\">Business Requirements Document (BRD)</div>\n <div style=\"font-size:13px;opacity:.95;margin-top:4px;\">Project: {{ $('Merge content').item.json.Request.ProjectTitle }} \u00b7 ID: {{ $('Merge content').item.json.Request.ProjectID }}</div>\n </td>\n </tr> <!-- Greeting -->\n <tr>\n <td class=\"px-24\" style=\"padding:24px;font-family:Arial,Helvetica,sans-serif;color:#0f172a;\">\n <p style=\"margin:0 0 12px 0;\">Hi requester,</p>\n <p style=\"margin:0 0 12px 0;\"> Please find attached the <strong>Business Requirements Document\n (BRD)</strong> for <strong>{{ $('Merge content').item.json.Request.ProjectTitle }}</strong> ({{ $('Merge content').item.json.Request.ProjectID }}) in the <strong>{{ $('Merge content').item.json.Request.BusinessDomain }}</strong> domain. It consolidates\n the scope, requirements, and considerations based on the materials you provided. </p>\n <p style=\"margin:0 0 16px 0;\"> Kindly review and share any comments or requested changes. </p>\n </td>\n </tr> <!-- Project summary -->\n <tr>\n <td class=\"px-24\" style=\"padding:0 24px 8px 24px;font-family:Arial,Helvetica,sans-serif;\">\n <table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"\n style=\"border:1px solid #e5e7eb;border-radius:8px;\">\n <tr>\n <td\n style=\"background:#f8fafc;font-weight:bold;padding:10px 12px;font-size:13px;border-bottom:1px solid #e5e7eb;\">\n Project Summary</td>\n </tr>\n <tr>\n <td style=\"padding:12px;\">\n <table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"\n style=\"font-size:13px;color:#0f172a;\">\n <tr>\n <td class=\"stack\" width=\"35%\" style=\"padding:6px 0;font-weight:bold;\">Project Title</td>\n <td class=\"stack\" style=\"padding:6px 0;\">{{ $('Merge content').item.json.Request.ProjectTitle }}</td>\n </tr>\n <tr>\n <td style=\"padding:6px 0;font-weight:bold;\">Project ID</td>\n <td style=\"padding:6px 0;\">{{ $('Merge content').item.json.Request.ProjectID }}\n </td>\n </tr>\n <tr>\n <td style=\"padding:6px 0;font-weight:bold;\">Business Domain</td>\n <td style=\"padding:6px 0;\">{{ $('Merge content').item.json.Request.BusinessDomain }}</td>\n </tr>\n <tr>\n <td style=\"padding:6px 0;font-weight:bold;\">Notes</td>\n <td style=\"padding:6px 0;\">{{ $('Merge content').item.json.Request.Notes }}</td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr> <!-- CTA buttons (optional links) -->\n <tr>\n <td align=\"center\" class=\"px-24\" style=\"padding:16px 24px 8px 24px;font-family:Arial,Helvetica,sans-serif;\">\n <!-- Primary button --> <a href=\"#\" target=\"_blank\"\n style=\"display:inline-block;background:#0ea5e9;color:#ffffff;text-decoration:none;padding:12px 18px;border-radius:8px;font-weight:bold;font-size:14px;\">\n View in Google Docs </a> <!-- Spacing --> <span style=\"display:inline-block;width:8px;\"></span>\n <!-- Secondary button --> <a\n href=\"mailto:business@yourcompany.com?subject=Feedback%20on%20BRD%20{{ $('Merge content').item.json.Request.ProjectID }}\"\n style=\"display:inline-block;background:#e2e8f0;color:#0f172a;text-decoration:none;padding:12px 18px;border-radius:8px;font-weight:bold;font-size:14px;\">\n Send Feedback </a> </td>\n </tr> <!-- Footer -->\n <tr>\n <td class=\"px-24\"\n style=\"padding:16px 24px 24px 24px;font-family:Arial,Helvetica,sans-serif;font-size:13px;color:#334155;\">\n <p style=\"margin:0 0 10px 0;\">Best regards,<br> <strong>{{ $('Configure metadata ').item.json['Sender Name'] }}</strong><br> <a href=\"mailto:{{ $('Configure metadata ').item.json['Sender Email'] }}\"\n style=\"color:#0ea5e9;text-decoration:none;\">{{ $('Configure metadata ').item.json['Sender Email'] }}</a></p>\n <p style=\"margin:0;font-size:12px;color:#64748b;\">If you have trouble opening the attachment, use the\n \u201cView in Google Docs\u201d button above.</p>\n </td>\n </tr>\n </table> <!-- Tiny footer -->\n <table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"980\" class=\"container\"\n style=\"width:980px;max-width:980px;margin-top:12px;\">\n <tr>\n <td align=\"center\" style=\"font-family:Arial,Helvetica,sans-serif;font-size:11px;color:#94a3b8;\"> \u00a9 {{\n $now.format('yyyy') }} {{ $('Configure metadata ').item.json['Company Name'] }}. All rights reserved. </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n</body>\n\n</html>",
"additionalFields": {
"attachments": "data"
}
},
"credentials": {
"sendGridApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "91bcdc30-b249-4151-ba31-4324716bdbdf",
"name": "Create document file",
"type": "n8n-nodes-base.httpRequest",
"position": [
512,
2144
],
"parameters": {
"url": "https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart&supportsAllDrives=true",
"body": "=--foo_bar_baz\nContent-Type: application/json; charset=UTF-8\n\n{\n \"name\": \"{{ $('Merge content').item.json.Request.ProjectID }} {{ $('Merge content').item.json.Request.ProjectTitle }}\",\n \"mimeType\": \"application/vnd.google-apps.document\",\n \"parents\": [\"{{ $json['Drive Folder ID'] }}\"]\n}\n\n--foo_bar_baz\nContent-Type: text/markdown; charset=UTF-8\n\n{{ $('Merge content').item.json.mergedOutput }}\n--foo_bar_baz--",
"method": "POST",
"options": {},
"sendBody": true,
"sendQuery": true,
"contentType": "raw",
"sendHeaders": true,
"authentication": "predefinedCredentialType",
"rawContentType": "multipart/related; boundary=foo_bar_baz",
"queryParameters": {
"parameters": [
{
"name": "uploadType",
"value": "multipart"
},
{
"name": "supportsAllDrives",
"value": "true"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "boundary",
"value": "foo_bar_baz"
}
]
},
"nodeCredentialType": "googleDriveOAuth2Api"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.2
},
{
"id": "0408da60-9d11-4307-a110-2f9013d3dc41",
"name": "Configure metadata ",
"type": "n8n-nodes-base.set",
"position": [
288,
2144
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "1ff0b9a4-7d60-44ec-b047-e49252f1ace9",
"name": "Drive Folder ID",
"type": "string",
"value": "1IPcko8bzogO3W4mxhrW2Q017QA0Lc5MI"
},
{
"id": "6ec91f5c-ca46-438a-9e8d-a525f1a86f1d",
"name": "Sender Email",
"type": "string",
"value": "user@example.com"
},
{
"id": "11485e47-b356-40e6-9d24-5ec4e2b50860",
"name": "Sender Name",
"type": "string",
"value": "R&D Department"
},
{
"id": "a117354f-f90e-4a66-b983-7e7a3071d786",
"name": "Company Name",
"type": "string",
"value": "Amazing Company"
},
{
"id": "11f9f16d-7c23-49e7-983f-56aa974228fe",
"name": "Document Content",
"type": "string",
"value": "={{ $json.mergedOutput }}"
},
{
"id": "0294bc20-ef9c-4504-aff9-a370f1f89eb5",
"name": "Project ID",
"type": "string",
"value": "={{ $json.Request.ProjectID }}"
},
{
"id": "b1b76e83-200b-4e7d-946a-29c5a89b209e",
"name": "Project Title",
"type": "string",
"value": "={{ $json.Request.ProjectTitle }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "9e24e5cf-556e-4770-ba85-c15bb57cfb4b",
"name": "Convert document to PDF",
"type": "n8n-nodes-base.googleDrive",
"position": [
736,
2144
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {
"googleFileConversion": {
"conversion": {
"docsToFormat": "application/pdf"
}
}
},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "b05813f5-f489-4427-8adf-8f2c80644c1c",
"name": "Add BRD record to tracking ",
"type": "n8n-nodes-base.googleSheets",
"position": [
-720,
1152
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "ProjectID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ProjectID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "ProjectTitle",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ProjectTitle",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "BusinessDomain",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "BusinessDomain",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Notes",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Notes",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "SubmittedAt",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "SubmittedAt",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/YOUR_AWS_SECRET_KEY_HERE_HGsGCrZ6Pp05_axkxQ/edit#gid=0",
"cachedResultName": "Requests"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ujyhFd8Z02Valtfpi0HFrbbk_HGsGCrZ6Pp05_axkxQ",
"cachedResultUrl": "https://docs.google.com/YOUR_AWS_SECRET_KEY_HERE_HGsGCrZ6Pp05_axkxQ/edit?usp=drivesdk",
"cachedResultName": "BRD"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "52ed0931-fbc5-437d-b062-d9149b28746a",
"name": "Upload supporting ",
"type": "n8n-nodes-base.googleDrive",
"position": [
-720,
1344
],
"parameters": {
"name": "=document-{{ $now.toFormat(\"yyyyLLdd-HHmmss\") }}-{{$binary.data.fileName}}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1IPcko8bzogO3W4mxhrW2Q017QA0Lc5MI",
"cachedResultUrl": "https://drive.google.com/drive/folders/1IPcko8bzogO3W4mxhrW2Q017QA0Lc5MI",
"cachedResultName": "SmartSales"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "33aa2adb-608a-449c-be87-4a14d2162ca8",
"name": "Add supporting document record(s)",
"type": "n8n-nodes-base.googleSheets",
"position": [
64,
1344
],
"parameters": {
"columns": {
"value": {},
"schema": [],
"mappingMode": "autoMapInputData",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 341243418,
"cachedResultUrl": "https://docs.google.com/YOUR_AWS_SECRET_KEY_HERE_HGsGCrZ6Pp05_axkxQ/edit#gid=341243418",
"cachedResultName": "Documents"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ujyhFd8Z02Valtfpi0HFrbbk_HGsGCrZ6Pp05_axkxQ",
"cachedResultUrl": "https://docs.google.com/YOUR_AWS_SECRET_KEY_HERE_HGsGCrZ6Pp05_axkxQ/edit?usp=drivesdk",
"cachedResultName": "BRD"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.6
},
{
"id": "2616cdd7-17f0-4134-8f69-9c753f48563d",
"name": "Create supporting document record(s)",
"type": "n8n-nodes-base.code",
"position": [
-256,
1344
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "return {\n ProjectID: $('On form submission').item.json['Project ID'],\n DocumentId: $json.id,\n DocumentName: $json.name,\n URL: $json.webContentLink,\n CreatedTime: $json.createdTime\n }"
},
"typeVersion": 2
},
{
"id": "08e3f9b5-99bb-4fa3-ae4a-0d4e97b71e7f",
"name": "Embeddings",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
-304,
1872
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "2cae7a1b-1afc-4e8e-b4b5-b4af4a0c911d",
"name": "Query Data Tool1",
"type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
"position": [
-624,
2544
],
"parameters": {
"mode": "retrieve-as-tool",
"toolName": "knowledge_base",
"memoryKey": {
"__rl": true,
"mode": "list",
"value": "vector_store_key"
},
"toolDescription": "Use this knowledge base to answer questions from the user"
},
"typeVersion": 1.2
},
{
"id": "c096c0c0-1b8e-4588-9f65-e58cd7bf2c96",
"name": "OpenAI Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-864,
2560
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1",
"cachedResultName": "gpt-4.1"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "3df544a3-91e9-483a-b57a-cbdee200dded",
"name": "General BRD Writer Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-848,
1840
],
"parameters": {
"text": "=Generate a complete Business Requirements Document (BRD) for the following project:\nProject ID: {{ $json.ProjectID }}\nProject Title: {{ $json.ProjectTitle }}\nBusiness Domain: {{ $json.BusinessDomain }}\nAdditional Notes: {{ $json.Notes }}\n\nAll supporting details are available in the embedded documents uploaded by the requester. \nQuery the embedded data to complete each section of the BRD according to the standard structure.",
"options": {
"systemMessage": "You are an expert Business Analyst specializing in creating professional, detailed Business Requirements Documents (BRDs) for software projects.\n\nYour responsibilities:\n1. Write informative BRD strictly in markdown format.\n2. Only create the BRD. Do not ask any follow-up questions or request clarification.\n3. Always follow the standard BRD structure provided below.\n4. Use the query data tool to retrieve relevant details from embedded supporting documents before writing.\n5. Keep writing clear, concise, and professional.\n6. If any required information is missing, mark it as **[Information Not Provided]**.\n7. For domain-specific requirements, include \"Industry Best Practice Recommendations\" if relevant and not covered in the provided documents.\n8. Business requirements & functional requirements are most important sections, ensure all business requirements are included\n\n**Standard BRD Structure:**\n\n# Executive Summary\n- Purpose\n- Background / Context\n- Objectives\n\n# Project Overview\n- Project Scope (In-Scope, Out-of-Scope)\n- Assumptions\n- Constraints\n- Stakeholders & Roles (table if possible)\n\n# Non-Functional Requirements\n- Performance\n- Security & Compliance\n- Usability & Accessibility\n- Availability & Reliability\n- Maintainability\n\n# Implementation Considerations\n- Technology Stack\n- Integration Points\n- Training Needs\n- Change Management"
},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "56596615-1902-4e1e-830d-7ef1566e9b16",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
-256,
2144
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "b0955115-d436-4aee-b2cd-85b91b003fbb",
"name": "Business Requirement Writer Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-848,
2336
],
"parameters": {
"text": "=Generate a complete Business Requirements Document (BRD) for the following project:\nProject ID: {{ $json.ProjectID }}\nProject Title: {{ $json.ProjectTitle }}\nBusiness Domain: {{ $json.BusinessDomain }}\nAdditional Notes: {{ $json.Notes }}\n\nAll supporting details are available in the embedded documents uploaded by the requester. \nQuery the embedded data to complete each section of the BRD according to the standard structure.",
"options": {
"systemMessage": "You are an expert Business Analyst specializing in creating professional, detailed Business Requirements Documents (BRDs) for software projects.\n\nYour responsibilities:\n1. Write informative BRD strictly in markdown format.\n2. Only create the BRD. Do not ask any follow-up questions or request clarification.\n3. Always follow the standard BRD structure provided below.\n4. Use the query data tool to retrieve relevant details from embedded supporting documents before writing.\n5. Keep writing clear, concise, and professional.\n6. If any required information is missing, mark it as **[Information Not Provided]**.\n7. For domain-specific requirements, include \"Industry Best Practice Recommendations\" if relevant and not covered in the provided documents.\n8. Business requirements & functional requirements are most important sections, ensure all business requirements are included\n\n**Standard BRD Structure:**\n\n### **# Business Requirements**\n- List **every distinct business requirement** with:\n - **Requirement ID** (e.g., BR-01, BR-02\u2026)\n - **Clear, measurable description**.\n - **Acceptance Criteria** \u2014 must be specific, measurable, and testable.\n - **Sub-requirements** where applicable, to show variations or dependencies.\n - **Rationale** for each High priority requirement (why it\u2019s critical to the business).\n - **Link to related Functional Requirements** for traceability.\n\n### **# Functional Requirements**\n- Expand **Use Cases/User Stories** into **detailed templates** with:\n - **FR ID**\n - **Title**\n - **Actors**\n - **Preconditions**\n - **Main Flow** (step-by-step)\n - **Alternate / Exception Flows**\n - **Postconditions**\n - **Related Business Requirements**\n- Include **Process Flow descriptions** in step-by-step form; if diagrams are needed, indicate `[To be designed]`.\n- Clearly define **Data Requirements**:\n - Field names\n - Data types/formats\n - Validation rules\n - Data sources\n- Document **system rules** and **business logic** for each process.\n- Indicate whether each functional requirement is:\n - **Mandatory for MVP**\n - **Planned for future phase**\n- Where applicable, specify:\n - **Integration behavior**\n - **Expected API interactions**\n - **Error handling logic**"
},
"promptType": "define"
},
"typeVersion": 2.1
},
{
"id": "5b247449-58e0-4cfa-9332-22edaa93044f",
"name": "Merge content",
"type": "n8n-nodes-base.code",
"position": [
64,
2144
],
"parameters": {
"jsCode": "// Get the array of items from previous node\nconst items = $input.all(); \n\n// Merge \"output\" fields into one string\nconst mergedOutput = items\n .map(item => item.json.output) // get each output value\n .filter(Boolean) // remove null/empty\n .join(' '); // join with space (or '\\n' for newline)\n\n// Return as single item\nreturn [\n {\n json: {\n mergedOutput,\n Request: $('Request completed?').first().json\n }\n }\n];"
},
"typeVersion": 2
},
{
"id": "39b9cf55-82b8-4db9-b631-2a535b617bc4",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2992,
1120
],
"parameters": {
"width": 976,
"height": 1632,
"content": "# Multi-agent RAG system for smarter BRD (Business Requirement Document) writing\n\n## **Who\u2019s it for**\nThis workflow is designed for Business Analysts, Project Managers, and Operations Teams who need to automate the creation, tracking, and delivery of Business Requirements Documents (BRDs) from submitted forms and supporting materials. It\u2019s ideal for organizations handling multiple BRD requests and looking to streamline document generation, archiving, and communication.\n\n## **How it works / What it does**\n1. **Trigger**: The process begins when a BRD request form is submitted along with any supporting files.\nSample supporting document PDF: [Download URL](https://wisestackai.s3.ap-southeast-1.amazonaws.com/Customer+Feedback+Analysis+%26+Automation+Platform.pdf)\n2. **Data Recording**:\n - Creates a BRD request record and appends it to a tracking Google Sheet.\n - Handles multiple uploaded files, saving them to Google Drive.\n - Creates supporting document records and updates the supporting documents tracking sheet.\n3. **Content Extraction & Storage**:\n - Extracts text from uploaded PDF files.\n - Inserts extracted content into a vector store for contextual retrieval by AI agents.\n4. **Document Generation**:\n - Uses two specialized AI agents:\n - **General BRD Writer Agent** for the overall document structure.\n - **Business Requirement Writer Agent** for detailed business requirement sections.\n - Both agents query the stored data and produce content, which is then merged.\n5. **Metadata & File Creation**:\n - Configures metadata for the document.\n - Creates a final document file (Google Docs).\n6. **Finalization**:\n - Converts the document to PDF [Sample output](https://wisestackai.s3.ap-southeast-1.amazonaws.com/BRD-2025-001+Customer+Feedback+Analysis+%26+Automation+Platform.pdf)\n - Archives the PDF in Google Drive.\n - Sends a BRD response email to the requester with the completed document.\n - Updates the request status in the Google Sheet as completed.\n\n## **How to set up**\n1. **Prepare Google Sheets**:\n - Create a BRD tracking sheet.\n - Create a supporting document tracking sheet.\n2. **Configure Google Drive**:\n - Set up folders for supporting documents and archived PDFs.\n - Ensure the workflow has API access to upload and retrieve files.\n3. **Form Integration**:\n - Connect your BRD request form to trigger the workflow.\n4. **Vector Store**:\n - Configure a vector database or embedding store for extracted document text.\n5. **AI Agents**:\n - Configure the **General BRD Writer Agent** and **Business Requirement Writer Agent** with your preferred OpenAI model.\n - Link both agents to the Query Data Tool for retrieving embedded content.\n6. **Email Setup**:\n - Configure email sending credentials to deliver final BRDs to requesters.\n\n## **Requirements**\n- Google Sheets API credentials.\n- Google Drive API credentials.\n- An OpenAI API key with access to the desired models.\n- A form submission trigger (e.g., Google Forms, Typeform).\n- Vector store or embedding database for contextual AI queries.\n- Permissions for file uploads, downloads, and updates in Google Drive.\n\n## **How to customize the workflow**\n- **Custom Templates**: Modify the AI agents\u2019 system prompts to match your organization\u2019s BRD format and tone.\n- **Metadata Fields**: Add custom fields (e.g., department, priority level) during metadata configuration.\n- **File Storage Paths**: Adjust Google Drive folder structure for project-specific storage.\n- **Approval Steps**: Insert an approval workflow between draft document creation and final archiving.\n- **Notification Channels**: Add Slack, Microsoft Teams, or other notification integrations in addition to email.\n- **AI Model Selection**: Swap the OpenAI model for another LLM or fine-tuned variant to improve BRD quality for your domain."
},
"typeVersion": 1
},
{
"id": "0196411a-6b6b-407a-8d74-e958643e02ce",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1360,
1024
],
"parameters": {
"width": 768,
"height": 96,
"content": "### 1. Capture BRD Request & Supporting Files\nWhen a user submits the BRD request form, the workflow logs the request into a tracking sheet and uploads all supporting documents to Google Drive for reference."
},
"typeVersion": 1
},
{
"id": "22847e03-896e-48ab-bf5f-01beabf0b775",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-624,
1504
],
"parameters": {
"width": 624,
"height": 112,
"content": "### 2. Process & Extract Key Information\nAll uploaded files are parsed (e.g., PDF text extraction) and relevant content is stored in a vector database for semantic search and retrieval.\n"
},
"typeVersion": 1
},
{
"id": "e0bfbcd7-7f1e-4947-a296-e85a64ffd316",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1648,
1920
],
"parameters": {
"width": 704,
"content": "### 3. Multi-Agent BRD Draft Generation\nTwo specialized AI agents work collaboratively:\n- **General BRD Writer Agent** \u2013 Creates the overall document structure and executive summary.\n- **Business Requirement Writer Agent** \u2013 Focuses on detailed business and functional requirements.\nBoth agents leverage RAG (Retrieval-Augmented Generation) to pull accurate details from the stored supporting documents."
},
"typeVersion": 1
},
{
"id": "3d5e5deb-d9e1-4fc5-8141-8553e96ba0ce",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
1984
],
"parameters": {
"width": 608,
"height": 112,
"content": "### 4. Merge & Enrich Content\nContent from both agents is merged, metadata is applied, and a complete draft document is generated in Google Docs."
},
"typeVersion": 1
},
{
"id": "951ab192-1cad-48be-8c1c-8cf22e322fc0",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
672,
1888
],
"parameters": {
"width": 560,
"height": 112,
"content": "### 5. Convert & Archive Final BRD\nThe Google Doc is converted into a PDF, archived in a dedicated Google Drive folder, and linked back to the original request record."
},
"typeVersion": 1
},
{
"id": "4fe32540-5086-4f5c-8493-06e9bc232c0f",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
688,
2448
],
"parameters": {
"width": 784,
"height": 112,
"content": "### 6. Deliver & Update Status\nThe requester automatically receives the final BRD via email. The tracking sheet is updated to mark the request as completed."
},
"typeVersion": 1
},
{
"id": "ea9a95a6-b90a-4c0a-afd1-050e7d5004ab",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1952,
864
],
"parameters": {
"color": 4,
"width": 540,
"height": 1012,
"content": "\n"
},
"typeVersion": 1
},
{
"id": "a5e9cd7e-02c2-49c9-abaa-1a309d94fb22",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
1696,
1984
],
"parameters": {
"color": 4,
"width": 1068,
"height": 564,
"content": "\n"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "867df89f-1f73-4a76-8da2-078ff5092941",
"connections": {
"Merge": {
"main": [
[
{
"node": "Merge content",
"type": "main",
"index": 0
}
]
]
},
"Embeddings": {
"ai_embedding": [
[
{
"node": "Insert Data to Store",
"type": "ai_embedding",
"index": 0
},
{
"node": "Query Data Tool",
"type": "ai_embedding",
"index": 0
},
{
"node": "Query Data Tool1",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Merge content": {
"main": [
[
{
"node": "Configure metadata ",
"type": "main",
"index": 0
}
]
]
},
"Query Data Tool": {
"ai_tool": [
[
{
"node": "General BRD Writer Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Query Data Tool1": {
"ai_tool": [
[
{
"node": "Business Requirement Writer Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Extract from File": {
"main": [
[
{
"node": "Insert Data to Store",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "General BRD Writer Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Archiving PDF File": {
"main": [
[]
]
},
"On form submission": {
"main": [
[
{
"node": "Handle multiple files",
"type": "main",
"index": 0
},
{
"node": "Create BRD request record",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Business Requirement Writer Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Request completed?": {
"main": [
[
{
"node": "General BRD Writer Agent",
"type": "main",
"index": 0
},
{
"node": "Business Requirement Writer Agent",
"type": "main",
"index": 0
}
]
]
},
"Upload supporting ": {
"main": [
[
{
"node": "Create supporting document record(s)",
"type": "main",
"index": 0
}
]
]
},
"Configure metadata ": {
"main": [
[
{
"node": "Create document file",
"type": "main",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Insert Data to Store",
"type": "ai_document",
"index": 0
}
]
]
},
"Create document file": {
"main": [
[
{
"node": "Convert document to PDF",
"type": "main",
"index": 0
}
]
]
},
"Handle multiple files": {
"main": [
[
{
"node": "Upload supporting ",
"type": "main",
"index": 0
},
{
"node": "Extract from File",
"type": "main",
"index": 0
}
]
]
},
"Convert document to PDF": {
"main": [
[
{
"node": "Archiving PDF File",
"type": "main",
"index": 0
},
{
"node": "Send BRD response email",
"type": "main",
"index": 0
}
]
]
},
"Send BRD response email": {
"main": [
[
{
"node": "Create record to update Google Sheet row",
"type": "main",
"index": 0
}
]
]
},
"General BRD Writer Agent": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Create BRD request record": {
"main": [
[
{
"node": "Add BRD record to tracking ",
"type": "main",
"index": 0
}
]
]
},
"Mark request as completed": {
"main": [
[]
]
},
"Business Requirement Writer Agent": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"New request added to tracking sheet": {
"main": [
[
{
"node": "Request completed?",
"type": "main",
"index": 0
}
]
]
},
"Create supporting document record(s)": {
"main": [
[
{
"node": "Add supporting document record(s)",
"type": "main",
"index": 0
}
]
]
},
"Create record to update Google Sheet row": {
"main": [
[
{
"node": "Mark request as completed",
"type": "main",
"index": 0
}
]
]
}
}
}
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.
googleDriveOAuth2ApigoogleSheetsOAuth2ApigoogleSheetsTriggerOAuth2ApiopenAiApisendGridApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow is designed for Business Analysts, Project Managers, and Operations Teams who need to automate the creation, tracking, and delivery of Business Requirements Documents (BRDs) from submitted forms and supporting materials. It’s ideal for organizations handling…
Source: https://n8n.io/workflows/7486/ — 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.
This advanced n8n workflow automates the full lead enrichment, qualification, and personalized outreach process tailored specifically for the B2B real estate sector. Integrating top platforms like Api
This n8n template automatically classifies incoming emails (Sales, Support, Internal, Finance, Promotions) and routes them to a dedicated OpenAI LLM Agent for processing. Depending on the category, th
Automate Outreach Prospect automates finding, enriching, and messaging potential partners (like restaurants, malls, and bars) using Apify Google Maps scraping, Perplexity enrichment, OpenAI LLMs, Goog
Chat with docs - 5minAI New version. Uses httpRequest, documentDefaultDataLoader, textSplitterRecursiveCharacterTextSplitter, embeddingsOpenAi. Event-driven trigger; 62 nodes.
I prepared a detailed guide that illustrates the entire process of building an AI agent using Supabase and Google Drive within N8N workflows.