feat: add folder support for workflows (fixes #70)

This commit is contained in:
Praveen Mudalgeri
2025-08-05 09:40:47 +05:30
parent 307d530f9b
commit c4885eee92
2057 changed files with 985290 additions and 974268 deletions

View File

@@ -0,0 +1,563 @@
{
"meta": {
"instanceId": "26ba763460b97c249b82942b23b6384876dfeb9327513332e743c5f6219c2b8e"
},
"nodes": [
{
"id": "51dbe3b4-42f6-43c9-85dc-42ae49be6ba9",
"name": "Get RFP Data",
"type": "n8n-nodes-base.extractFromFile",
"position": [
1003,
278
],
"parameters": {
"options": {},
"operation": "pdf"
},
"typeVersion": 1
},
{
"id": "c42e6bfc-a426-4d12-bf95-f3fe6e944631",
"name": "Item List Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserItemList",
"position": [
2140,
540
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "1703e9c3-f49e-4272-ad11-0b9d4e9a76c6",
"name": "For Each Question...",
"type": "n8n-nodes-base.splitInBatches",
"position": [
2460,
340
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "a54fa4ee-6f67-41a9-89fe-fd9f2bf094de",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
760,
60
],
"parameters": {
"color": 7,
"width": 532.597092515486,
"height": 508.1316876142587,
"content": "## 1. API to Trigger Workflow\n[Read more about using Webhooks](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/)\n\nThis workflow requires the user to submit the RFP document via an API request. It's a common pattern to use the webhook node for this purpose. Be sure to secure this webhook endpoint in production!"
},
"typeVersion": 1
},
{
"id": "fdef005f-7838-4b8c-8af4-4b7c6f947ee2",
"name": "Set Variables",
"type": "n8n-nodes-base.set",
"position": [
1143,
278
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={\n \"doc_title\": \"{{ $('Wait for Request').item.json.body.title }}\",\n \"doc_filename\": \"{{ $('Wait for Request').item.json.body.id }} | {{ $('Wait for Request').item.json.body.title }} | {{ $now.format('yyyyMMddhhmmss') }}| RFP Response\",\n \"reply_to\": \"{{ $('Wait for Request').item.json.body.reply_to }}\"\n}\n"
},
"typeVersion": 3.3
},
{
"id": "a64f6274-62fc-42fb-b7c7-5aa85746c621",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1320,
148.42417112849222
],
"parameters": {
"color": 7,
"width": 493.289385759178,
"height": 418.29352785836636,
"content": "## 2. Create a new Doc to Capture Responses For RFP Questions\n[Read more about working with Google Docs](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledocs/)\n\nFor each RFP we process, let's create its very own document to store the results. It will serve as a draft document for the RFP response."
},
"typeVersion": 1
},
{
"id": "2b3df6af-c1ab-44a1-8907-425944294477",
"name": "Create new RFP Response Document",
"type": "n8n-nodes-base.googleDocs",
"position": [
1420,
340
],
"parameters": {
"title": "={{ $json.doc_filename }}",
"folderId": "=1y0I8MH32maIWCJh767mRE_NMHC6A3bUu"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "V0G0vi1DRj7Cqbp9",
"name": "Google Docs account"
}
},
"typeVersion": 2
},
{
"id": "0bf30bef-2910-432b-b5eb-dee3fe39b797",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1840,
110.52747078833045
],
"parameters": {
"color": 7,
"width": 500.1029039641811,
"height": 599.9895116376663,
"content": "## 3. Identifying Questions using AI\n[Read more about Question & Answer Chain](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa/)\n\nUsing the power of LLMs, we're able to extract the RFP questionnaire regardless of original formatting or layout. This allows AutoRFP to handle a wide range of RFPs without requiring explicit extraction rules for edge cases.\n\nAdditionally, We'll use the Input List Output Parser to return a list of questions for further processing."
},
"typeVersion": 1
},
{
"id": "1c064047-1f6a-47c8-bb49-85b4d6f8e854",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
2380,
84.66944065837868
],
"parameters": {
"color": 7,
"width": 746.3888903304862,
"height": 600.3660610069576,
"content": "## 4. Generating Question & Answer Pairs with AI\n[Read more about using OpenAI Assistants in n8n](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/)\n\nBy preparing an OpenAI Assistant with marketing material and sales documents about our company and business, we are able to use AI to answer RFP questions with the accurate and relevant context. Potentially allowing sales teams to increase the number of RFPs they can reply to.\n\nThis portion of the workflow loops through and answers each question individually for better answers. We can record the Question and Answer pairings to the RFP response document we created earlier."
},
"typeVersion": 1
},
{
"id": "e663ba01-e9a6-4247-9d97-8f796d29d72a",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1960,
540
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "ec0b439e-9fd8-4960-b8bb-04f4f7814a0a",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
300,
60
],
"parameters": {
"width": 421.778219154496,
"height": 515.8006969458895,
"content": "## Try It Out!\n\n**This workflow does the following:**\n* Receives a RFP document via webhook\n* Creates a new RFP response document via Google Docs\n* Uses LLMs to extract the questions from the RFP document into a questions list\n* Loops through each question and uses an OpenAI Assistant to generate an answer. Saving each answer into the response document.\n* Once complete, sends a gmail and slack notification to the team.\n\n\n📃**Example Documents**\nTo run this workflow, you'll need to following 2 documents:\n* [RFP Document](https://drive.google.com/file/d/1G42h4Vz2lBuiNCnOiXF_-EBP1MaIEVq5/view?usp=sharing)\n* [Example Company Document](https://drive.google.com/file/d/16WywCYcxBgYHXB3TY3wXUTyfyG2n_BA0/view?usp=sharing)\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!"
},
"typeVersion": 1
},
{
"id": "244ff32d-9bc4-4a67-a6c2-4a7dc308058e",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
3160,
80
],
"parameters": {
"color": 7,
"width": 474.3513281516049,
"height": 390.51033452105344,
"content": "## 5. Send Notification Once Completed\n[Read more about using Slack](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack)\n\n\nFinally, we can use a number of ways to notify the sales team when the process is complete. Here, we've opted to send the requesting user an email with a link to the RFP response document."
},
"typeVersion": 1
},
{
"id": "94243b69-43b8-4731-9a6b-2934db832cc6",
"name": "Send Chat Notification",
"type": "n8n-nodes-base.slack",
"position": [
3440,
280
],
"parameters": {
"text": "=RFP document \"{{ $('Set Variables').item.json.title }}\" completed!",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "name",
"value": "RFP-channel"
},
"otherOptions": {}
},
"credentials": {
"slackApi": {
"id": "VfK3js0YdqBdQLGP",
"name": "Slack account"
}
},
"typeVersion": 2.1
},
{
"id": "391d7e07-2a6d-4c4d-bf42-9cc5466cc1b5",
"name": "Send Email Notification",
"type": "n8n-nodes-base.gmail",
"position": [
3240,
280
],
"parameters": {
"sendTo": "={{ $('Set Variables').item.json.reply_to }}",
"message": "=Your RFP document \"{{ $('Set Variables').item.json.title }}\" is now complete!",
"options": {},
"subject": "=RFP Questionnaire \"{{ $('Set Variables').item.json.title }}\" Completed!",
"emailType": "text"
},
"credentials": {
"gmailOAuth2": {
"id": "Sf5Gfl9NiFTNXFWb",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "34115f45-21ff-49a0-95f4-1fed53b53583",
"name": "Add Metadata to Response Doc",
"type": "n8n-nodes-base.googleDocs",
"position": [
1600,
340
],
"parameters": {
"actionsUi": {
"actionFields": [
{
"text": "=Title: {{ $('Set Variables').item.json.doc_title }}\nDate generated: {{ $now.format(\"yyyy-MM-dd @ hh:mm\") }}\nRequested by: {{ $('Set Variables').item.json.reply_to }}\nExecution Id: http://localhost:5678/workflow/{{ $workflow.id }}/executions/{{ $execution.id }}\n\n---\n\n",
"action": "insert"
}
]
},
"operation": "update",
"documentURL": "={{ $json.id }}"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "V0G0vi1DRj7Cqbp9",
"name": "Google Docs account"
}
},
"typeVersion": 2
},
{
"id": "f285d896-ba15-4f8a-b041-7cbcbe2e1050",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
783,
238
],
"parameters": {
"width": 192.30781285767205,
"height": 306.5264325350084,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n🚨**Required**\n* Use a tool such as Postman to send data to the webhook."
},
"typeVersion": 1
},
{
"id": "b6e4e40e-b10b-48f2-bfe2-1ad38b1c6518",
"name": "Record Question & Answer in Response Doc",
"type": "n8n-nodes-base.googleDocs",
"position": [
2940,
460
],
"parameters": {
"actionsUi": {
"actionFields": [
{
"text": "={{ $runIndex+1 }}. {{ $json.content }}\n{{ $json.output }}\n\n",
"action": "insert"
}
]
},
"operation": "update",
"documentURL": "={{ $('Create new RFP Response Document').item.json.id }}"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "V0G0vi1DRj7Cqbp9",
"name": "Google Docs account"
}
},
"typeVersion": 2
},
{
"id": "ae8cc28f-4fd3-41d7-8a30-2675f58d1067",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
2600,
440
],
"parameters": {
"width": 306.8994213707367,
"height": 481.01365258903786,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n🚨**Required**\nYou'll need to create an OpenAI Assistant to use this workflow.\n* Sign up for [OpenAI Dashboard](https://platform.openai.com) if you haven't already.\n* Create an [OpenAI Assistant](https://platform.openai.com/playground/assistants)\n* Upload the [example company doc](https://drive.google.com/file/d/16WywCYcxBgYHXB3TY3wXUTyfyG2n_BA0/view?usp=sharing) to the assistant.\n\nThe assistant will use the company doc to answer the questions."
},
"typeVersion": 1
},
{
"id": "81825554-5cbe-469b-8511-a92d5ea165cb",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
3200,
460
],
"parameters": {
"width": 386.79263167741857,
"height": 94.04968721739164,
"content": "🚨**Required**\n* Update the email address to send to in Gmail Node.\n* Update the channel and message for Slack."
},
"typeVersion": 1
},
{
"id": "25a57ca0-6789-499c-873b-07aba40530ed",
"name": "Answer Question with Context",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2620,
460
],
"parameters": {
"text": "={{ $json.response.text }}",
"prompt": "define",
"options": {},
"resource": "assistant",
"assistantId": {
"__rl": true,
"mode": "list",
"value": "asst_QBI5lLKOsjktr3DRB4MwrgZd",
"cachedResultName": "Nexus Digital Solutions Bot"
}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1.3
},
{
"id": "1b4cc83b-a793-47c1-9dd6-0d7484db07b4",
"name": "Wait for Request",
"type": "n8n-nodes-base.webhook",
"position": [
823,
278
],
"webhookId": "35e874df-2904-494e-a9f5-5a3f20f517f8",
"parameters": {
"path": "35e874df-2904-494e-a9f5-5a3f20f517f8",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 2
},
{
"id": "2f97e3e6-c100-4045-bcb3-6fbd17cfb420",
"name": "Extract Questions From RFP",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
1960,
380
],
"parameters": {
"text": "=You have been given a RFP document as part of a tender process of a buyer. Please extract all questions intended for the supplier. You must ensure the questions extracted are exactly has they are written in the RFP document.\n\n<RFP>{{ $('Get RFP Data').item.json.text }}<RFP>",
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.4
},
{
"id": "4945b975-ac84-406e-8482-44cfa5679ef9",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
760,
600
],
"parameters": {
"color": 5,
"width": 529.9947173986736,
"height": 157.64231937074243,
"content": "### Example Webhook Request\ncurl --location 'https://<n8n_webhook_url>' \\\n--form 'id=\"RFP001\"' \\\n--form 'title=\"BlueChip Travel and StarBus Web Services\"' \\\n--form 'reply_to=\"jim@example.com\"' \\\n--form 'data=@\"k9pnbALxX/RFP Questionnaire.pdf\"'\n"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Get RFP Data": {
"main": [
[
{
"node": "Set Variables",
"type": "main",
"index": 0
}
]
]
},
"Set Variables": {
"main": [
[
{
"node": "Create new RFP Response Document",
"type": "main",
"index": 0
}
]
]
},
"Wait for Request": {
"main": [
[
{
"node": "Get RFP Data",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Extract Questions From RFP",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"For Each Question...": {
"main": [
[
{
"node": "Send Email Notification",
"type": "main",
"index": 0
}
],
[
{
"node": "Answer Question with Context",
"type": "main",
"index": 0
}
]
]
},
"Item List Output Parser": {
"ai_outputParser": [
[
{
"node": "Extract Questions From RFP",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Send Email Notification": {
"main": [
[
{
"node": "Send Chat Notification",
"type": "main",
"index": 0
}
]
]
},
"Extract Questions From RFP": {
"main": [
[
{
"node": "For Each Question...",
"type": "main",
"index": 0
}
]
]
},
"Add Metadata to Response Doc": {
"main": [
[
{
"node": "Extract Questions From RFP",
"type": "main",
"index": 0
}
]
]
},
"Answer Question with Context": {
"main": [
[
{
"node": "Record Question & Answer in Response Doc",
"type": "main",
"index": 0
}
]
]
},
"Create new RFP Response Document": {
"main": [
[
{
"node": "Add Metadata to Response Doc",
"type": "main",
"index": 0
}
]
]
},
"Record Question & Answer in Response Doc": {
"main": [
[
{
"node": "For Each Question...",
"type": "main",
"index": 0
}
]
]
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,521 @@
{
"id": "fqaNojXWrspqjfkY",
"meta": {
"instanceId": "69133932b9ba8e1ef14816d0b63297bb44feb97c19f759b5d153ff6b0c59e18d"
},
"name": "RAG Workflow For Stock Earnings Report Analysis",
"tags": [],
"nodes": [
{
"id": "1a621f76-9636-430d-94dd-d5e7dcd5afdc",
"name": "Pinecone Vector Store",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
380,
-60
],
"parameters": {
"mode": "insert",
"options": {},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "company-earnings",
"cachedResultName": "company-earnings"
}
},
"credentials": {
"pineconeApi": {
"id": "bQTNry52ypGLqt47",
"name": "PineconeApi account"
}
},
"typeVersion": 1
},
{
"id": "e5936e45-0f58-48e9-9ab4-cc69f2ef6578",
"name": "Embeddings Google Gemini",
"type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
"position": [
300,
220
],
"parameters": {
"modelName": "models/text-embedding-004"
},
"credentials": {
"googlePalmApi": {
"id": "jLOqyTR4yTT1nYKi",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "e98dbc8e-6b4a-415d-a044-85e590fcb105",
"name": "Default Data Loader",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
520,
200
],
"parameters": {
"loader": "pdfLoader",
"options": {},
"dataType": "binary"
},
"typeVersion": 1
},
{
"id": "ae77f5f4-3704-4b66-9c3f-27d6bd3f68c3",
"name": "Recursive Character Text Splitter",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
560,
380
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "d939c9db-0edc-4205-b8e5-fb34b0076510",
"name": "Loop Over Items",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-120,
-60
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "4f8421b4-1a11-4ac3-a9ca-1d725a8ec98e",
"name": "When clicking \u2018Test workflow\u2019",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-360,
640
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c9e2ec39-c34d-4d8e-b772-d1c1cd823d9e",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-40,
640
],
"parameters": {
"text": "Give me a report on Google's last 3 quarter earnings. Format it in markdown. Focus on the differences and trends. Spot any outliers.",
"options": {
"systemMessage": "You are a highly skilled financial analyst specializing in analyzing Google's (Alphabet Inc.) financial performance. You have access to two powerful tools:\n\n1. **Vector Store Tool:** This tool allows you to retrieve relevant information from the past three quarters of Google's earnings reports (PDF documents). The documents have been processed and stored as embeddings in a vector database, enabling semantic search. Use this tool to find specific information related to revenue, expenses, profits, losses, growth, key metrics, management commentary, and any other relevant financial data.\n2. **Google Docs Tool:** This tool allows you to create, edit, and format Google Docs. Use this tool to save your findings into a Google Doc.\n\nYour task is to answer user queries related to Google's financial performance based on the last three quarters' earnings reports. When a user asks a question:\n\n1. **Understand the User's Intent:** Carefully analyze the user's query to determine what specific financial information they are seeking. Identify keywords, timeframes (e.g., \"previous quarter\"), and the type of analysis requested (e.g., trend analysis, comparison, explanation).\n2. **Retrieve Relevant Information:** Use the Vector Store Tool to search for and retrieve the most relevant text passages from the earnings reports that address the user's query. Retrieve multiple, diverse chunks to ensure comprehensive coverage.\n3. **Synthesize and Analyze:** Analyze the information from the retrieved text chunks. Identify key trends, patterns, and insights related to the user's query.\n4. **Generate Report in Google Docs:** Use the Google Docs Tool to create a new Google Doc (or append to an existing one, if specified by the user). Structure the report with clear headings, bullet points, and concise paragraphs. Include the following in your report as appropriate:\n * **Executive Summary:** A brief overview of the key findings.\n * **Revenue Analysis:** Report on revenue figures, growth rates, and key revenue drivers.\n * **Expense Analysis:** Report on major expense categories and their impact on profitability.\n * **Profitability Analysis:** Discuss net income, profit margins, and earnings per share (EPS).\n * **Key Metrics:** Include other relevant financial metrics mentioned in the reports (e.g., operating income, cash flow, segment performance).\n * **Management Commentary:** Summarize any relevant insights or explanations provided by Google's management in the earnings calls or reports.\n * **Trend Analysis:** Compare the current quarter's performance to the previous two quarters, highlighting significant changes or trends.\n * **Visualizations:** If possible, use the Google Docs tool to insert basic charts or tables to visually represent the data. (You might need to guide the user on how to do this if the tool has limitations.)\n5. **Cite Sources:** Clearly indicate the source of your information (e.g., \"Q2 2023 Earnings Report\") for each data point or analysis.\n6. **Maintain a Professional Tone:** Write in a clear, concise, and objective tone, as expected of a financial analyst. Avoid speculation or making unsubstantiated claims.\n\nYour ultimate goal is to provide the user with a well-structured, informative, and accurate financial report based on the data available in the last three quarters of Google's earnings reports.\nSave the report in as a Google Doc using the available tool!"
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "40534b4d-3061-4054-8c0a-b08fe32deaf7",
"name": "Vector Store Tool",
"type": "@n8n/n8n-nodes-langchain.toolVectorStore",
"position": [
360,
860
],
"parameters": {
"name": "company_financial_earnings_data_tool",
"description": "Retrieve information about the last 3 quarters of Google Earnings"
},
"typeVersion": 1
},
{
"id": "c584d5f6-1fac-420f-a28d-71f51b555e67",
"name": "Google Gemini Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
620,
1060
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash-exp"
},
"credentials": {
"googlePalmApi": {
"id": "jLOqyTR4yTT1nYKi",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "f4f993d0-c80a-4f26-bc51-fe7df1012606",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-160,
860
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "tQLWnWRzD8aebYvp",
"name": "OpenAi account"
}
},
"typeVersion": 1.1
},
{
"id": "4aa3726e-a105-4bfe-b1df-06c3c9ece18a",
"name": "Pinecone Vector Store (Retrieval)",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
260,
1080
],
"parameters": {
"options": {},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "company-earnings",
"cachedResultName": "company-earnings"
}
},
"credentials": {
"pineconeApi": {
"id": "bQTNry52ypGLqt47",
"name": "PineconeApi account"
}
},
"typeVersion": 1
},
{
"id": "e08dd92a-a7a1-4204-bef9-54611a2dee92",
"name": "Save Report to Google Docs",
"type": "n8n-nodes-base.googleDocs",
"position": [
460,
640
],
"parameters": {
"actionsUi": {
"actionFields": [
{
"text": "={{ $json.output }}",
"action": "insert"
}
]
},
"operation": "update",
"documentURL": "1aOUl-mnCaI4__tULmBZSvWlOQhTHdD-RUPesP7_sFT4"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "nnE7RqZglLn8XarL",
"name": "Google Docs account"
}
},
"typeVersion": 2
},
{
"id": "1984765a-3148-4bcf-9d20-fe29291fda6d",
"name": "Embeddings Google Gemini (retrieval)",
"type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
"position": [
240,
1260
],
"parameters": {
"modelName": "models/text-embedding-004"
},
"credentials": {
"googlePalmApi": {
"id": "jLOqyTR4yTT1nYKi",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "9b0bff2e-06f4-4c89-b9dc-c54cfb79577c",
"name": "List Of Files To Load (Google Sheets)",
"type": "n8n-nodes-base.googleSheets",
"position": [
-380,
-60
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1476836405,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ckP-ZgAMs2l2sFUpLAXx-gWNOQrHXoAs48Vo271X3rs/edit#gid=1476836405",
"cachedResultName": "GOOG"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ckP-ZgAMs2l2sFUpLAXx-gWNOQrHXoAs48Vo271X3rs",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ckP-ZgAMs2l2sFUpLAXx-gWNOQrHXoAs48Vo271X3rs/edit?usp=drivesdk",
"cachedResultName": "Watchlist"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "sRJmS2k8zdqVjtJL",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "b0d58ce5-9ac0-4f0f-ac7c-d6cb27551d82",
"name": "Download File From Google Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
160,
-60
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "url",
"value": "={{ $('List Of Files To Load (Google Sheets)').item.json['File URL'] }}"
},
"options": {
"fileName": "={{ $('List Of Files To Load (Google Sheets)').item.json['10Q'] }}"
},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "uixLsi5TmrfwXPeB",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "28817b3d-fb54-4dc2-83bc-3ac27320712b",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1100,
80
],
"parameters": {
"width": 500,
"height": 740,
"content": "## Set up steps\n1. Google Cloud Project & Vertex AI API:\n\t* Create a Google Cloud project.\n\t* Enable the Vertex AI API for your project.\n2. Google AI API key:\n\t* Obtain a Google AI API key from Google AI Studio.\n3. Pinecone account and API key:\n\t* Create a free account on the Pinecone website.\n\t* Obtain your API key from your Pinecone dashboard.\n\t* Create an index named company-earnings in your Pinecone project.\n4. Google Drive - download and save financial documents:\n\t* Go to a company you want to analize and download their quarterly earnings PDFs\n\t* Save the PDFs in Google Drive\n\t* Create a Google Sheet that stores a list of file URLs pointing to the PDFs you downloaded and saved to Google Drive\n5. Configure credentials in your n8n environment for:\n\t* Google Sheets OAuth2\n\t* Google Drive OAuth2\n\t* Google Docs OAuth2\n\t* Google Gemini(PaLM) Api (using your Google AI API key)\n\t* Pinecone API (using your Pinecone API key)\n6. Import and configure the workflow:\n\t* Import this workflow into your n8n instance.\n\t* Update the List Of Files To Load (Google Sheets) node to point to your Google Sheet.\n\t* Update the Download File From Google Drive to point to the column where the file URLs are\n\t* Update the Save Report to Google Docs node to point to your Google Doc where you want the report saved."
},
"typeVersion": 1
},
{
"id": "eecb1c25-c019-44e4-b254-a919f80faee7",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
380,
-260
],
"parameters": {
"content": "## Loading data to Pinecone vector store"
},
"typeVersion": 1
},
{
"id": "8371f7f8-29a7-4711-b635-d5538f3441b8",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-40,
460
],
"parameters": {
"content": "## AI Agent Report Generation using RAG"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {
"AI Agent": [
{
"json": {
"output": "# Google (Alphabet Inc.) Financial Report: Last 3 Quarters\n\n## Executive Summary\nGoogle has demonstrated solid revenue growth across the last three quarters, although there are notable fluctuations in operating income, net income, and other income/expense categories. While revenue from both Google Services and Cloud shows consistent year-over-year growth, the operating margins have shown variability. \n\n## Revenue Analysis\n- **Quarter 1:**\n - **Revenue:** $80.5 billion, a 15% year-over-year increase.\n - **Google Services Revenue:** Up $8.4 billion (14%).\n - **Google Cloud Revenue:** Up $2.1 billion (28%).\n\n- **Quarter 2:**\n - **Revenue:** $84.7 billion, a 14% year-over-year increase.\n - **Google Services Revenue:** Up $7.6 billion (12%).\n - **Google Cloud Revenue:** Up $2.3 billion (29%).\n\n- **Quarter 3:**\n - **Revenue:** $88.3 billion, a 15% year-over-year increase.\n - **Google Services Revenue:** Up $8.5 billion (13%).\n - **Google Cloud Revenue:** Up $2.9 billion (35%).\n\n### Key Trends\n- Consistent revenue growth across all three quarters.\n- Strong growth in Google Cloud, indicating it is a significant area of expansion.\n\n## Expense Analysis\n- **Cost of Revenue:**\n - **Quarter 1:** $33.7 billion (up 10% year-over-year).\n - Reason for increase: Higher total acquisition costs, content acquisition costs, and depreciation.\n\n- **Operating Income:**\n - **Quarter 1:** $17.415 billion (25% operating margin).\n - **Quarter 2:** $21.838 billion (29% operating margin).\n - **Quarter 3:** $21.343 billion (28% operating margin).\n\n### Observations\n- Operating margins have fluctuated, while overall costs have continued to rise.\n \n## Profitability Analysis\n- **Net Income:**\n - **Quarter 1:** $15.051 billion.\n - **Quarter 2:** $18.368 billion.\n - **Quarter 3:** $19.689 billion.\n \n- **Diluted EPS:**\n - **Quarter 1:** $1.17.\n - **Quarter 2:** $1.44.\n - **Quarter 3:** $1.55.\n\n### Summary\nWhile net income has increased, the fluctuations in other income and expense metrics have affected profitability.\n\n## Key Metrics\n- **Operating Margins:**\n - Q1: 25%\n - Q2: 29%\n - Q3: 28%\n\n- **Other Income (Expense), Net:**\n - Q1: $790 million.\n - Q2: $65 million.\n - Q3: -$146 million. (Downturn to a negative number)\n\n## Management Commentary\nManagement has pointed out that increased revenue performance in Google Cloud is encouraging, especially given the challenges in the overall economic environment.\n\n## Trend Analysis\n- **Comparative Performance:**\n - Revenue trends show consistency, ranging from 14%-15% growth year-over-year.\n - Operating income showed a decreasing trend from Q1 ($17.415 billion) to Q2 ($21.838 billion) and slightly decreased again in Q3 ($21.343 billion).\n \n### Noteworthy Observations\n- **Outliers:**\n - Significant volatility in other income/expense net, transitioning from $790 million in Q1 to a loss of $146 million in Q3.\n \n- **Operating Margins:** \n - Variability seen in margins from Q1 (25%) to Q2 (29%) and back down to Q3 (28%) shows a trend of volatility.\n\n## Conclusion\nGoogle has maintained a strong financial position characterized by solid revenue growth. However, the apparent volatility in other income/expense and operating margins warrants closer scrutiny, as it could impact future profitability. The continuous growth in Google Cloud is a positive indicator and suggests strong potential for the coming quarters.\n\n---\n\nThis report provides a comprehensive overview of Google's financial performance over the past three quarters, highlighting key metrics, trends, and outliers. If you require further details or specific analysis, please let me know!"
}
}
]
},
"settings": {
"executionOrder": "v1"
},
"versionId": "30c9a6f0-8ace-40c3-8ca7-a79fd91c12a7",
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Save Report to Google Docs",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Download File From Google Drive",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Vector Store Tool": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Pinecone Vector Store",
"type": "ai_document",
"index": 0
}
]
]
},
"Pinecone Vector Store": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Embeddings Google Gemini": {
"ai_embedding": [
[
{
"node": "Pinecone Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Google Gemini Chat Model1": {
"ai_languageModel": [
[
{
"node": "Vector Store Tool",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Download File From Google Drive": {
"main": [
[
{
"node": "Pinecone Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Pinecone Vector Store (Retrieval)": {
"ai_vectorStore": [
[
{
"node": "Vector Store Tool",
"type": "ai_vectorStore",
"index": 0
}
]
]
},
"Recursive Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"When clicking \u2018Test workflow\u2019": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Embeddings Google Gemini (retrieval)": {
"ai_embedding": [
[
{
"node": "Pinecone Vector Store (Retrieval)",
"type": "ai_embedding",
"index": 0
}
]
]
},
"List Of Files To Load (Google Sheets)": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,716 @@
{
"id": "2ddwHvuidKc6lZia",
"meta": {
"instanceId": "5b12f258e7b8845a7e4d948aaf2096c942ee796fa3f6edf443a06fe951a6e6e2",
"templateCredsSetupCompleted": true
},
"name": "AI Agent - Cv Resume - Automated Screening , Sorting , Rating and Tracker System",
"tags": [],
"nodes": [
{
"id": "92b75a8f-da03-4545-91ef-da29b88f1cef",
"name": "GDocs - Get Job Desc",
"type": "n8n-nodes-base.googleDocs",
"position": [
220,
120
],
"parameters": {
"operation": "get",
"documentURL": "https://docs.google.com/document/d/12dv1AXaotpJ3ST1nUI-QgCoi5SJjM52zeHmjhwZUtvs/edit?usp=sharing"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "k7j5KUAvAzARmxTu",
"name": "Google Docs account"
}
},
"typeVersion": 2
},
{
"id": "213712d5-f7ef-4c49-bfa6-da02be76a213",
"name": "Google Drive - Resume CV File Created",
"type": "n8n-nodes-base.googleDriveTrigger",
"position": [
-540,
120
],
"parameters": {
"event": "fileCreated",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyHour"
}
]
},
"triggerOn": "specificFolder",
"folderToWatch": {
"__rl": true,
"mode": "list",
"value": "17g2HGxLieONy6EWfsPADvA9IXDp5nJ8p",
"cachedResultUrl": "https://drive.google.com/drive/folders/17g2HGxLieONy6EWfsPADvA9IXDp5nJ8p",
"cachedResultName": "Unfiltered"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "i0k4QgJ8YgVPNgF7",
"name": "Google Drive account"
}
},
"typeVersion": 1
},
{
"id": "31075389-e8c5-431a-b5e1-807422dbcd5f",
"name": "Download Resume File From Gdrive",
"type": "n8n-nodes-base.googleDrive",
"position": [
-220,
120
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {
"fileName": "={{ $json.name }}"
},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "i0k4QgJ8YgVPNgF7",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "367d4e61-a73c-4e47-bd73-690b2a63e0ae",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
720,
-400
],
"parameters": {
"text": "=You are expert backend principal engineer specialize in python. You will compare job description and candidate profile.\n\nThen you will response with decision [REJECTED/KIV/SHORTLISTED].\n, provide a reason and give a score rating\n{ decision, reason , score}\n\nAfter you identify a decision, used the tool in sequence.\n1. Use the relevant tool to move the candidate resume file accordingly to the right folder GoogleDrive:MoveFileToReject or GoogleDrive:MoveFileToShortlisted or GoogleDrive:MoveFileToKIV\n2. Use the Gsheet:UpdateTracker tool to update the tracker status.\n3. Use the Gmail:NotificationTool to infor the candidate name, role, decision and reason\n\n==[JOB-DESC]===\n{{ $json.content }}\n==[/JOB-DESC]===\n\n==[CANDIDATE-DESC]===\n{{ $('Extract from File').item.json.text }}\n \n==[/CANDIDATE-DESC]===\n\n",
"options": {
"systemMessage": "You are expert backend principal engineer specialize in python. You will compare job description and candidate profile.\n\nThen you will response with decision [REJECTED/KIV/SHORTLISTED].\nand provide a reason.\n{ decision, reason}\n\nAfter you identify a decision, used the tool \n1. Use the relevant tool to move the candidate resume file accordingly to the right folder GoogleDrive:MoveFileToReject or GoogleDrive:MoveFileToShortlisted or GoogleDrive:MoveFileToKIV\n2. Use the Gsheet-UpdateTracker tool to update the tracker status.\n"
},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "f2a16cf3-0404-4791-b7d4-64f1909e02c2",
"name": "Extract from File",
"type": "n8n-nodes-base.extractFromFile",
"position": [
-40,
120
],
"parameters": {
"options": {},
"operation": "pdf"
},
"typeVersion": 1
},
{
"id": "98af749e-d4ee-4f9b-bacc-f78a47525077",
"name": "Gmail:Notification",
"type": "n8n-nodes-base.gmailTool",
"position": [
1760,
120
],
"webhookId": "ed0f09b9-4b16-4bf1-af47-208f1e8e3761",
"parameters": {
"sendTo": "aiix.space.noreply@gmail.com",
"message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
"options": {},
"subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}",
"descriptionType": "manual",
"toolDescription": "Gmail:NotificationTool - This tool will notify the candidate name, job role, and status of [shortlisted/kiv/rejected]"
},
"credentials": {
"gmailOAuth2": {
"id": "1cn2wligOf77izLL",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "343f7f0f-d505-448f-a95d-0fc7d3c14730",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
500,
-60
],
"parameters": {
"color": 4,
"width": 660,
"height": 400,
"content": "## 1. Move candidate cv to folder\n "
},
"typeVersion": 1
},
{
"id": "9941231e-7cfb-442e-9593-aed21fe86cf8",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1220,
-60
],
"parameters": {
"color": 4,
"width": 320,
"height": 400,
"content": "## 2. Update tracker\n "
},
"typeVersion": 1
},
{
"id": "bfd181ec-cf79-4320-9acd-f3e35fb499c5",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1640,
-60
],
"parameters": {
"color": 4,
"width": 320,
"height": 400,
"content": "## 3. Send email notification\n "
},
"typeVersion": 1
},
{
"id": "60fd65e7-6e8a-4092-9fce-2dd97e35b236",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-280,
-60
],
"parameters": {
"color": 2,
"width": 380,
"height": 400,
"content": "## Download and read candidate CV Resume\n "
},
"typeVersion": 1
},
{
"id": "d5d3cf16-d84d-4e7d-af75-f5341af20f59",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
100,
-60
],
"parameters": {
"color": 2,
"width": 380,
"height": 400,
"content": "## Read Job Description\n "
},
"typeVersion": 1
},
{
"id": "0ee07985-b24b-492b-a394-2f7097254911",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2040,
-80
],
"parameters": {
"color": 6,
"width": 620,
"height": 1040,
"content": "# AI-Agent : Automated CV Resume Screening Evaluate Rating System\n\n## What is this for?\n### Let AI agent intelligently analyze and rate your Candidate's cv resumes based on your job description. This will help ensure a fast and accurate screening process.\n\n### The Screening AI automatically organizes resumes into appropriate folders, updates statuses and scores in your tracking system, and sends timely notifications—saving you valuable time and effort. \n\n\n### Let AI Agent and automation handle the heavy lifting while you focus on making the best hiring decisions!\n\n\n```\n```\n\n## Prerequisite\n\n### Please follow official n8n integration document on how setup your gdrive,gmail,gdoc,gsheet credentials. \n\n \n```\n```\n\n## How it works?\n\n### Each time you place a new pdf resume in the 'Unfiltered' folder , you will automatically get screening results in the tracker for the candidate. \n\nThe AI agent will help notify email and do CV sorting into appropriate folder.\n\n "
},
"typeVersion": 1
},
{
"id": "aa43af12-fae1-4a98-9cad-7859051baf48",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-620,
-60
],
"parameters": {
"color": 2,
"width": 260,
"height": 400,
"content": "## Add candidate CV Resume into folder\n "
},
"typeVersion": 1
},
{
"id": "7ad2b8a9-3720-4713-a8dd-af8f6745f95d",
"name": "Gdrive:Move-To-Reject-Folder",
"type": "n8n-nodes-base.googleDriveTool",
"position": [
580,
120
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Google Drive - Resume CV File Created').item.json.id }}"
},
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "16BR7dhzd4-6i_kHYRStJd5UdqNWhpXKA",
"cachedResultUrl": "https://drive.google.com/drive/folders/16BR7dhzd4-6i_kHYRStJd5UdqNWhpXKA",
"cachedResultName": "REJECTED"
},
"operation": "move",
"descriptionType": "manual",
"toolDescription": "GoogleDrive:MoveFileToReject\nUse this tool to move rejected candidate profile to reject folder\n "
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "i0k4QgJ8YgVPNgF7",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "921a0561-9733-47fe-a6ee-191abf30ac37",
"name": "Gdrive:Move-To-KIV-Folder",
"type": "n8n-nodes-base.googleDriveTool",
"position": [
800,
120
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Google Drive - Resume CV File Created').item.json.id }}"
},
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1KLfykacUhwtO0-wgYs6WsrcxbCHHKJ7o",
"cachedResultUrl": "https://drive.google.com/drive/folders/1KLfykacUhwtO0-wgYs6WsrcxbCHHKJ7o",
"cachedResultName": "KIV"
},
"operation": "move",
"descriptionType": "manual",
"toolDescription": "GoogleDrive:MoveFileToKIV\nUse this tool to move KIV candidate profile to KIV folder"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "i0k4QgJ8YgVPNgF7",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "0b32131c-3811-406f-a50d-875750781906",
"name": "Gdrive:Move-To-Shortlisted-Folder",
"type": "n8n-nodes-base.googleDriveTool",
"position": [
1000,
120
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Google Drive - Resume CV File Created').item.json.id }}"
},
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1m8vrejmyPWpGsjJc6amnWfSXBRESlpfO",
"cachedResultUrl": "https://drive.google.com/drive/folders/1m8vrejmyPWpGsjJc6amnWfSXBRESlpfO",
"cachedResultName": "SHORTLISTED"
},
"operation": "move",
"descriptionType": "manual",
"toolDescription": "GoogleDrive:MoveFileToShortlisted\nUse this tool to move Shortlisted candidate profile to Shortlisted folder"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "i0k4QgJ8YgVPNgF7",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "98a656c7-bb17-4808-abf8-ef4e23716b60",
"name": "Gsheet: Update Candidate Tracker",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
1340,
120
],
"parameters": {
"columns": {
"value": {
"AI Score": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('AI_Score', ``, 'string') }}",
"AI Reason": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('AI_Reason', ``, 'string') }}",
"AI Verdict": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('AI_Verdict', ``, 'string') }}",
"Candidate Name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Candidate_Name__using_to_match_', ``, 'string') }}"
},
"schema": [
{
"id": "Candidate Name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Candidate Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Current Role",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Current Role",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Role Scope",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Role Scope",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI Score",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "AI Score",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI Verdict",
"type": "string",
"display": true,
"required": false,
"displayName": "AI Verdict",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "AI Reason",
"type": "string",
"display": true,
"required": false,
"displayName": "AI Reason",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Referral",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Referral",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Due date",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Due date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Notes",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Notes",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Human verdict",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Human verdict",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Candidate Name"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 843593464,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SwnbH_dnqPMho7SqX1LKAjFMc0YvLBGok4I1AdgrJjE/edit#gid=843593464",
"cachedResultName": "main"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1SwnbH_dnqPMho7SqX1LKAjFMc0YvLBGok4I1AdgrJjE",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SwnbH_dnqPMho7SqX1LKAjFMc0YvLBGok4I1AdgrJjE/edit?usp=drivesdk",
"cachedResultName": "ResumeScreening- Candidate Tracker"
},
"descriptionType": "manual",
"toolDescription": "Gsheet:UpdateTracker\nThis tool help update relevant candidate status"
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "fqYZ5O9pQ89v3SAp",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "c9eb92a0-f3bc-4226-835e-602a2f808e4c",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1340,
-80
],
"parameters": {
"color": 6,
"width": 600,
"height": 1300,
"content": "\n## Folder & File Setup\n### 1. Create a google-drive folder like this\n \n[View directory example](https://drive.google.com/drive/folders/1Uh7VdJORE03YBJkCmvr1TXg_esbiNnTV?dmr=1&ec=wgc-drive-hero-goto)\n\n![Directory EXAMPLE](https://github.com/dragonjump/n8n-ai-agent-screening/blob/main/screenshot1.png?raw=true)\n\n### 2. Create a job description like this\n \n[View file example](https://docs.google.com/document/d/12dv1AXaotpJ3ST1nUI-QgCoi5SJjM52zeHmjhwZUtvs/edit?usp=drive_link)\n\n![Directory EXAMPLE](https://github.com/dragonjump/n8n-ai-agent-screening/blob/main/screenshot2.png?raw=true)\n\n\n### 3. Configure a tracker like this\n \n[View file example](https://docs.google.com/spreadsheets/d/1SwnbH_dnqPMho7SqX1LKAjFMc0YvLBGok4I1AdgrJjE/edit?gid=843593464#gid=843593464)\n\n![Directory EXAMPLE](https://github.com/dragonjump/n8n-ai-agent-screening/blob/main/screenshot3.png?raw=true)"
},
"typeVersion": 1
},
{
"id": "e0d419d7-dcc1-40c5-afb1-5bda110e681c",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-560,
20
],
"parameters": {
"color": 7,
"width": 150,
"height": 80,
"content": "UNFILTERED FOLDER"
},
"typeVersion": 1
},
{
"id": "d9034b09-41f9-4f27-8d9d-e40f8603e1ea",
"name": "Groq - llama 4 AI MODEL",
"type": "@n8n/n8n-nodes-langchain.lmChatGroq",
"position": [
680,
-200
],
"parameters": {
"model": "meta-llama/llama-4-maverick-17b-128e-instruct",
"options": {}
},
"credentials": {
"groqApi": {
"id": "RBCtAUywXbI6hFmr",
"name": "Groq account -bbflight"
}
},
"typeVersion": 1
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "adba9994-2c2e-40f2-9a73-8a57b48b3bc4",
"connections": {
"AI Agent": {
"main": [
[]
]
},
"Extract from File": {
"main": [
[
{
"node": "GDocs - Get Job Desc",
"type": "main",
"index": 0
}
]
]
},
"Gmail:Notification": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"GDocs - Get Job Desc": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Groq - llama 4 AI MODEL": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Gdrive:Move-To-KIV-Folder": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Gdrive:Move-To-Reject-Folder": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Download Resume File From Gdrive": {
"main": [
[
{
"node": "Extract from File",
"type": "main",
"index": 0
}
]
]
},
"Gsheet: Update Candidate Tracker": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Gdrive:Move-To-Shortlisted-Folder": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Google Drive - Resume CV File Created": {
"main": [
[
{
"node": "Download Resume File From Gdrive",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,563 @@
{
"meta": {
"instanceId": "26ba763460b97c249b82942b23b6384876dfeb9327513332e743c5f6219c2b8e"
},
"nodes": [
{
"id": "51dbe3b4-42f6-43c9-85dc-42ae49be6ba9",
"name": "Get RFP Data",
"type": "n8n-nodes-base.extractFromFile",
"position": [
1003,
278
],
"parameters": {
"options": {},
"operation": "pdf"
},
"typeVersion": 1
},
{
"id": "c42e6bfc-a426-4d12-bf95-f3fe6e944631",
"name": "Item List Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserItemList",
"position": [
2140,
540
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "1703e9c3-f49e-4272-ad11-0b9d4e9a76c6",
"name": "For Each Question...",
"type": "n8n-nodes-base.splitInBatches",
"position": [
2460,
340
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "a54fa4ee-6f67-41a9-89fe-fd9f2bf094de",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
760,
60
],
"parameters": {
"color": 7,
"width": 532.597092515486,
"height": 508.1316876142587,
"content": "## 1. API to Trigger Workflow\n[Read more about using Webhooks](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/)\n\nThis workflow requires the user to submit the RFP document via an API request. It's a common pattern to use the webhook node for this purpose. Be sure to secure this webhook endpoint in production!"
},
"typeVersion": 1
},
{
"id": "fdef005f-7838-4b8c-8af4-4b7c6f947ee2",
"name": "Set Variables",
"type": "n8n-nodes-base.set",
"position": [
1143,
278
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={\n \"doc_title\": \"{{ $('Wait for Request').item.json.body.title }}\",\n \"doc_filename\": \"{{ $('Wait for Request').item.json.body.id }} | {{ $('Wait for Request').item.json.body.title }} | {{ $now.format('yyyyMMddhhmmss') }}| RFP Response\",\n \"reply_to\": \"{{ $('Wait for Request').item.json.body.reply_to }}\"\n}\n"
},
"typeVersion": 3.3
},
{
"id": "a64f6274-62fc-42fb-b7c7-5aa85746c621",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1320,
148.42417112849222
],
"parameters": {
"color": 7,
"width": 493.289385759178,
"height": 418.29352785836636,
"content": "## 2. Create a new Doc to Capture Responses For RFP Questions\n[Read more about working with Google Docs](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledocs/)\n\nFor each RFP we process, let's create its very own document to store the results. It will serve as a draft document for the RFP response."
},
"typeVersion": 1
},
{
"id": "2b3df6af-c1ab-44a1-8907-425944294477",
"name": "Create new RFP Response Document",
"type": "n8n-nodes-base.googleDocs",
"position": [
1420,
340
],
"parameters": {
"title": "={{ $json.doc_filename }}",
"folderId": "=1y0I8MH32maIWCJh767mRE_NMHC6A3bUu"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "V0G0vi1DRj7Cqbp9",
"name": "Google Docs account"
}
},
"typeVersion": 2
},
{
"id": "0bf30bef-2910-432b-b5eb-dee3fe39b797",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1840,
110.52747078833045
],
"parameters": {
"color": 7,
"width": 500.1029039641811,
"height": 599.9895116376663,
"content": "## 3. Identifying Questions using AI\n[Read more about Question & Answer Chain](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainretrievalqa/)\n\nUsing the power of LLMs, we're able to extract the RFP questionnaire regardless of original formatting or layout. This allows AutoRFP to handle a wide range of RFPs without requiring explicit extraction rules for edge cases.\n\nAdditionally, We'll use the Input List Output Parser to return a list of questions for further processing."
},
"typeVersion": 1
},
{
"id": "1c064047-1f6a-47c8-bb49-85b4d6f8e854",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
2380,
84.66944065837868
],
"parameters": {
"color": 7,
"width": 746.3888903304862,
"height": 600.3660610069576,
"content": "## 4. Generating Question & Answer Pairs with AI\n[Read more about using OpenAI Assistants in n8n](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai/)\n\nBy preparing an OpenAI Assistant with marketing material and sales documents about our company and business, we are able to use AI to answer RFP questions with the accurate and relevant context. Potentially allowing sales teams to increase the number of RFPs they can reply to.\n\nThis portion of the workflow loops through and answers each question individually for better answers. We can record the Question and Answer pairings to the RFP response document we created earlier."
},
"typeVersion": 1
},
{
"id": "e663ba01-e9a6-4247-9d97-8f796d29d72a",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1960,
540
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "ec0b439e-9fd8-4960-b8bb-04f4f7814a0a",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
300,
60
],
"parameters": {
"width": 421.778219154496,
"height": 515.8006969458895,
"content": "## Try It Out!\n\n**This workflow does the following:**\n* Receives a RFP document via webhook\n* Creates a new RFP response document via Google Docs\n* Uses LLMs to extract the questions from the RFP document into a questions list\n* Loops through each question and uses an OpenAI Assistant to generate an answer. Saving each answer into the response document.\n* Once complete, sends a gmail and slack notification to the team.\n\n\n\ud83d\udcc3**Example Documents**\nTo run this workflow, you'll need to following 2 documents:\n* [RFP Document](https://drive.google.com/file/d/1G42h4Vz2lBuiNCnOiXF_-EBP1MaIEVq5/view?usp=sharing)\n* [Example Company Document](https://drive.google.com/file/d/16WywCYcxBgYHXB3TY3wXUTyfyG2n_BA0/view?usp=sharing)\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!"
},
"typeVersion": 1
},
{
"id": "244ff32d-9bc4-4a67-a6c2-4a7dc308058e",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
3160,
80
],
"parameters": {
"color": 7,
"width": 474.3513281516049,
"height": 390.51033452105344,
"content": "## 5. Send Notification Once Completed\n[Read more about using Slack](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack)\n\n\nFinally, we can use a number of ways to notify the sales team when the process is complete. Here, we've opted to send the requesting user an email with a link to the RFP response document."
},
"typeVersion": 1
},
{
"id": "94243b69-43b8-4731-9a6b-2934db832cc6",
"name": "Send Chat Notification",
"type": "n8n-nodes-base.slack",
"position": [
3440,
280
],
"parameters": {
"text": "=RFP document \"{{ $('Set Variables').item.json.title }}\" completed!",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "name",
"value": "RFP-channel"
},
"otherOptions": {}
},
"credentials": {
"slackApi": {
"id": "VfK3js0YdqBdQLGP",
"name": "Slack account"
}
},
"typeVersion": 2.1
},
{
"id": "391d7e07-2a6d-4c4d-bf42-9cc5466cc1b5",
"name": "Send Email Notification",
"type": "n8n-nodes-base.gmail",
"position": [
3240,
280
],
"parameters": {
"sendTo": "={{ $('Set Variables').item.json.reply_to }}",
"message": "=Your RFP document \"{{ $('Set Variables').item.json.title }}\" is now complete!",
"options": {},
"subject": "=RFP Questionnaire \"{{ $('Set Variables').item.json.title }}\" Completed!",
"emailType": "text"
},
"credentials": {
"gmailOAuth2": {
"id": "Sf5Gfl9NiFTNXFWb",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "34115f45-21ff-49a0-95f4-1fed53b53583",
"name": "Add Metadata to Response Doc",
"type": "n8n-nodes-base.googleDocs",
"position": [
1600,
340
],
"parameters": {
"actionsUi": {
"actionFields": [
{
"text": "=Title: {{ $('Set Variables').item.json.doc_title }}\nDate generated: {{ $now.format(\"yyyy-MM-dd @ hh:mm\") }}\nRequested by: {{ $('Set Variables').item.json.reply_to }}\nExecution Id: http://localhost:5678/workflow/{{ $workflow.id }}/executions/{{ $execution.id }}\n\n---\n\n",
"action": "insert"
}
]
},
"operation": "update",
"documentURL": "={{ $json.id }}"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "V0G0vi1DRj7Cqbp9",
"name": "Google Docs account"
}
},
"typeVersion": 2
},
{
"id": "f285d896-ba15-4f8a-b041-7cbcbe2e1050",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
783,
238
],
"parameters": {
"width": 192.30781285767205,
"height": 306.5264325350084,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ud83d\udea8**Required**\n* Use a tool such as Postman to send data to the webhook."
},
"typeVersion": 1
},
{
"id": "b6e4e40e-b10b-48f2-bfe2-1ad38b1c6518",
"name": "Record Question & Answer in Response Doc",
"type": "n8n-nodes-base.googleDocs",
"position": [
2940,
460
],
"parameters": {
"actionsUi": {
"actionFields": [
{
"text": "={{ $runIndex+1 }}. {{ $json.content }}\n{{ $json.output }}\n\n",
"action": "insert"
}
]
},
"operation": "update",
"documentURL": "={{ $('Create new RFP Response Document').item.json.id }}"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "V0G0vi1DRj7Cqbp9",
"name": "Google Docs account"
}
},
"typeVersion": 2
},
{
"id": "ae8cc28f-4fd3-41d7-8a30-2675f58d1067",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
2600,
440
],
"parameters": {
"width": 306.8994213707367,
"height": 481.01365258903786,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ud83d\udea8**Required**\nYou'll need to create an OpenAI Assistant to use this workflow.\n* Sign up for [OpenAI Dashboard](https://platform.openai.com) if you haven't already.\n* Create an [OpenAI Assistant](https://platform.openai.com/playground/assistants)\n* Upload the [example company doc](https://drive.google.com/file/d/16WywCYcxBgYHXB3TY3wXUTyfyG2n_BA0/view?usp=sharing) to the assistant.\n\nThe assistant will use the company doc to answer the questions."
},
"typeVersion": 1
},
{
"id": "81825554-5cbe-469b-8511-a92d5ea165cb",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
3200,
460
],
"parameters": {
"width": 386.79263167741857,
"height": 94.04968721739164,
"content": "\ud83d\udea8**Required**\n* Update the email address to send to in Gmail Node.\n* Update the channel and message for Slack."
},
"typeVersion": 1
},
{
"id": "25a57ca0-6789-499c-873b-07aba40530ed",
"name": "Answer Question with Context",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2620,
460
],
"parameters": {
"text": "={{ $json.response.text }}",
"prompt": "define",
"options": {},
"resource": "assistant",
"assistantId": {
"__rl": true,
"mode": "list",
"value": "asst_QBI5lLKOsjktr3DRB4MwrgZd",
"cachedResultName": "Nexus Digital Solutions Bot"
}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1.3
},
{
"id": "1b4cc83b-a793-47c1-9dd6-0d7484db07b4",
"name": "Wait for Request",
"type": "n8n-nodes-base.webhook",
"position": [
823,
278
],
"webhookId": "35e874df-2904-494e-a9f5-5a3f20f517f8",
"parameters": {
"path": "35e874df-2904-494e-a9f5-5a3f20f517f8",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 2
},
{
"id": "2f97e3e6-c100-4045-bcb3-6fbd17cfb420",
"name": "Extract Questions From RFP",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
1960,
380
],
"parameters": {
"text": "=You have been given a RFP document as part of a tender process of a buyer. Please extract all questions intended for the supplier. You must ensure the questions extracted are exactly has they are written in the RFP document.\n\n<RFP>{{ $('Get RFP Data').item.json.text }}<RFP>",
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.4
},
{
"id": "4945b975-ac84-406e-8482-44cfa5679ef9",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
760,
600
],
"parameters": {
"color": 5,
"width": 529.9947173986736,
"height": 157.64231937074243,
"content": "### Example Webhook Request\ncurl --location 'https://<n8n_webhook_url>' \\\n--form 'id=\"RFP001\"' \\\n--form 'title=\"BlueChip Travel and StarBus Web Services\"' \\\n--form 'reply_to=\"jim@example.com\"' \\\n--form 'data=@\"k9pnbALxX/RFP Questionnaire.pdf\"'\n"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Get RFP Data": {
"main": [
[
{
"node": "Set Variables",
"type": "main",
"index": 0
}
]
]
},
"Set Variables": {
"main": [
[
{
"node": "Create new RFP Response Document",
"type": "main",
"index": 0
}
]
]
},
"Wait for Request": {
"main": [
[
{
"node": "Get RFP Data",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Extract Questions From RFP",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"For Each Question...": {
"main": [
[
{
"node": "Send Email Notification",
"type": "main",
"index": 0
}
],
[
{
"node": "Answer Question with Context",
"type": "main",
"index": 0
}
]
]
},
"Item List Output Parser": {
"ai_outputParser": [
[
{
"node": "Extract Questions From RFP",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Send Email Notification": {
"main": [
[
{
"node": "Send Chat Notification",
"type": "main",
"index": 0
}
]
]
},
"Extract Questions From RFP": {
"main": [
[
{
"node": "For Each Question...",
"type": "main",
"index": 0
}
]
]
},
"Add Metadata to Response Doc": {
"main": [
[
{
"node": "Extract Questions From RFP",
"type": "main",
"index": 0
}
]
]
},
"Answer Question with Context": {
"main": [
[
{
"node": "Record Question & Answer in Response Doc",
"type": "main",
"index": 0
}
]
]
},
"Create new RFP Response Document": {
"main": [
[
{
"node": "Add Metadata to Response Doc",
"type": "main",
"index": 0
}
]
]
},
"Record Question & Answer in Response Doc": {
"main": [
[
{
"node": "For Each Question...",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,521 @@
{
"id": "fqaNojXWrspqjfkY",
"meta": {
"instanceId": "69133932b9ba8e1ef14816d0b63297bb44feb97c19f759b5d153ff6b0c59e18d"
},
"name": "RAG Workflow For Stock Earnings Report Analysis",
"tags": [],
"nodes": [
{
"id": "1a621f76-9636-430d-94dd-d5e7dcd5afdc",
"name": "Pinecone Vector Store",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
380,
-60
],
"parameters": {
"mode": "insert",
"options": {},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "company-earnings",
"cachedResultName": "company-earnings"
}
},
"credentials": {
"pineconeApi": {
"id": "bQTNry52ypGLqt47",
"name": "PineconeApi account"
}
},
"typeVersion": 1
},
{
"id": "e5936e45-0f58-48e9-9ab4-cc69f2ef6578",
"name": "Embeddings Google Gemini",
"type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
"position": [
300,
220
],
"parameters": {
"modelName": "models/text-embedding-004"
},
"credentials": {
"googlePalmApi": {
"id": "jLOqyTR4yTT1nYKi",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "e98dbc8e-6b4a-415d-a044-85e590fcb105",
"name": "Default Data Loader",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
520,
200
],
"parameters": {
"loader": "pdfLoader",
"options": {},
"dataType": "binary"
},
"typeVersion": 1
},
{
"id": "ae77f5f4-3704-4b66-9c3f-27d6bd3f68c3",
"name": "Recursive Character Text Splitter",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
560,
380
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "d939c9db-0edc-4205-b8e5-fb34b0076510",
"name": "Loop Over Items",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-120,
-60
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "4f8421b4-1a11-4ac3-a9ca-1d725a8ec98e",
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-360,
640
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c9e2ec39-c34d-4d8e-b772-d1c1cd823d9e",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-40,
640
],
"parameters": {
"text": "Give me a report on Google's last 3 quarter earnings. Format it in markdown. Focus on the differences and trends. Spot any outliers.",
"options": {
"systemMessage": "You are a highly skilled financial analyst specializing in analyzing Google's (Alphabet Inc.) financial performance. You have access to two powerful tools:\n\n1. **Vector Store Tool:** This tool allows you to retrieve relevant information from the past three quarters of Google's earnings reports (PDF documents). The documents have been processed and stored as embeddings in a vector database, enabling semantic search. Use this tool to find specific information related to revenue, expenses, profits, losses, growth, key metrics, management commentary, and any other relevant financial data.\n2. **Google Docs Tool:** This tool allows you to create, edit, and format Google Docs. Use this tool to save your findings into a Google Doc.\n\nYour task is to answer user queries related to Google's financial performance based on the last three quarters' earnings reports. When a user asks a question:\n\n1. **Understand the User's Intent:** Carefully analyze the user's query to determine what specific financial information they are seeking. Identify keywords, timeframes (e.g., \"previous quarter\"), and the type of analysis requested (e.g., trend analysis, comparison, explanation).\n2. **Retrieve Relevant Information:** Use the Vector Store Tool to search for and retrieve the most relevant text passages from the earnings reports that address the user's query. Retrieve multiple, diverse chunks to ensure comprehensive coverage.\n3. **Synthesize and Analyze:** Analyze the information from the retrieved text chunks. Identify key trends, patterns, and insights related to the user's query.\n4. **Generate Report in Google Docs:** Use the Google Docs Tool to create a new Google Doc (or append to an existing one, if specified by the user). Structure the report with clear headings, bullet points, and concise paragraphs. Include the following in your report as appropriate:\n * **Executive Summary:** A brief overview of the key findings.\n * **Revenue Analysis:** Report on revenue figures, growth rates, and key revenue drivers.\n * **Expense Analysis:** Report on major expense categories and their impact on profitability.\n * **Profitability Analysis:** Discuss net income, profit margins, and earnings per share (EPS).\n * **Key Metrics:** Include other relevant financial metrics mentioned in the reports (e.g., operating income, cash flow, segment performance).\n * **Management Commentary:** Summarize any relevant insights or explanations provided by Google's management in the earnings calls or reports.\n * **Trend Analysis:** Compare the current quarter's performance to the previous two quarters, highlighting significant changes or trends.\n * **Visualizations:** If possible, use the Google Docs tool to insert basic charts or tables to visually represent the data. (You might need to guide the user on how to do this if the tool has limitations.)\n5. **Cite Sources:** Clearly indicate the source of your information (e.g., \"Q2 2023 Earnings Report\") for each data point or analysis.\n6. **Maintain a Professional Tone:** Write in a clear, concise, and objective tone, as expected of a financial analyst. Avoid speculation or making unsubstantiated claims.\n\nYour ultimate goal is to provide the user with a well-structured, informative, and accurate financial report based on the data available in the last three quarters of Google's earnings reports.\nSave the report in as a Google Doc using the available tool!"
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "40534b4d-3061-4054-8c0a-b08fe32deaf7",
"name": "Vector Store Tool",
"type": "@n8n/n8n-nodes-langchain.toolVectorStore",
"position": [
360,
860
],
"parameters": {
"name": "company_financial_earnings_data_tool",
"description": "Retrieve information about the last 3 quarters of Google Earnings"
},
"typeVersion": 1
},
{
"id": "c584d5f6-1fac-420f-a28d-71f51b555e67",
"name": "Google Gemini Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
620,
1060
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash-exp"
},
"credentials": {
"googlePalmApi": {
"id": "jLOqyTR4yTT1nYKi",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "f4f993d0-c80a-4f26-bc51-fe7df1012606",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-160,
860
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "tQLWnWRzD8aebYvp",
"name": "OpenAi account"
}
},
"typeVersion": 1.1
},
{
"id": "4aa3726e-a105-4bfe-b1df-06c3c9ece18a",
"name": "Pinecone Vector Store (Retrieval)",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
260,
1080
],
"parameters": {
"options": {},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "company-earnings",
"cachedResultName": "company-earnings"
}
},
"credentials": {
"pineconeApi": {
"id": "bQTNry52ypGLqt47",
"name": "PineconeApi account"
}
},
"typeVersion": 1
},
{
"id": "e08dd92a-a7a1-4204-bef9-54611a2dee92",
"name": "Save Report to Google Docs",
"type": "n8n-nodes-base.googleDocs",
"position": [
460,
640
],
"parameters": {
"actionsUi": {
"actionFields": [
{
"text": "={{ $json.output }}",
"action": "insert"
}
]
},
"operation": "update",
"documentURL": "1aOUl-mnCaI4__tULmBZSvWlOQhTHdD-RUPesP7_sFT4"
},
"credentials": {
"googleDocsOAuth2Api": {
"id": "nnE7RqZglLn8XarL",
"name": "Google Docs account"
}
},
"typeVersion": 2
},
{
"id": "1984765a-3148-4bcf-9d20-fe29291fda6d",
"name": "Embeddings Google Gemini (retrieval)",
"type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
"position": [
240,
1260
],
"parameters": {
"modelName": "models/text-embedding-004"
},
"credentials": {
"googlePalmApi": {
"id": "jLOqyTR4yTT1nYKi",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "9b0bff2e-06f4-4c89-b9dc-c54cfb79577c",
"name": "List Of Files To Load (Google Sheets)",
"type": "n8n-nodes-base.googleSheets",
"position": [
-380,
-60
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1476836405,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ckP-ZgAMs2l2sFUpLAXx-gWNOQrHXoAs48Vo271X3rs/edit#gid=1476836405",
"cachedResultName": "GOOG"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1ckP-ZgAMs2l2sFUpLAXx-gWNOQrHXoAs48Vo271X3rs",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ckP-ZgAMs2l2sFUpLAXx-gWNOQrHXoAs48Vo271X3rs/edit?usp=drivesdk",
"cachedResultName": "Watchlist"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "sRJmS2k8zdqVjtJL",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "b0d58ce5-9ac0-4f0f-ac7c-d6cb27551d82",
"name": "Download File From Google Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
160,
-60
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "url",
"value": "={{ $('List Of Files To Load (Google Sheets)').item.json['File URL'] }}"
},
"options": {
"fileName": "={{ $('List Of Files To Load (Google Sheets)').item.json['10Q'] }}"
},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "uixLsi5TmrfwXPeB",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "28817b3d-fb54-4dc2-83bc-3ac27320712b",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1100,
80
],
"parameters": {
"width": 500,
"height": 740,
"content": "## Set up steps\n1. Google Cloud Project & Vertex AI API:\n\t* Create a Google Cloud project.\n\t* Enable the Vertex AI API for your project.\n2. Google AI API key:\n\t* Obtain a Google AI API key from Google AI Studio.\n3. Pinecone account and API key:\n\t* Create a free account on the Pinecone website.\n\t* Obtain your API key from your Pinecone dashboard.\n\t* Create an index named company-earnings in your Pinecone project.\n4. Google Drive - download and save financial documents:\n\t* Go to a company you want to analize and download their quarterly earnings PDFs\n\t* Save the PDFs in Google Drive\n\t* Create a Google Sheet that stores a list of file URLs pointing to the PDFs you downloaded and saved to Google Drive\n5. Configure credentials in your n8n environment for:\n\t* Google Sheets OAuth2\n\t* Google Drive OAuth2\n\t* Google Docs OAuth2\n\t* Google Gemini(PaLM) Api (using your Google AI API key)\n\t* Pinecone API (using your Pinecone API key)\n6. Import and configure the workflow:\n\t* Import this workflow into your n8n instance.\n\t* Update the List Of Files To Load (Google Sheets) node to point to your Google Sheet.\n\t* Update the Download File From Google Drive to point to the column where the file URLs are\n\t* Update the Save Report to Google Docs node to point to your Google Doc where you want the report saved."
},
"typeVersion": 1
},
{
"id": "eecb1c25-c019-44e4-b254-a919f80faee7",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
380,
-260
],
"parameters": {
"content": "## Loading data to Pinecone vector store"
},
"typeVersion": 1
},
{
"id": "8371f7f8-29a7-4711-b635-d5538f3441b8",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-40,
460
],
"parameters": {
"content": "## AI Agent Report Generation using RAG"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {
"AI Agent": [
{
"json": {
"output": "# Google (Alphabet Inc.) Financial Report: Last 3 Quarters\n\n## Executive Summary\nGoogle has demonstrated solid revenue growth across the last three quarters, although there are notable fluctuations in operating income, net income, and other income/expense categories. While revenue from both Google Services and Cloud shows consistent year-over-year growth, the operating margins have shown variability. \n\n## Revenue Analysis\n- **Quarter 1:**\n - **Revenue:** $80.5 billion, a 15% year-over-year increase.\n - **Google Services Revenue:** Up $8.4 billion (14%).\n - **Google Cloud Revenue:** Up $2.1 billion (28%).\n\n- **Quarter 2:**\n - **Revenue:** $84.7 billion, a 14% year-over-year increase.\n - **Google Services Revenue:** Up $7.6 billion (12%).\n - **Google Cloud Revenue:** Up $2.3 billion (29%).\n\n- **Quarter 3:**\n - **Revenue:** $88.3 billion, a 15% year-over-year increase.\n - **Google Services Revenue:** Up $8.5 billion (13%).\n - **Google Cloud Revenue:** Up $2.9 billion (35%).\n\n### Key Trends\n- Consistent revenue growth across all three quarters.\n- Strong growth in Google Cloud, indicating it is a significant area of expansion.\n\n## Expense Analysis\n- **Cost of Revenue:**\n - **Quarter 1:** $33.7 billion (up 10% year-over-year).\n - Reason for increase: Higher total acquisition costs, content acquisition costs, and depreciation.\n\n- **Operating Income:**\n - **Quarter 1:** $17.415 billion (25% operating margin).\n - **Quarter 2:** $21.838 billion (29% operating margin).\n - **Quarter 3:** $21.343 billion (28% operating margin).\n\n### Observations\n- Operating margins have fluctuated, while overall costs have continued to rise.\n \n## Profitability Analysis\n- **Net Income:**\n - **Quarter 1:** $15.051 billion.\n - **Quarter 2:** $18.368 billion.\n - **Quarter 3:** $19.689 billion.\n \n- **Diluted EPS:**\n - **Quarter 1:** $1.17.\n - **Quarter 2:** $1.44.\n - **Quarter 3:** $1.55.\n\n### Summary\nWhile net income has increased, the fluctuations in other income and expense metrics have affected profitability.\n\n## Key Metrics\n- **Operating Margins:**\n - Q1: 25%\n - Q2: 29%\n - Q3: 28%\n\n- **Other Income (Expense), Net:**\n - Q1: $790 million.\n - Q2: $65 million.\n - Q3: -$146 million. (Downturn to a negative number)\n\n## Management Commentary\nManagement has pointed out that increased revenue performance in Google Cloud is encouraging, especially given the challenges in the overall economic environment.\n\n## Trend Analysis\n- **Comparative Performance:**\n - Revenue trends show consistency, ranging from 14%-15% growth year-over-year.\n - Operating income showed a decreasing trend from Q1 ($17.415 billion) to Q2 ($21.838 billion) and slightly decreased again in Q3 ($21.343 billion).\n \n### Noteworthy Observations\n- **Outliers:**\n - Significant volatility in other income/expense net, transitioning from $790 million in Q1 to a loss of $146 million in Q3.\n \n- **Operating Margins:** \n - Variability seen in margins from Q1 (25%) to Q2 (29%) and back down to Q3 (28%) shows a trend of volatility.\n\n## Conclusion\nGoogle has maintained a strong financial position characterized by solid revenue growth. However, the apparent volatility in other income/expense and operating margins warrants closer scrutiny, as it could impact future profitability. The continuous growth in Google Cloud is a positive indicator and suggests strong potential for the coming quarters.\n\n---\n\nThis report provides a comprehensive overview of Google's financial performance over the past three quarters, highlighting key metrics, trends, and outliers. If you require further details or specific analysis, please let me know!"
}
}
]
},
"settings": {
"executionOrder": "v1"
},
"versionId": "30c9a6f0-8ace-40c3-8ca7-a79fd91c12a7",
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Save Report to Google Docs",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Download File From Google Drive",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Vector Store Tool": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Pinecone Vector Store",
"type": "ai_document",
"index": 0
}
]
]
},
"Pinecone Vector Store": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Embeddings Google Gemini": {
"ai_embedding": [
[
{
"node": "Pinecone Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Google Gemini Chat Model1": {
"ai_languageModel": [
[
{
"node": "Vector Store Tool",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Download File From Google Drive": {
"main": [
[
{
"node": "Pinecone Vector Store",
"type": "main",
"index": 0
}
]
]
},
"Pinecone Vector Store (Retrieval)": {
"ai_vectorStore": [
[
{
"node": "Vector Store Tool",
"type": "ai_vectorStore",
"index": 0
}
]
]
},
"Recursive Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"When clicking Test workflow": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Embeddings Google Gemini (retrieval)": {
"ai_embedding": [
[
{
"node": "Pinecone Vector Store (Retrieval)",
"type": "ai_embedding",
"index": 0
}
]
]
},
"List Of Files To Load (Google Sheets)": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
}
}
}