n8n automations part 1
This commit is contained in:
915
AI Agent To Chat With Files In Supabase Storage.txt
Normal file
915
AI Agent To Chat With Files In Supabase Storage.txt
Normal file
@@ -0,0 +1,915 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "6a2a7715680b8313f7cb4676321c5baa46680adfb913072f089f2766f42e43bd"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "f577f6bd-b1a4-48ec-9329-7bccc3fc1463",
|
||||
"name": "Get All files",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
400,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://yqtvdcvjboenlblgcivl.supabase.co/storage/v1/object/list/private",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"prefix\": \"\",\n \"limit\": 100,\n \"offset\": 0,\n \"sortBy\": {\n \"column\": \"name\",\n \"order\": \"asc\"\n }\n}",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"nodeCredentialType": "supabaseApi"
|
||||
},
|
||||
"credentials": {
|
||||
"supabaseApi": {
|
||||
"id": "t8AQJzvZvrOMDLec",
|
||||
"name": "Supabase account My Airtable Gen"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "10693bc8-560d-4cf6-8bd0-2fe3f4d863d1",
|
||||
"name": "Default Data Loader",
|
||||
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
|
||||
"position": [
|
||||
1780,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"metadata": {
|
||||
"metadataValues": [
|
||||
{
|
||||
"name": "=file_id",
|
||||
"value": "={{ $json.id }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"jsonData": "={{ $('Merge').item.json.data ?? $('Merge').item.json.text }}",
|
||||
"jsonMode": "expressionData"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "49428060-e707-4269-8344-77b301f56f7c",
|
||||
"name": "Recursive Character Text Splitter",
|
||||
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
|
||||
"position": [
|
||||
1780,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"chunkSize": 500,
|
||||
"chunkOverlap": 200
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "08742063-e235-4874-a128-b352786b19ce",
|
||||
"name": "Extract Document PDF",
|
||||
"type": "n8n-nodes-base.extractFromFile",
|
||||
"position": [
|
||||
1240,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"operation": "pdf"
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "21f19360-d7ce-4106-ae5a-aa0f15b7c4aa",
|
||||
"name": "Embeddings OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"position": [
|
||||
1600,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"model": "text-embedding-3-small",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "fLfRtaXbR0EVD0pl",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4147409f-8686-418f-b979-04f8c8e7fe42",
|
||||
"name": "Create File record2",
|
||||
"type": "n8n-nodes-base.supabase",
|
||||
"position": [
|
||||
1540,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"tableId": "files",
|
||||
"fieldsUi": {
|
||||
"fieldValues": [
|
||||
{
|
||||
"fieldId": "name",
|
||||
"fieldValue": "={{ $('Loop Over Items').item.json.name }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "storage_id",
|
||||
"fieldValue": "={{ $('Loop Over Items').item.json.id }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"supabaseApi": {
|
||||
"id": "t8AQJzvZvrOMDLec",
|
||||
"name": "Supabase account My Airtable Gen"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "016f1afe-172b-4609-b451-8d67609214d3",
|
||||
"name": "If",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
720,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "9b14e306-a04d-40f7-bc5b-b8eda8d8f7f2",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ \n !$('Aggregate').item.json.data || \n !Array.isArray($('Aggregate').item.json.data) || \n !$('Aggregate').item.json.data.some(item => \n item.storage_id === $('Loop Over Items').item.json.id \n ) \n}}",
|
||||
"rightValue": ""
|
||||
},
|
||||
{
|
||||
"id": "c3c0af88-9aea-4539-8948-1b69e601c27c",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "notEquals"
|
||||
},
|
||||
"leftValue": "={{ $json.name }}",
|
||||
"rightValue": ".emptyFolderPlaceholder"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "75e8a7db-8c4a-4ad8-b902-062cbc93e1eb",
|
||||
"name": "Get All Files",
|
||||
"type": "n8n-nodes-base.supabase",
|
||||
"position": [
|
||||
20,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"tableId": "files",
|
||||
"operation": "getAll"
|
||||
},
|
||||
"credentials": {
|
||||
"supabaseApi": {
|
||||
"id": "t8AQJzvZvrOMDLec",
|
||||
"name": "Supabase account My Airtable Gen"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "b22a3bab-f615-4d8a-8832-ce25b1a385fe",
|
||||
"name": "Download",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
900,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://yqtvdcvjboenlblgcivl.supabase.co/storage/v1/object/private/{{ $json.name }}",
|
||||
"options": {},
|
||||
"authentication": "predefinedCredentialType",
|
||||
"nodeCredentialType": "supabaseApi"
|
||||
},
|
||||
"credentials": {
|
||||
"supabaseApi": {
|
||||
"id": "t8AQJzvZvrOMDLec",
|
||||
"name": "Supabase account My Airtable Gen"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "50d1fede-4bd0-4cd4-b74a-7d689fe211cc",
|
||||
"name": "Loop Over Items",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
560,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"batchSize": "=1"
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "f9c23b5e-0b40-4886-b54f-59fb46132d3f",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-160,
|
||||
-100
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0a0ec290-2c3d-40ba-8d03-6abf75202e73",
|
||||
"name": "Aggregate",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
220,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData"
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "32b3e2e1-2d25-4dd1-93e8-3f693beb7b6f",
|
||||
"name": "When chat message received",
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"position": [
|
||||
800,
|
||||
-1020
|
||||
],
|
||||
"webhookId": "3c40d311-7996-4ed4-b2fa-c73bea5f4cf5",
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "79073b5c-a4ad-45a6-bbfa-e900a05bfde3",
|
||||
"name": "OpenAI Chat Model1",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
940,
|
||||
-820
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "zJhr5piyEwVnWtaI",
|
||||
"name": "OpenAi club"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f8663483-76d5-4fc8-ad07-7eec815ff7a6",
|
||||
"name": "Embeddings OpenAI2",
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"position": [
|
||||
1020,
|
||||
-540
|
||||
],
|
||||
"parameters": {
|
||||
"model": "text-embedding-3-small",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "SphXAX7rlwRLkiox",
|
||||
"name": "Test club key"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a1458799-d379-46de-93e6-a5ba0c665163",
|
||||
"name": "OpenAI Chat Model2",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1300,
|
||||
-680
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "SphXAX7rlwRLkiox",
|
||||
"name": "Test club key"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d6eeda2f-c984-406d-a625-726840308413",
|
||||
"name": "Vector Store Tool1",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolVectorStore",
|
||||
"position": [
|
||||
1100,
|
||||
-820
|
||||
],
|
||||
"parameters": {
|
||||
"name": "knowledge_base",
|
||||
"topK": 8,
|
||||
"description": "Retrieve data about user request"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e1d9a348-7d44-4ad1-adbd-2c9a31e06876",
|
||||
"name": "Switch",
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"position": [
|
||||
1060,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"rules": {
|
||||
"values": [
|
||||
{
|
||||
"outputKey": "txt",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 1,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{$binary.data?.fileExtension == undefined }}",
|
||||
"rightValue": "txt"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "pdf",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 1,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "bf04cbec-dd86-4607-988f-4c96b6fd4b58",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{$binary.data.fileExtension }}",
|
||||
"rightValue": "pdf"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.1
|
||||
},
|
||||
{
|
||||
"id": "d38afb92-87ae-4e2a-a712-ec24b1efd105",
|
||||
"name": "Insert into Supabase Vectorstore",
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
|
||||
"position": [
|
||||
1700,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "insert",
|
||||
"options": {
|
||||
"queryName": "match_documents"
|
||||
},
|
||||
"tableName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "documents",
|
||||
"cachedResultName": "documents"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"supabaseApi": {
|
||||
"id": "t8AQJzvZvrOMDLec",
|
||||
"name": "Supabase account My Airtable Gen"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1a903b2e-cab0-4798-b820-ec08d6a71ddd",
|
||||
"name": "Merge",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1380,
|
||||
-100
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "3afd552e-4995-493e-9cd5-ef496dfe359f",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
1020,
|
||||
-1020
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "d9688acc-311b-42fd-afa8-2c0e493be34b",
|
||||
"name": "Supabase Vector Store",
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
|
||||
"position": [
|
||||
1020,
|
||||
-660
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"metadata": {
|
||||
"metadataValues": [
|
||||
{
|
||||
"name": "file_id",
|
||||
"value": "300b0128-0955-4058-b0d3-a9aefe728432"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"tableName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "documents",
|
||||
"cachedResultName": "documents"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"supabaseApi": {
|
||||
"id": "t8AQJzvZvrOMDLec",
|
||||
"name": "Supabase account My Airtable Gen"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "66df007c-0418-4551-950e-32e7d79840bd",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
340,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"height": 89.3775420487804,
|
||||
"content": "### Replace Storage name, database ID and credentials."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b164b520-20dd-44a4-aa3b-647391786b20",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-20,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"height": 80,
|
||||
"content": "### Replace credentials."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8688c219-5af4-4e54-9fd1-91851829445b",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1540,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"height": 80,
|
||||
"content": "### Replace credentials."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "45c6ece4-f849-4496-8149-31385f5e36a4",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
840,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"height": 89.3775420487804,
|
||||
"content": "### Replace Storage name, database ID and credentials."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2ca07cb0-b5f4-4761-b954-faf2131872d9",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1500,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"height": 80,
|
||||
"content": "### Replace credentials."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8d682dae-6f88-42f0-a717-affffd37d882",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1140,
|
||||
-520
|
||||
],
|
||||
"parameters": {
|
||||
"height": 80,
|
||||
"content": "### Replace credentials."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "796b5dca-d60e-43a9-afe8-194244643557",
|
||||
"name": "Sticky Note9",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-520,
|
||||
-940
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 330.5152611046425,
|
||||
"height": 239.5888196628349,
|
||||
"content": "### ... or watch set up video [10 min]\n[](https://www.youtube.com/watch?v=glWUkdZe_3w)\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "eba121de-a3f7-4ba5-8396-f7d64e648322",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-820,
|
||||
-1460
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 636.2128494576581,
|
||||
"height": 497.1532689930921,
|
||||
"content": "\n## AI Agent To Chat With Files In Supabase Storage\n**Made by [Mark Shcherbakov](https://www.linkedin.com/in/marklowcoding/) from community [5minAI](https://www.skool.com/5minai-2861)**\n\nManually retrieving and analyzing specific information from large document repositories is time-consuming and inefficient. This workflow automates the process by vectorizing documents and enabling AI-powered interactions, making it easy to query and retrieve context-based information from uploaded files.\n\nThe workflow integrates Supabase with an AI-powered chatbot to process, store, and query text and PDF files. The steps include:\n- Fetching and comparing files to avoid duplicate processing.\n- Handling file downloads and extracting content based on the file type.\n- Converting documents into vectorized data for contextual information retrieval.\n- Storing and querying vectorized data from a Supabase vector store.\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "df054036-d6b9-4f53-86cb-85ad96f07d0e",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-820,
|
||||
-940
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 280.2462120317618,
|
||||
"height": 545.9087885077763,
|
||||
"content": "### Set up steps\n\n1. **Fetch File List from Supabase**:\n - Use Supabase to retrieve the stored file list from a specified bucket.\n - Add logic to manage empty folder placeholders returned by Supabase, avoiding incorrect processing.\n\n2. **Compare and Filter Files**:\n - Aggregate the files retrieved from storage and compare them to the existing list in the Supabase `files` table.\n - Exclude duplicates and skip placeholder files to ensure only unprocessed files are handled.\n\n3. **Handle File Downloads**:\n - Download new files using detailed storage configurations for public/private access.\n - Adjust the storage settings and GET requests to match your Supabase setup.\n\n4. **File Type Processing**:\n - Use a Switch node to target specific file types (e.g., PDFs or text files).\n - Employ relevant tools to process the content:\n - For PDFs, extract embedded content.\n - For text files, directly process the text data.\n\n5. **Content Chunking**:\n - Break large text data into smaller chunks using the Text Splitter node.\n - Define chunk size (default: 500 tokens) and overlap to retain necessary context across chunks.\n\n6. **Vector Embedding Creation**:\n - Generate vectorized embeddings for the processed content using OpenAI's embedding tools.\n - Ensure metadata, such as file ID, is included for easy data retrieval.\n\n7. **Store Vectorized Data**:\n - Save the vectorized information into a dedicated Supabase vector store.\n - Use the default schema and table provided by Supabase for seamless setup.\n\n8. **AI Chatbot Integration**:\n - Add a chatbot node to handle user input and retrieve relevant document chunks.\n - Use metadata like file ID for targeted queries, especially when multiple documents are involved."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "450a1e49-4be9-451a-9d05-2860e29c3695",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
540,
|
||||
-1160
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 951.7421645394404,
|
||||
"height": 809.7437181509877,
|
||||
"content": "## Scenario 2 - AI agent"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c3814c5d-8881-4598-897e-268019bee1bc",
|
||||
"name": "Sticky Note10",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-260,
|
||||
-280
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 2304.723519246249,
|
||||
"height": 739.2522526116408,
|
||||
"content": "## Scenario 1 - Flow for adding new files from Supabase storage"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"If": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create File record2",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Switch": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Extract Document PDF",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Switch",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get All files",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get All Files": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get All files": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items": {
|
||||
"main": [
|
||||
null,
|
||||
[
|
||||
{
|
||||
"node": "If",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Insert into Supabase Vectorstore",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI2": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Supabase Vector Store",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model1": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model2": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Vector Store Tool1",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Vector Store Tool1": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create File record2": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Insert into Supabase Vectorstore",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Default Data Loader": {
|
||||
"ai_document": [
|
||||
[
|
||||
{
|
||||
"node": "Insert into Supabase Vectorstore",
|
||||
"type": "ai_document",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract Document PDF": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Supabase Vector Store": {
|
||||
"ai_vectorStore": [
|
||||
[
|
||||
{
|
||||
"node": "Vector Store Tool1",
|
||||
"type": "ai_vectorStore",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When chat message received": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Insert into Supabase Vectorstore": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Recursive Character Text Splitter": {
|
||||
"ai_textSplitter": [
|
||||
[
|
||||
{
|
||||
"node": "Default Data Loader",
|
||||
"type": "ai_textSplitter",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get All Files",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
319
AI Agent _ Google calendar assistant using OpenAI.txt
Normal file
319
AI Agent _ Google calendar assistant using OpenAI.txt
Normal file
@@ -0,0 +1,319 @@
|
||||
{
|
||||
"id": "ITH6r6UYtlCyUcpj",
|
||||
"meta": {
|
||||
"instanceId": "b9faf72fe0d7c3be94b3ebff0778790b50b135c336412d28fd4fca2cbbf8d1f5"
|
||||
},
|
||||
"name": "AI Agent : Google calendar assistant using OpenAI",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "2e670a54-f789-4c8b-abba-ae35c458f5ed",
|
||||
"name": "When chat message received",
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"position": [
|
||||
-280,
|
||||
0
|
||||
],
|
||||
"webhookId": "5308edc9-738b-4aae-a789-214e2392579a",
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "96bf895f-a18c-4a4c-bc26-3ec5d2372de5",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
160,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "",
|
||||
"name": "OpenAi"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "270176df-9c2d-4f1a-b017-9349cb249341",
|
||||
"name": "Window Buffer Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
580,
|
||||
820
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "5cdece35-bd69-4c77-b240-963df8781d64",
|
||||
"name": "Google Calendar - Get Events",
|
||||
"type": "n8n-nodes-base.googleCalendarTool",
|
||||
"position": [
|
||||
960,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"timeMax": "={{ $fromAI('end_date') }}",
|
||||
"timeMin": "={{ $fromAI('start_date') }}"
|
||||
},
|
||||
"calendar": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "",
|
||||
"cachedResultName": ""
|
||||
},
|
||||
"operation": "getAll",
|
||||
"descriptionType": "manual",
|
||||
"toolDescription": "Use this tool when you’re asked to retrieve events data."
|
||||
},
|
||||
"credentials": {
|
||||
"googleCalendarOAuth2Api": {
|
||||
"id": "",
|
||||
"name": "Google Calendar account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "634e6472-099c-4f0e-b9eb-67956c4881b8",
|
||||
"name": "Google Calendar - Create events",
|
||||
"type": "n8n-nodes-base.googleCalendarTool",
|
||||
"position": [
|
||||
1380,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"end": "={{ $fromAI('end_date') }} ",
|
||||
"start": "={{ $fromAI('start_date') }} ",
|
||||
"calendar": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "",
|
||||
"cachedResultName": ""
|
||||
},
|
||||
"descriptionType": "manual",
|
||||
"toolDescription": "Use this Google Calendar tool when you are asked to create an event.",
|
||||
"additionalFields": {
|
||||
"summary": "={{ $fromAI('event_title') }} ",
|
||||
"attendees": [],
|
||||
"description": "={{ $fromAI('event_description') }} "
|
||||
},
|
||||
"useDefaultReminders": false
|
||||
},
|
||||
"credentials": {
|
||||
"googleCalendarOAuth2Api": {
|
||||
"id": "",
|
||||
"name": "Google Calendar account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "5c93e130-29d5-489b-84ea-3e31f5849b3a",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-380,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 320,
|
||||
"height": 560,
|
||||
"content": "## Chat trigger - When a message is received\n\nThis node is the **entry point of the workflow**. \nIt triggers the workflow whenever a message is sent to the **chat interface**.\n\nOptions with n8n:\n- **Embed the chat interface** anywhere you want.\n- Use a **webhook node** instead of this node to connect with interfaces like **[Streamlit](https://docs.streamlit.io/develop/tutorials/llms/build-conversational-apps)** or **[OpenWebUI](https://docs.openwebui.com/)**.\n- Use nodes for communication platforms (**Slack**, **Teams**, **Discord**, etc.) if you know how to configure them.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a1e850b4-d0fe-417c-8e1e-13fb4cdbb0a8",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
60,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1520,
|
||||
"height": 560,
|
||||
"content": "## Tools Agent - Calendar AI Agent\n\nThis **node** configures the **AI agent** for interaction with Google Calendar. \nIt includes the following features:\n\n- A **prompt source**: This is the user message derived from the chat input of the preceding node (`When chat message is received`).\n- A **system message**: This defines the system prompt to guide the AI agent's behavior. It incorporates the variable `{{ DateTime.local().toFormat('cccc d LLLL yyyy') }`, allowing the AI agent to determine the current date and interact with Google Calendar accordingly. For example, the agent can understand a request like \"Create an event called 'n8n workflow review' for next Tuesday.\"\n\n\nn8n nodes come with built-in **guardrails**, ensuring that if the user requests tasks outside the AI agent's setup, it may not function as intended. (Feel free to test it!)\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9b259245-5fd5-4798-973e-bc6aa15da20f",
|
||||
"name": "Calendar AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
580,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.chatInput }}",
|
||||
"options": {
|
||||
"systemMessage": "=You are a Google Calendar assistant.\nYour primary goal is to assist the user in managing their calendar effectively using two tools: Event Creation and Event Retrieval. Always base your responses on the current date: \n{{ DateTime.local().toFormat('cccc d LLLL yyyy') }}.\nGeneral Guidelines:\nIf the user's initial message is vague (e.g., \"hello\" or a generic greeting) or does not specify a request, explain your capabilities clearly:\nExample: \"Hello! I can help you manage your Google Calendar. You can ask me to create an event or retrieve event data. What would you like me to do?\"\nIf the user specifies a request in their first message, begin preparing to use the appropriate tool:\nFor event creation, gather necessary details like start date, end date, title, and description.\nFor event retrieval, ask for the date range or time period they want to query.\nTool: Event Creation\nWhen asked to create an event:\n\nRequest the start and end dates/times from the user.\nDate format: YYYY-MM-DD HH:mm:ss\nCollect the following information:\nstart_date: Exact start date and time of the event.\nend_date: Exact end date and time of the event.\nevent_title: Event title in uppercase. Suggest one if not provided.\nevent_description: Generate a brief description and present it for confirmation.\nTool: Event Retrieval\nWhen asked to retrieve events:\n\nAsk for the date range or period they are interested in. Examples:\nFor \"last week,\" retrieve events from Monday of the previous week to Friday of the same week.\nFor \"today,\" use the current date.\nFormat the date range:\nstart_date: Start date and time in YYYY-MM-DD HH:mm:ss.\nend_date: End date and time in YYYY-MM-DD HH:mm:ss.\nKey Behaviors:\nClarity: Provide a clear and helpful introduction when the user's request is unclear.\nValidation: Confirm details with the user before finalizing actions.\nAdaptation: Handle varying levels of detail in requests (e.g., \"Add a meeting for next Monday morning\" or \"Retrieve my events for this weekend\").\nProactivity: Offer suggestions to fill in missing details or clarify ambiguous inputs.\nLanguage Matching: Ensure all interactions, including event titles, descriptions, and messages, are in the user's language to provide a seamless experience."
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "b902a7d0-c2ca-4ab9-9f2a-047b9ccb1678",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
60,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 320,
|
||||
"height": 720,
|
||||
"content": "## OpenAI chat model\n\nThis node specifies the chat model used by the agent. \nIn the template, the **default LLM is gpt-4o** for its high relevance.\n\nOther options:\n- You can **try gpt-4o-mini**, which is more cost-effective.\n- You can also choose **other LLM providers besides OpenAI**, but make sure the LLM you select **supports tool-calling**.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c67e1e1b-ef9a-4fec-a860-4ec6b7439df6",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
460,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 320,
|
||||
"height": 720,
|
||||
"content": "## Window buffer memory\n\nThis node manages the **memory** of the agent, specifically the **context window length** for chat history. \nThe default is set to 5 messages.\n\nNote: \nThe **memory** is **temporary**. If you want to **store conversations with the agent**, you should use other nodes like **Postgres chat memory**. \nThis can be easily set up with services like **[Supabase](https://supabase.com/)**.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "bf719d53-e21b-4bd5-9443-c24d008f732b",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
860,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 320,
|
||||
"height": 720,
|
||||
"content": "## Google Calendar - Get Events\n\nThis sub-node is a tool used by the AI agent. \nIts purpose is to **retrieve events based on the user input**. \nFor example: *\"Can you give me the events from last week about internal process ?\"*\n\nThe AI agent is designed to **use this tool only** when it has a **date range**. \nIf the user hasn’t provided a date range, the **AI agent will ask the user** for it.\n\nThe **variables** `{{ $fromAI('start_date') }}` and `{{ $fromAI('end_date') }}` are **dynamically filled by the AI**.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e94eb1f8-df42-414b-9bec-9e6991a5a832",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1260,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 320,
|
||||
"height": 720,
|
||||
"content": "## Google Calendar - Create Events\n\nThis sub-node is a tool used by the AI agent. \nIts purpose is to **create events based on the user input**. \nFor example: \"Can you create an event 'Quarter revenue meeting' on [date] from [hour] to [hour] ?\"\n\nThe AI agent is designed to **use this tool only** when it has a **date range**. \nIf the user hasn’t provided a **date range**, the AI agent will **ask the user** for it. \nThe variables `{{ $fromAI('start_date') }}` and `{{ $fromAI('end_date') }}` are dynamically filled by the AI.\n\nBefore creating the event, the AI agent will **confirm with the user** if the **title** and **description** of the event are correct. \nThe variables used for this are:\n- `{{ $fromAI('event_title') }}`\n- `{{ $fromAI('event_description') }}`\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "707c011c-c822-4922-8ef7-c4368947d179",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
860,
|
||||
1000
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 720,
|
||||
"height": 380,
|
||||
"content": "## Having fun with it ? Here’s how to level up this AI agent ! \n\nThis workflow demonstrates **how easily you can set up an AI agent to call tools** for you using **n8n**. \nThe tasks here are **useful but very basic**. \n\nIf you want to **enhance the tool-calling capabilities**, consider the following:\n\n- Explore the **\"options\"** in the Google Calendar nodes to see additional features you can use. \n For example, let the AI agent add attendees to events it creates.\n\n- Implement the AI agent with your **teammates and link it to each calendar**. \n Use a `{{ $fromAI('') }}` variable for the calendar field and refine the prompts to suit your needs.\n\n- Add **more actions** for the AI agent to perform with the **Google Calendar API**, expanding its functionality.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"timezone": "Europe/Paris",
|
||||
"callerPolicy": "workflowsFromSameOwner",
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "25b51038-e103-4be6-bcd1-64df4b90d4c6",
|
||||
"connections": {
|
||||
"Calendar AI Agent": {
|
||||
"main": [
|
||||
[]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Calendar AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "Calendar AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When chat message received": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Calendar AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Calendar - Get Events": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Calendar AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Calendar - Create events": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Calendar AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,549 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "38972c5c-09f4-4120-a468-731e720914e1",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
900,
|
||||
-240
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Title: {{ $json.data.transcript.title }}\n\nParticipants: {{ $json.data.transcript.participants }}\n\nTranscript: {{ JSON.stringify($json.data.transcript.sentences) }}\n\nBullet gist:{{ $json.data.transcript.summary.bullet_gist }}",
|
||||
"agent": "openAiFunctionsAgent",
|
||||
"options": {
|
||||
"systemMessage": "=You get my calls' transcripts from Firefiles.\nThere can be meetings about projects. You can understand if it's about a project if meeting's title contains \"project\". If so - you need to:\n1. Analyze transcript, use tool \"Create Tasks\" to create tasks for me in my AirTable base.\n2. You need to use tool \"Notify Client About Tasks\" to nofity client about his tasks.\n3. If transcript contains info there's a call needed - you'll use \"Create Event\" tool to create call on Google Meet\nCurrent date: {{ $now }}"
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "db5c1bfa-b979-4749-84c8-8cd7d777748c",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
880,
|
||||
40
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "9RivS2BmSh1DDBFm",
|
||||
"name": "OpenAi account 3"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "334873ba-ec5c-42b3-b8d0-def79d07c0aa",
|
||||
"name": "Create Tasks",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
|
||||
"position": [
|
||||
1040,
|
||||
40
|
||||
],
|
||||
"parameters": {
|
||||
"name": "create_task",
|
||||
"schemaType": "manual",
|
||||
"workflowId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "Jo0BiizccacaChkH",
|
||||
"cachedResultName": "Firefiles AI Agent"
|
||||
},
|
||||
"description": "=Use this tool to create a task. \nFor task creation use only action items for me [YOUR NAME HERE], don't use action items for other participants.",
|
||||
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\",\n \"description\": \"An array of tasks\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"The name of the task\"\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"A detailed description of the task\"\n },\n \"due_date\": {\n \"type\": \"string\",\n \"description\": \"Due Date\"\n },\n \"priority\": {\n \"type\": \"string\",\n \"description\": \"Priority. . Please capitalize first letter\"\n },\n \"project_name\": {\n \"type\": \"string\",\n \"description\": \"Name of the project. Word 'Project' shouldn't be included\"\n }\n },\n \"required\": [\n \"name\",\n \"description\",\n \"due_date\",\n \"priority\"\n ],\n \"additionalProperties\": false\n }\n }\n },\n \"required\": [\n \"items\"\n ],\n \"additionalProperties\": false\n}",
|
||||
"specifyInputSchema": true
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "7fd03a80-71e9-4c47-9870-7a3ad4916149",
|
||||
"name": "Notify Client About Tasks",
|
||||
"type": "n8n-nodes-base.gmailTool",
|
||||
"position": [
|
||||
1180,
|
||||
40
|
||||
],
|
||||
"webhookId": "519d9406-10ef-4ae1-a747-d278002cac9e",
|
||||
"parameters": {
|
||||
"sendTo": "={{ $fromAI(\"participant_email\",\"participant email \",\"string\") }}",
|
||||
"message": "=Summary:\n{{ $json.data.transcript.summary.bullet_gist }}\n\nAction Items:\n{{ $fromAI(\"participant_action_items\",\"participant action items \",\"string\") }}",
|
||||
"options": {
|
||||
"appendAttribution": false
|
||||
},
|
||||
"subject": "Meeting Summary",
|
||||
"emailType": "text",
|
||||
"descriptionType": "manual",
|
||||
"toolDescription": "=Use the tool to notify a participant of the meeting with meeting summary and his tasks.\nIMPORTANT: \n1. Please notify participants except for me. My email: [YOUR EMAIL HERE]\n2. When working with tasks - please send only the participant's tasks."
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "LhdnHxP8WcSDEHw3",
|
||||
"name": "Gmail account 3"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "094a0e52-a4fa-4078-9b96-80568acb9c51",
|
||||
"name": "Execute Workflow Trigger",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
460,
|
||||
420
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e59e5a29-4509-45cc-9130-181ea432553c",
|
||||
"name": "Split Out",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
680,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "query.items"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "dc664650-f74e-4574-95a0-dd4a9bf181a1",
|
||||
"name": "Create Task",
|
||||
"type": "n8n-nodes-base.airtable",
|
||||
"position": [
|
||||
900,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"base": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "appndgSF4faN4jPXi",
|
||||
"cachedResultUrl": "https://airtable.com/appndgSF4faN4jPXi",
|
||||
"cachedResultName": "Philipp's Base"
|
||||
},
|
||||
"table": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "tblaCSndQsSF3gq7Z",
|
||||
"cachedResultUrl": "https://airtable.com/appndgSF4faN4jPXi/tblaCSndQsSF3gq7Z",
|
||||
"cachedResultName": "Tasks"
|
||||
},
|
||||
"columns": {
|
||||
"value": {
|
||||
"Name": "={{ $json.name }}",
|
||||
"Project": "={{ [$json.project_name] }}",
|
||||
"Due Date": "={{ $json.due_date }}",
|
||||
"Priority": "={{ $json.priority }}",
|
||||
"Description": "={{ $json.description }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "Name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": false,
|
||||
"required": false,
|
||||
"displayName": "Name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Description",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": false,
|
||||
"required": false,
|
||||
"displayName": "Description",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Priority",
|
||||
"type": "options",
|
||||
"display": true,
|
||||
"options": [
|
||||
{
|
||||
"name": "Low",
|
||||
"value": "Low"
|
||||
},
|
||||
{
|
||||
"name": "Medium",
|
||||
"value": "Medium"
|
||||
},
|
||||
{
|
||||
"name": "Urgent",
|
||||
"value": "Urgent"
|
||||
},
|
||||
{
|
||||
"name": "low",
|
||||
"value": "low"
|
||||
},
|
||||
{
|
||||
"name": "medium",
|
||||
"value": "medium"
|
||||
},
|
||||
{
|
||||
"name": "urgent",
|
||||
"value": "urgent"
|
||||
}
|
||||
],
|
||||
"removed": false,
|
||||
"readOnly": false,
|
||||
"required": false,
|
||||
"displayName": "Priority",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Due Date",
|
||||
"type": "dateTime",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": false,
|
||||
"required": false,
|
||||
"displayName": "Due Date",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Project",
|
||||
"type": "array",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": false,
|
||||
"required": false,
|
||||
"displayName": "Project",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": []
|
||||
},
|
||||
"options": {
|
||||
"typecast": true
|
||||
},
|
||||
"operation": "create"
|
||||
},
|
||||
"credentials": {
|
||||
"airtableTokenApi": {
|
||||
"id": "XT7hvl1w201jtBhx",
|
||||
"name": "Philipp Airtable Personal Access Token account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "6d6f9094-b0b3-495e-ade8-d80c03e727b0",
|
||||
"name": "Create Event",
|
||||
"type": "n8n-nodes-base.googleCalendarTool",
|
||||
"position": [
|
||||
1340,
|
||||
40
|
||||
],
|
||||
"parameters": {
|
||||
"end": "={{ $fromAI(\"end_date_time\",\"Date and time of meeting end\",\"string\") }}",
|
||||
"start": "={{ $fromAI(\"start_date_time\",\"Date and time of meeting start\",\"string\") }}",
|
||||
"calendar": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "philipp@lowcoding.dev",
|
||||
"cachedResultName": "philipp@lowcoding.dev"
|
||||
},
|
||||
"descriptionType": "manual",
|
||||
"toolDescription": "=Use tool to create Google Calendar Event. Use this tool only when transcript contains information that call should be scheduled.",
|
||||
"additionalFields": {
|
||||
"summary": "={{ $fromAI(\"meeting_name\",\"Meeting name\",\"string\") }}",
|
||||
"attendees": [
|
||||
"={{ $fromAI(\"email\",\"client email\",\"string\") }}"
|
||||
],
|
||||
"conferenceDataUi": {
|
||||
"conferenceDataValues": {
|
||||
"conferenceSolution": "hangoutsMeet"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleCalendarOAuth2Api": {
|
||||
"id": "E5Ufn31vrZLKzh4n",
|
||||
"name": "Google Calendar account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "2406fc01-fd28-403c-9378-473e8748e0dd",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
480,
|
||||
-240
|
||||
],
|
||||
"webhookId": "df852a9f-5ea3-43f2-bd49-d045aba5e9c9",
|
||||
"parameters": {
|
||||
"path": "df852a9f-5ea3-43f2-bd49-d045aba5e9c9",
|
||||
"options": {},
|
||||
"httpMethod": "POST"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "fe28fa98-4946-4379-970e-6df1a79e2a1e",
|
||||
"name": "Get Meeting Content",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
700,
|
||||
-240
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.fireflies.ai/graphql",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"query\": \"query Transcript($transcriptId: String!) { transcript(id: $transcriptId) { title participants speakers { id name } sentences { speaker_name text } summary { bullet_gist } } }\",\n \"variables\": {\n \"transcriptId\": \"{{ $json.meetingId }}\"\n }\n}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer [YOUR API KEY HERE]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "5eadd00a-9095-4bf3-80ed-e7bc5c49390d",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
620,
|
||||
-360
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"height": 80,
|
||||
"content": "### Replace API key for Fireflies\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "93cee18c-2215-4a63-af7b-ddf45729f5e4",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1180,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"height": 80,
|
||||
"content": "### Replace connections for Airtable and Google\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4d792723-4507-486f-9dc7-62bf1b927edd",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
380,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"width": 820,
|
||||
"height": 280,
|
||||
"content": "### Scenario 2 - Create Tasks tool"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c5520210-86db-4639-9f8c-ac9055407232",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
380,
|
||||
-460
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1100,
|
||||
"height": 760,
|
||||
"content": "### Scenario 1 - AI agent"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "48d47e44-b7bf-49b3-814b-6969ce97108d",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
800,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"height": 80,
|
||||
"content": "### Replace OpenAI connection\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "afe4bffa-8937-4c31-8513-0acc6b8858ce",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-360,
|
||||
60
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 280,
|
||||
"height": 566,
|
||||
"content": "### Set up steps\n\n#### Preparation\n1. **Create Accounts**:\n - [N8N](https://n8n.partnerlinks.io/2hr10zpkki6a): For workflow automation.\n - [Airtable](https://airtable.com/): For database hosting and management.\n - [Fireflies](https://fireflies.ai/): For recording meetings.\n\n#### N8N Workflow\n\n1. **Configure the Webhook**: \n - Set up a webhook to capture meeting completion events and integrate it with Fireflies.\n\n2. **Retrieve Meeting Content**: \n - Use GraphQL API requests to extract meeting details and transcripts, ensuring appropriate authentication through Bearer tokens.\n\n3. **AI Processing Setup**: \n - Define system messages for AI tasks and configure connections to the AI chat model (e.g., OpenAI's GPT) to process transcripts.\n\n4. **Task Creation Logic**: \n - Create structured tasks based on AI output, ensuring necessary details are captured and records are created in Airtable.\n\n5. **Client Notifications**: \n - Use an email node to notify clients about their tasks, ensuring communications are client-specific.\n\n6. **Scheduling Follow-Up Calls**: \n - Set up Google Calendar events if follow-up meetings are required, populating details from the original meeting context.\n\n7. **Final Testing**: \n - Conduct tests to ensure each part of the workflow is functional and seamless, making adjustments as needed based on feedback."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cbb81fa7-4a97-4a7e-82ce-05250b2c82cf",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-360,
|
||||
-460
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 636.2128494576581,
|
||||
"height": 497.1532689930921,
|
||||
"content": "\n## AI Agent for project management and meetings with Airtable and Fireflies\n**Made by [Philipp Bekher](https://www.linkedin.com/in/philipp-bekher-5437171a4/) from community [5minAI](https://www.skool.com/5minai-2861)**\n\nManaging action items from meetings can often lead to missed tasks and poor follow-up. This automation alleviates that issue by automatically generating tasks from meeting transcripts, keeping everyone informed about their responsibilities and streamlining communication.\n\nThe workflow leverages n8n to create a Smart Agent that listens for completed meeting transcripts, processes them using AI, and generates tasks in Airtable. Key functionalities include:\n- Capturing completed meeting events through webhooks.\n- Extracting relevant meeting details such as transcripts and participants using API calls.\n- Generating structured tasks from meeting discussions and sending notifications to clients.\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6d367721-875d-4d43-bd55-9801796a0e9f",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-60,
|
||||
60
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 330.5152611046425,
|
||||
"height": 239.5888196628349,
|
||||
"content": "### ... or watch set up video [10 min]\n[](https://www.youtube.com/watch?v=0TyX7G00x3A)\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Meeting Content",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AI Agent": {
|
||||
"main": [
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Split Out": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Task",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Event": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Tasks": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Meeting Content": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute Workflow Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Notify Client About Tasks": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
580
AI Agent for realtime insights on meetings.txt
Normal file
580
AI Agent for realtime insights on meetings.txt
Normal file
@@ -0,0 +1,580 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "d44489b8-8cb7-4776-8c16-a8bb01e52171",
|
||||
"name": "OpenAI1",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
300,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ \n JSON.parse($('Insert Transcription Part').item.json.dialog)\n .filter(item => item.date_updated && new Date(item.date_updated) >= new Date($('Insert Transcription Part').item.json.date_updated))\n .sort((a, b) => a.order - b.order)\n .map(item => `${item.words}\\n${item.speaker}`)\n .join('\\n\\n')\n}}",
|
||||
"memory": "threadId",
|
||||
"prompt": "define",
|
||||
"options": {},
|
||||
"resource": "assistant",
|
||||
"threadId": "={{ $json.thread_id }}",
|
||||
"assistantId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "asst_D5t6bNnNpenmfC7PmvywMqyR",
|
||||
"cachedResultName": "5minAI - Realtime Agent"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "SphXAX7rlwRLkiox",
|
||||
"name": "Test club key"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
},
|
||||
{
|
||||
"id": "3425f1c1-ad68-495e-bb9a-95ea92e7cf23",
|
||||
"name": "Insert Transcription Part",
|
||||
"type": "n8n-nodes-base.postgres",
|
||||
"position": [
|
||||
-120,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"query": "UPDATE public.data\nSET output = jsonb_set(\n output,\n '{dialog}', \n (\n COALESCE(\n (output->'dialog')::jsonb, \n '[]'::jsonb -- Initialize as empty array if dialog does not exist\n ) || jsonb_build_object(\n 'order', (COALESCE(jsonb_array_length(output->'dialog'), 0) + 1), -- Calculate the next order\n 'words', '{{ $('Webhook2').item.json.body.data.transcript.words.map(word => word.text.replace(/'/g, \"''\")).join(\" \") }}',\n 'speaker', '{{ $('Webhook2').item.json.body.data.transcript.speaker }}',\n 'language', '{{ $('Webhook2').item.json.body.data.transcript.language }}',\n 'speaker_id', ('{{ $('Webhook2').item.json.body.data.transcript.speaker_id }}')::int,\n 'date_updated', to_jsonb('{{ $now }}'::text)\n )\n )\n)\nWHERE input->>'recall_bot_id' = $1\nReturning input->>'openai_thread_id' as thread_id;",
|
||||
"options": {
|
||||
"queryReplacement": "={{ $('Scenario 2 Start - Webhook').item.json.body.data.bot_id }}"
|
||||
},
|
||||
"operation": "executeQuery"
|
||||
},
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "AO9cER6p8uX7V07T",
|
||||
"name": "Postgres 5minai"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.5
|
||||
},
|
||||
{
|
||||
"id": "9bcc0605-fc35-4842-a3f4-30ef902f35c1",
|
||||
"name": "Create Note",
|
||||
"type": "n8n-nodes-base.postgresTool",
|
||||
"position": [
|
||||
180,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"query": "UPDATE public.data\nSET output = jsonb_set(\n output,\n '{notes}', \n (\n COALESCE(\n (output->'notes')::jsonb, \n '[]'::jsonb -- Initialize as empty array if dialog does not exist\n ) || jsonb_build_object(\n 'order', (COALESCE(jsonb_array_length(output->'notes'), 0) + 1), -- Calculate the next order\n 'text', '{{ $fromAI(\"note\",\"Text of note.\") }}'\n )\n )\n)\nWHERE input->>'recall_bot_id' = $1",
|
||||
"options": {
|
||||
"queryReplacement": "={{ $('Scenario 2 Start - Webhook').item.json.body.data.bot_id }}"
|
||||
},
|
||||
"operation": "executeQuery",
|
||||
"descriptionType": "manual",
|
||||
"toolDescription": "Create note record."
|
||||
},
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "AO9cER6p8uX7V07T",
|
||||
"name": "Postgres 5minai"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.5
|
||||
},
|
||||
{
|
||||
"id": "0831c139-ca4b-4b4c-aa7f-7495c4ca0110",
|
||||
"name": "Create Recall bot",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-60,
|
||||
-980
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://us-west-2.recall.ai/api/v1/bot",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"meeting_url\":\"{{ $json.meeting_url }}\",\n \"transcription_options\": {\n \"provider\": \"assembly_ai\"\n }\n,\n\"real_time_transcription\": {\n \"destination_url\": \"https://n8n.lowcoding.dev/webhook/d074ca1e-52f9-47af-8587-8c24d431f9cd\"\n },\n\"automatic_leave\": {\n \"silence_detection\": {\n \"timeout\": 300, \n \"activate_after\": 600\n },\n \"bot_detection\": {\n \"using_participant_events\": {\n \"timeout\": 600, \n \"activate_after\": 1200\n }\n },\n \"waiting_room_timeout\": 600,\n \"noone_joined_timeout\": 600,\n \"everyone_left_timeout\": 2,\n \"in_call_not_recording_timeout\": 600,\n \"recording_permission_denied_timeout\": 600\n}\n}",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "lfHu7Kn7L7SH3LAF",
|
||||
"name": "Recall"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "e1122b5b-3af5-4836-802c-40c3a0eb3c93",
|
||||
"name": "Create OpenAI thread",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
140,
|
||||
-980
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.openai.com/v1/threads",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"authentication": "predefinedCredentialType",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "OpenAI-Beta",
|
||||
"value": "assistants=v2"
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "openAiApi"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "SphXAX7rlwRLkiox",
|
||||
"name": "Test club key"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "784c123d-adbb-4265-9485-2c88dd3091c2",
|
||||
"name": "Create data record",
|
||||
"type": "n8n-nodes-base.supabase",
|
||||
"position": [
|
||||
320,
|
||||
-980
|
||||
],
|
||||
"parameters": {
|
||||
"tableId": "data",
|
||||
"fieldsUi": {
|
||||
"fieldValues": [
|
||||
{
|
||||
"fieldId": "input",
|
||||
"fieldValue": "={{ {\"openai_thread_id\": $('Create OpenAI thread').item.json.id, \"recall_bot_id\": $('Create Recall bot').item.json.id, \"meeting_url\":$('Webhook').item.json.body.meeting_url } }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "output",
|
||||
"fieldValue": "={{ {\"dialog\":[]} }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"supabaseApi": {
|
||||
"id": "iVKNf5qv3ZFhq0ZV",
|
||||
"name": "Supabase 5minAI"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f455c7de-1e64-4a28-9eef-11d19c982813",
|
||||
"name": "Sticky Note9",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-900,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 330.5152611046425,
|
||||
"height": 239.5888196628349,
|
||||
"content": "### ... or watch set up video [10 min]\n[](https://www.youtube.com/watch?v=rtaX6BMiTeo)\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ea90c110-18ad-4f4b-90ab-fcb88b92e709",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1200,
|
||||
-1060
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 636,
|
||||
"height": 657,
|
||||
"content": "\n## AI Agent for realtime insights on meetings\n**Made by [Mark Shcherbakov](https://www.linkedin.com/in/marklowcoding/) from community [5minAI](https://www.skool.com/5minai)**\n\nTranscribing meetings manually can be tedious and prone to error. This workflow automates the transcription process in real-time, ensuring that key discussions and decisions are accurately captured and easily accessible for later review, thus enhancing productivity and clarity in communications.\n\nThe workflow employs an AI-powered assistant to join virtual meetings and capture discussions through real-time transcription. Key functionalities include:\n- Automatic joining of meetings on platforms like Zoom, Google Meet, and others with the ability to provide real-time transcription.\n- Integration with transcription APIs (e.g., AssemblyAI) to deliver seamless and accurate capture of dialogue.\n- Structuring and storing transcriptions efficiently in a database for easy retrieval and analysis.\n\n1. **Real-Time Transcription**: The assistant captures audio during meetings and transcribes it in real-time, allowing participants to focus on discussions.\n2. **Keyword Recognition**: Key phrases can trigger specific actions, such as noting important points or making prompts to the assistant.\n3. **Structured Data Management**: The assistant maintains a database of transcriptions linked to meeting details for organized storage and quick access later."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "378c19bb-0e4a-43d3-9ba5-2a77ebfb5b83",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1200,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 280,
|
||||
"height": 626,
|
||||
"content": "### Set up steps\n\n#### Preparation\n\n1. **Create Recall.ai API key**\n2. **Setup Supabase account and table**\n```\ncreate table\n public.data (\n id uuid not null default gen_random_uuid (),\n date_created timestamp with time zone not null default (now() at time zone 'utc'::text),\n input jsonb null,\n output jsonb null,\n constraint data_pkey primary key (id),\n ) tablespace pg_default;\n\n```\n3. **Create OpenAI API key**\n\n#### Development\n\n1. **Bot Creation**: \n - Use a node to create the bot that will join meetings. Provide the meeting URL and set transcription options within the API request.\n\n2. **Authentication**: \n - Configure authentication settings via a Bearer token for interacting with your transcription service.\n\n3. **Webhook Setup**: \n - Create a webhook to receive real-time transcription updates, ensuring timely data capture during meetings.\n\n4. **Join Meeting**: \n - Set the bot to join the specified meeting and actively listen to capture conversations.\n\n5. **Transcription Handling**: \n - Combine transcription fragments into cohesive sentences and manage dialog arrays for coherence.\n\n6. **Trigger Actions on Keywords**: \n - Set up keyword recognition that can initiate requests to the OpenAI API for additional interactions based on captured dialogue.\n\n7. **Output and Summary Generation**: \n - Produce insights and summary notes from the transcriptions that can be stored back into the database for future reference."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9a4ff741-ccfd-42e9-883e-43297a73e2c3",
|
||||
"name": "Scenario 1 Start - Edit Fields",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-260,
|
||||
-980
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "4891fa6e-2dd5-4433-925c-5497ec82e8ab",
|
||||
"name": "meeting_url",
|
||||
"type": "string",
|
||||
"value": "https://meet.google.com/iix-vrav-kuc"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "a4368763-b96e-45e7-884d-aa0cbae2d276",
|
||||
"name": "Scenario 2 Start - Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
-320,
|
||||
-300
|
||||
],
|
||||
"webhookId": "7f176935-cb83-4147-ac14-48c8d747863a",
|
||||
"parameters": {
|
||||
"path": "d074ca1e-52f9-47af-8587-8c24d431f9cd",
|
||||
"options": {},
|
||||
"httpMethod": "POST"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "107b26af-d1d2-40c7-ad4f-7193d3ae9b70",
|
||||
"name": "If Jimmy word",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
80,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "ba6c2ae5-d0f4-4242-9cf8-97cb84335a93",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "contains"
|
||||
},
|
||||
"leftValue": "={{ $('Scenario 2 Start - Webhook').item.json.body.data.transcript.words.map(word => word.text.replace(/'/g, \"''\")).join(\" \") }}",
|
||||
"rightValue": "=Jimmy"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "49cf34f6-86cf-42cc-9da4-3efb37e6f565",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-380,
|
||||
-1040
|
||||
],
|
||||
"parameters": {
|
||||
"width": 920,
|
||||
"height": 400,
|
||||
"content": "## Scenario 1\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "34660f39-6ecc-4f2d-98e8-a2c529255e98",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-380,
|
||||
-360
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1020,
|
||||
"height": 420,
|
||||
"content": "## Scenario 2\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5027e72d-2b2c-40b4-921e-c4f40d85f251",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-200,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 270,
|
||||
"height": 80,
|
||||
"content": "### Replace Supabase credentials"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "dddea341-da40-4b6a-ae25-a8417e869cc9",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-100,
|
||||
-780
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 200,
|
||||
"height": 80,
|
||||
"content": "### Replace server location\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e8e76c2a-f949-400e-92b2-39da8034b471",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
340,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 270,
|
||||
"height": 80,
|
||||
"content": "### Replace OpenAI credentials"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "729a5f6e-5aea-4908-9a82-2a7d7bea1322",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
140,
|
||||
-780
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 290,
|
||||
"height": 80,
|
||||
"content": "### Replace credentials"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "31178e90-62ce-4bf8-8381-dc8138088889",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-320,
|
||||
-780
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 200,
|
||||
"height": 80,
|
||||
"content": "### Replace meeting url\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {
|
||||
"Create Recall bot": [
|
||||
{
|
||||
"id": "ab35fa56-e42b-47c6-b716-eac8d12af601",
|
||||
"join_at": null,
|
||||
"metadata": {},
|
||||
"recording": null,
|
||||
"video_url": null,
|
||||
"recordings": [],
|
||||
"meeting_url": {
|
||||
"platform": "google_meet",
|
||||
"meeting_id": "zst-ymag-zoa"
|
||||
},
|
||||
"status_changes": [
|
||||
{
|
||||
"code": "ready",
|
||||
"message": null,
|
||||
"sub_code": null,
|
||||
"created_at": "2024-11-01T11:29:32.364684Z"
|
||||
}
|
||||
],
|
||||
"meeting_metadata": null,
|
||||
"calendar_meetings": [],
|
||||
"meeting_participants": []
|
||||
}
|
||||
],
|
||||
"Insert Transcription Part": [
|
||||
{
|
||||
"dialog": "[{\"order\": 1, \"words\": \"Wait.\", \"speaker\": \"Mark S.\", \"language\": null, \"speaker_id\": 100}, {\"order\": 2, \"words\": \"A bit.\", \"speaker\": \"Mark S.\", \"language\": null, \"speaker_id\": 100}, {\"order\": 3, \"words\": \"It's not even subtitles and it's not even a real. It's. A Google Meet.\", \"speaker\": \"Mark S.\", \"language\": null, \"speaker_id\": 100}, {\"order\": 4, \"words\": \"Same story. I wasn't prepared. I don't know what to tell you. Maybe my AI body can help me.\", \"speaker\": \"Mark S.\", \"language\": null, \"speaker_id\": 100}, {\"order\": 5, \"words\": \"What truth?\", \"speaker\": \"Mark S.\", \"language\": null, \"speaker_id\": 100}, {\"order\": 6, \"words\": \"You can get the same AI body in one day. Just drop AI in comment and I will. Send you a guide.\", \"speaker\": \"Mark S.\", \"language\": null, \"speaker_id\": 100}, {\"order\": 7, \"words\": \"As it works well.\", \"speaker\": \"Mark S.\", \"language\": \"null\", \"speaker_id\": 100}, {\"order\": 8, \"words\": \"As it works well.\", \"speaker\": \"Mark S.\", \"language\": \"null\", \"speaker_id\": 100}, {\"order\": 9, \"words\": \"As it works well.\", \"speaker\": \"Mark S.\", \"language\": \"null\", \"speaker_id\": 100}, {\"order\": 10, \"words\": \"Let's it works well.\", \"speaker\": \"Mark S.\", \"language\": \"null\", \"speaker_id\": 100}, {\"order\": 11, \"words\": \"Let's it works well.\", \"speaker\": \"Mark S.\", \"language\": \"null\", \"speaker_id\": 100}, {\"order\": 12, \"words\": \"Let's it works well.\", \"speaker\": \"Mark S.\", \"language\": \"null\", \"speaker_id\": 100, \"date_updated\": \"2024-11-22T08:41:24.164+01:00\"}, {\"order\": 13, \"words\": \"Let's it works well.\", \"speaker\": \"Mark S.\", \"language\": \"null\", \"speaker_id\": 100, \"date_updated\": \"2024-11-22T08:50:11.330+01:00\"}]",
|
||||
"thread_id": "thread_0g7p3iE7MYmDPiUuPiZP5vfR",
|
||||
"date_updated": "2024-11-22T08:37:55.751+01:00"
|
||||
}
|
||||
],
|
||||
"Scenario 2 Start - Webhook": [
|
||||
{
|
||||
"body": {
|
||||
"data": {
|
||||
"bot_id": "0032c6e2-78e9-46e7-a2ef-41d7b853ef48",
|
||||
"transcript": {
|
||||
"words": [
|
||||
{
|
||||
"text": "Let's",
|
||||
"end_time": 11.88,
|
||||
"start_time": 11.68
|
||||
},
|
||||
{
|
||||
"text": "it",
|
||||
"end_time": 12.12,
|
||||
"start_time": 11.88
|
||||
},
|
||||
{
|
||||
"text": "works",
|
||||
"end_time": 12.44,
|
||||
"start_time": 12.12
|
||||
},
|
||||
{
|
||||
"text": "well.",
|
||||
"end_time": 12.48,
|
||||
"start_time": 12.44
|
||||
}
|
||||
],
|
||||
"source": "smart_annotator",
|
||||
"speaker": "Mark S.",
|
||||
"is_final": true,
|
||||
"language": null,
|
||||
"speaker_id": 100,
|
||||
"original_transcript_id": 32
|
||||
},
|
||||
"recording_id": "ee1ad589-39fe-4ed5-b96f-cd14c63f3bc2"
|
||||
},
|
||||
"event": "bot.transcription"
|
||||
},
|
||||
"query": {},
|
||||
"params": {},
|
||||
"headers": {
|
||||
"host": "n8n.lowcoding.dev",
|
||||
"accept": "*/*",
|
||||
"content-type": "application/json",
|
||||
"content-length": "495",
|
||||
"accept-encoding": "gzip",
|
||||
"x-forwarded-for": "52.10.191.34",
|
||||
"x-forwarded-host": "n8n.lowcoding.dev",
|
||||
"x-forwarded-proto": "https"
|
||||
},
|
||||
"webhookUrl": "https://n8n.lowcoding.dev/webhook/d074ca1e-52f9-47af-8587-8c24d431f9cd",
|
||||
"executionMode": "production"
|
||||
}
|
||||
]
|
||||
},
|
||||
"connections": {
|
||||
"OpenAI1": {
|
||||
"main": [
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Create Note": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "OpenAI1",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"If Jimmy word": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "OpenAI1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Recall bot": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create OpenAI thread",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Create data record": {
|
||||
"main": [
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Create OpenAI thread": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create data record",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Insert Transcription Part": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If Jimmy word",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Scenario 2 Start - Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Insert Transcription Part",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Scenario 1 Start - Edit Fields": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Recall bot",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1397
AI Agent to chat with Airtable and analyze data.txt
Normal file
1397
AI Agent to chat with Airtable and analyze data.txt
Normal file
File diff suppressed because it is too large
Load Diff
261
AI Agent to chat with Supabase_PostgreSQL DB.txt
Normal file
261
AI Agent to chat with Supabase_PostgreSQL DB.txt
Normal file
@@ -0,0 +1,261 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "0a4e65b7-39be-44eb-8c66-913ebfe8a87a",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1140,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 215,
|
||||
"height": 80,
|
||||
"content": "**Replace password and username for Supabase**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2cea21fc-f3fe-47b7-a7b6-12acb0bc03ac",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-160,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 280.2462120317618,
|
||||
"height": 545.9087885077763,
|
||||
"content": "### Set up steps\n\n#### Preparation\n1. **Create Accounts**:\n - [N8N](https://n8n.partnerlinks.io/2hr10zpkki6a): For workflow automation.\n - [Supabase](https://supabase.com/): For database hosting and management.\n - [OpenAI](https://openai.com/): For building the conversational AI agent.\n2. **Configure Database Connection**:\n - Set up a PostgreSQL database in Supabase.\n - Use appropriate credentials (`username`, `password`, `host`, and `database` name) in your workflow.\n\n#### N8N Workflow\n\nAI agent with tools:\n\n1. **Code Tool**:\n - Execute SQL queries based on user input.\n2. **Database Schema Tool**:\n - Retrieve a list of all tables in the database.\n - Use a predefined SQL query to fetch table definitions, including column names, types, and references.\n3. **Table Definition**:\n - Retrieve a list of columns with types for one table."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "eacc0c8c-11d5-44fb-8ff1-10533a233693",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-160,
|
||||
-200
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 636.2128494576581,
|
||||
"height": 497.1532689930921,
|
||||
"content": "\n## AI Agent to chat with Supabase/PostgreSQL DB\n**Made by [Mark Shcherbakov](https://www.linkedin.com/in/marklowcoding/) from community [5minAI](https://www.skool.com/5minai-2861)**\n\nAccessing and analyzing database data often requires SQL expertise or dedicated reports, which can be time-consuming. This workflow empowers users to interact with a database conversationally through an AI-powered agent. It dynamically generates SQL queries based on user requests, streamlining data retrieval and analysis.\n\nThis workflow integrates OpenAI with a Supabase database, enabling users to interact with their data via an AI agent. The agent can:\n- Retrieve records from the database.\n- Extract and analyze JSON data stored in tables.\n- Provide summaries, aggregations, or specific data points based on user queries.\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "be1559ea-1f75-4e7c-9bdd-3add8d8be70b",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
140,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 330.5152611046425,
|
||||
"height": 239.5888196628349,
|
||||
"content": "### ... or watch set up video [20 min]\n[](https://www.youtube.com/watch?v=-GgKzhCNxjk)\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4ea87754-dead-49ea-848c-ed86c98e217b",
|
||||
"name": "When chat message received",
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"position": [
|
||||
720,
|
||||
400
|
||||
],
|
||||
"webhookId": "6e95bc27-99a6-417c-8bf7-2831d7f7a4be",
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "c20d6e57-eb41-4682-a7f5-5bb4323df476",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
760,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "zJhr5piyEwVnWtaI",
|
||||
"name": "OpenAi club"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8d3b1faf-643c-4070-996d-a59cb06e1827",
|
||||
"name": "DB Schema",
|
||||
"type": "n8n-nodes-base.postgresTool",
|
||||
"position": [
|
||||
1180,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"query": "SELECT table_schema, table_name\nFROM information_schema.tables\nWHERE table_type = 'BASE TABLE' AND table_schema = 'public';",
|
||||
"options": {},
|
||||
"operation": "executeQuery",
|
||||
"descriptionType": "manual",
|
||||
"toolDescription": "Get list of all tables in database"
|
||||
},
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "AO9cER6p8uX7V07T",
|
||||
"name": "Postgres 5minai"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.5
|
||||
},
|
||||
{
|
||||
"id": "d9346ade-79d1-44c2-8fa6-b337ad8b0544",
|
||||
"name": "Get table definition",
|
||||
"type": "n8n-nodes-base.postgresTool",
|
||||
"position": [
|
||||
1340,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"query": "SELECT \n c.column_name,\n c.data_type,\n c.is_nullable,\n c.column_default,\n tc.constraint_type,\n ccu.table_name AS referenced_table,\n ccu.column_name AS referenced_column\nFROM \n information_schema.columns c\nLEFT JOIN \n information_schema.key_column_usage kcu \n ON c.table_name = kcu.table_name \n AND c.column_name = kcu.column_name\nLEFT JOIN \n information_schema.table_constraints tc \n ON kcu.constraint_name = tc.constraint_name\n AND tc.constraint_type = 'FOREIGN KEY'\nLEFT JOIN\n information_schema.constraint_column_usage ccu\n ON tc.constraint_name = ccu.constraint_name\nWHERE \n c.table_name = '{{ $fromAI(\"table_name\") }}' -- Your table name\n AND c.table_schema = 'public' -- Ensure it's in the right schema\nORDER BY \n c.ordinal_position;\n",
|
||||
"options": {},
|
||||
"operation": "executeQuery",
|
||||
"descriptionType": "manual",
|
||||
"toolDescription": "Get table definition to find all columns and types."
|
||||
},
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "AO9cER6p8uX7V07T",
|
||||
"name": "Postgres 5minai"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.5
|
||||
},
|
||||
{
|
||||
"id": "b88a21e0-d2ff-4431-bd84-dfd43edeb5c4",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
960,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"width": 215,
|
||||
"height": 80,
|
||||
"content": "**Finetune the prompt of assistant**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fbe9eb68-5990-485c-820f-08234ea33194",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
940,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $('When chat message received').item.json.chatInput }}",
|
||||
"agent": "openAiFunctionsAgent",
|
||||
"options": {
|
||||
"systemMessage": "You are DB assistant. You need to run queries in DB aligned with user requests.\n\nRun custom SQL query to aggregate data and response to user.\n\nFetch all data to analyse it for response if needed.\n"
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
},
|
||||
{
|
||||
"id": "7f82d6d9-d7d6-4443-bbaa-c9b276a376e3",
|
||||
"name": "Run SQL Query",
|
||||
"type": "n8n-nodes-base.postgresTool",
|
||||
"position": [
|
||||
1040,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"query": "{{ $fromAI(\"query\",\"SQL query for PostgreSQL DB in Supabase\") }}",
|
||||
"options": {},
|
||||
"operation": "executeQuery",
|
||||
"descriptionType": "manual",
|
||||
"toolDescription": "Run custom SQL queries using knowledge about Output structure to provide needed response for user request.\nUse ->> operator to extract JSON data."
|
||||
},
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "AO9cER6p8uX7V07T",
|
||||
"name": "Postgres 5minai"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.5
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"DB Schema": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Run SQL Query": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get table definition": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When chat message received": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,827 @@
|
||||
{
|
||||
"id": "PoiRk5w0xd1ysq4U",
|
||||
"meta": {
|
||||
"instanceId": "b9faf72fe0d7c3be94b3ebff0778790b50b135c336412d28fd4fca2cbbf8d1f5",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "AI Agent to chat with you Search Console Data, using OpenAI and Postgres",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "9ee6710b-19b7-4bfd-ac2d-0fe1e2561f1d",
|
||||
"name": "Postgres Chat Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
|
||||
"position": [
|
||||
1796,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"tableName": "insights_chat_histories"
|
||||
},
|
||||
"credentials": {
|
||||
"postgres": {
|
||||
"id": "",
|
||||
"name": "Postgres"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "eb9f07e9-ded1-485c-9bf3-cf223458384a",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1356,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o",
|
||||
"options": {
|
||||
"maxTokens": 16000
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "",
|
||||
"name": "OpenAi"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1d3d6fb7-a171-4590-be42-df7eb0c208ed",
|
||||
"name": "Set fields",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
940,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "9f47b322-e42f-42d7-93eb-a57d22adb849",
|
||||
"name": "chatInput",
|
||||
"type": "string",
|
||||
"value": "={{ $json.body?.chatInput || $json.chatInput }}"
|
||||
},
|
||||
{
|
||||
"id": "73ec4dd0-e986-4f60-9dca-6aad2f86bdeb",
|
||||
"name": "sessionId",
|
||||
"type": "string",
|
||||
"value": "={{ $json.body?.sessionId || $json.sessionId }}"
|
||||
},
|
||||
{
|
||||
"id": "4b688c46-b60f-4f0a-83d8-e283f2d7055c",
|
||||
"name": "date_message",
|
||||
"type": "string",
|
||||
"value": "={{ $now.format('yyyy-MM-dd') }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "92dc5e8b-5140-49be-8713-5749b7e2d46b",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
407.32142857142867,
|
||||
-320
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 347.9910714285712,
|
||||
"height": 516.8973214285712,
|
||||
"content": "## Webhook - ChatInput\n\nThis webhook serves as the endpoint for receiving `ChatInput` data. Ensure that you include:\n- `chatInput` – the content you wish to send (😉)\n- `sessionId` – a unique identifier for the session\n\nIf you're using an interface such as **Open WebUI**, the `sessionId` will be generated automatically."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ca9f3732-9b62-4f44-b970-77d5d470ec76",
|
||||
"name": "Webhook - ChatInput",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
500,
|
||||
-20
|
||||
],
|
||||
"webhookId": "a6820b65-76cf-402b-a934-0f836dee6ba0",
|
||||
"parameters": {
|
||||
"path": "a6820b65-76cf-402b-a934-0f836dee6ba0/chat",
|
||||
"options": {},
|
||||
"httpMethod": "POST",
|
||||
"responseMode": "responseNode",
|
||||
"authentication": "basicAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpBasicAuth": {
|
||||
"id": "",
|
||||
"name": "basic-auth"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "9d684873-6dfe-4709-928d-293b187dfb30",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
820,
|
||||
-320
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 347.9910714285712,
|
||||
"height": 516.8973214285712,
|
||||
"content": "## Set fields\n\nThis node sets three fields:\n- `chatInput`: retrieved from the previous webhook node\n- `sessionId`: retrieved from the previous webhook node\n- `date_message`: formatted within this node. This will be used later to help the AI agent determine the date range for retrieving Search Console data."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8750215a-1e33-4ac8-a6da-95efa8ffed65",
|
||||
"name": "Respond to Webhook",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"position": [
|
||||
2600,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "1b879496-5c0f-4bd5-b4cb-18df2662aef2",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1240,
|
||||
-320
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1154.2857142857138,
|
||||
"height": 516.8973214285712,
|
||||
"content": "## AI Agent - Tools Agent\n\nThis AI Agent is configured with a system prompt that instructs it to:\n- On the first user message, **retrieve available Search Console properties** and offer the user the option to **fetch data from these properties**\n- Based on the user’s natural language input, **construct an API call** to the selected Search Console property and retrieve the requested data\n- Present the data in a **markdown-formatted table**\n\nThe AI Agent has a friendly tone and is designed to **confirm the user’s data requirements accurately** before executing any API requests.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c44c6402-9ddd-4a7b-bc5a-b6c3679a3f68",
|
||||
"name": "Call Search Console Tool",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
|
||||
"position": [
|
||||
2196,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"name": "SearchConsoleRequestTool",
|
||||
"workflowId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "PoiRk5w0xd1ysq4U",
|
||||
"cachedResultName": "My workflow 10"
|
||||
},
|
||||
"description": "Call this tool when you need to get the website_list or custom_insights",
|
||||
"jsonSchemaExample": ""
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "b1701a89-c5b3-47fb-99d5-4896a6d5c7a2",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1234,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 328.9664285714292,
|
||||
"height": 468.13107142857154,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n### AI Agent Sub-node - OpenAI Chat Model\n\nThis sub-node utilizes the selected **OpenAI Chat Model**. You can replace it with any LLM that **supports tool calling**.\n\n### ⚠️ Choose Your Model\nIn this template, the **default model is `gpt-4o`**, a **costly option**. If you'd like a more **affordable alternative**, select `gpt4-o-mini`, though note that responses may occasionally be of slightly lower quality compared to `gpt-4o`."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cd1a7cec-5845-47b1-a2c8-d3b458a02eb0",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1656,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 328.9664285714292,
|
||||
"height": 468.13107142857154,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n### AI Agent Sub-node - Postgres Chat Memory\n\nConnect your **Postgres credentials** and specify a **table name** to store the chat history. In this template, the default table name is `insights_chat_histories`, and the **context window length is set to 5**.\n\n**👋 Tip:** If you don’t have a Postgres database, you can quickly **set one up with [Supabase](https://supabase.com/)**.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "290a07d1-c7ed-434d-9851-2a2dcdd35bdf",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2076,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 328.9664285714292,
|
||||
"height": 468.13107142857154,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n### AI Agent Sub-node - Call Search Console Tool\n\nThis **tool is used by the AI Agent** to:\n- Retrieve the **list of accessible properties in Search Console**\n- **Fetch Search Console data** based on the user’s natural language request\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "07805c90-7ba5-44d0-b6eb-5a65efb0f8be",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2480,
|
||||
-320
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 347.9910714285712,
|
||||
"height": 516.8973214285712,
|
||||
"content": "## Respond to Webhook\n\nThis node is used to send a response back to the user.\n\n**👋 Tip:** `intermediateSteps` are configured, allowing you to use raw data fetched from Search Console to **create charts or other visualizations** if desired.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9a927a40-45e4-4fd5-ab3e-b77578469f82",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
400,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 370.3910714285712,
|
||||
"height": 492.3973214285712,
|
||||
"content": "## Tool Call Trigger\n\nThis **node is triggered when the AI Agent needs to retrieve the `website_list`** (accessible Search Console properties) or **`custom_insights`** based on user data.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c54a4653-0f09-46b0-bd20-68919b96e154",
|
||||
"name": "Tool calling",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
500,
|
||||
1080
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cc7303ee-1afa-4859-83e7-3af0e963a0f1",
|
||||
"name": "Switch",
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"position": [
|
||||
1300,
|
||||
1080
|
||||
],
|
||||
"parameters": {
|
||||
"rules": {
|
||||
"values": [
|
||||
{
|
||||
"outputKey": "custom_insights",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "a30fe6a6-7d0a-4f14-8492-ae021ddc8ec6",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "contains"
|
||||
},
|
||||
"leftValue": "={{ $json.request_type }}",
|
||||
"rightValue": "custom_insights"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
},
|
||||
{
|
||||
"outputKey": "website_list",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "1b7d6039-6474-4a73-b157-584743a9d7f0",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "contains"
|
||||
},
|
||||
"leftValue": "={{$json.request_type}}",
|
||||
"rightValue": "website_list"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "6860ff98-4050-4f64-b8c1-a153e3388df0",
|
||||
"name": "Set fields - Consruct API CALL",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
920,
|
||||
1080
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "06373437-8288-4171-9f98-e8a417220dd4",
|
||||
"name": "request_type",
|
||||
"type": "string",
|
||||
"value": "={{ $json.query.parseJson().request_type }}"
|
||||
},
|
||||
{
|
||||
"id": "da45c0c5-05f6-4107-81aa-8c08c972d9bf",
|
||||
"name": "start_date",
|
||||
"type": "string",
|
||||
"value": "={{ $json.query.parseJson().startDate }}"
|
||||
},
|
||||
{
|
||||
"id": "59d55034-c612-43d7-9700-4cacdb630ec2",
|
||||
"name": "end_date",
|
||||
"type": "string",
|
||||
"value": "={{ $json.query.parseJson().endDate }}"
|
||||
},
|
||||
{
|
||||
"id": "4c2478c0-7f96-4d3d-a632-089307dc989e",
|
||||
"name": "dimensions",
|
||||
"type": "string",
|
||||
"value": "={{ $json.query.parseJson().dimensions }}"
|
||||
},
|
||||
{
|
||||
"id": "eceefbf9-44e5-4617-96ea-58aca2a29618",
|
||||
"name": "rowLimit",
|
||||
"type": "number",
|
||||
"value": "={{ $json.query.parseJson().rowLimit }}"
|
||||
},
|
||||
{
|
||||
"id": "4e18386e-8548-4385-b620-43efbb11cd63",
|
||||
"name": "startRow",
|
||||
"type": "number",
|
||||
"value": "={{ $json.query.parseJson().startRow}}"
|
||||
},
|
||||
{
|
||||
"id": "a9323a7b-08b4-4015-b3d7-632bcdf56f4e",
|
||||
"name": "property",
|
||||
"type": "string",
|
||||
"value": "={{ encodeURIComponent($json.query.parseJson().property) }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "0a2dfb28-17ee-477f-b9ea-f1d8e05e3745",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
820,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 370.3910714285712,
|
||||
"height": 492.3973214285712,
|
||||
"content": "## Set Fields - Construct API Call\n\nThis node configures fields based on the JSON sent by the AI agent:\n- The `request_type` field determines the route: `website_list` (to retrieve the list of websites) or `custom_insights` (to get insights from Search Console)\n- Additional fields are set to construct the API call, following the **[Search Console API Documentation](https://developers.google.com/webmaster-tools/v1/searchanalytics/query?hl=en)**\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e6ef5c28-01e4-4a0b-9081-b62ec28be635",
|
||||
"name": "Set fields - Create searchConsoleDataArray",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2180,
|
||||
980
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "2cffd36f-72bd-4535-8427-a88028ea0c4c",
|
||||
"name": "searchConsoleData",
|
||||
"type": "array",
|
||||
"value": "={{ $json.rows }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "abc80061-a794-4e1d-a055-bd88ea5c93eb",
|
||||
"name": "Set fields - Create searchConsoleDataArray 2",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2180,
|
||||
1340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "2cffd36f-72bd-4535-8427-a88028ea0c4c",
|
||||
"name": "searchConsoleData",
|
||||
"type": "array",
|
||||
"value": "={{ $json.siteEntry }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "24981eea-980e-4e07-9036-d0042c5b2fbe",
|
||||
"name": "Search Console - Get Custom Insights",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1620,
|
||||
980
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://www.googleapis.com/webmasters/v3/sites/{{ $json.property }}/searchAnalytics/query",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "={\n \"startDate\": \"{{ $json.start_date }}\",\n \"endDate\": \"{{ $json.end_date }}\",\n \"dimensions\": {{ $json.dimensions }},\n \"rowLimit\": {{ $json.rowLimit }},\n \"startRow\": 0,\n \"dataState\":\"all\"\n}",
|
||||
"sendBody": true,
|
||||
"sendQuery": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "oAuth2Api",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"oAuth2Api": {
|
||||
"id": "",
|
||||
"name": "search-console"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "645ff407-857d-4629-926b-5cfc52cfa8ba",
|
||||
"name": "Sticky Note9",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1520,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 370.3910714285712,
|
||||
"height": 364.3185243941325,
|
||||
"content": "## Search Console - Get Custom Insights\n\nThis node **performs the API call to retrieve data from Search Console**.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "15aa66e2-f288-4c86-8dad-47e22aa9104f",
|
||||
"name": "Sticky Note10",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1520,
|
||||
1180
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 370.3910714285712,
|
||||
"height": 334.24982142857124,
|
||||
"content": "## Search Console - Get List of Properties\n\nThis node **performs the API call to retrieve the list of accessible properties from Search Console**.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cd804a52-833a-451a-8e0c-f640210ee2c4",
|
||||
"name": "## Search Console - Get List of Properties",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1620,
|
||||
1340
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://www.googleapis.com/webmasters/v3/sites",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "oAuth2Api",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"oAuth2Api": {
|
||||
"id": "",
|
||||
"name": "search-console"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "3eac4df1-00ac-4262-b520-3a7e218c7e57",
|
||||
"name": "Sticky Note11",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2040,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 370.3910714285712,
|
||||
"height": 725.1298214285712,
|
||||
"content": "## Set Fields - Create `searchConsoleDataArray`\n\nThese nodes **create an array based on the response from the Search Console API**.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "86db5800-a735-4749-a800-63d78908610b",
|
||||
"name": "Sticky Note12",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2520,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 370.3910714285712,
|
||||
"height": 722.6464176100125,
|
||||
"content": "## Array Aggregation - Response to AI Agent\n\nThese nodes **aggregate the array from the previous** step and send it back to the AI Agent through the field named output as `response`.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "aefbacc7-8dfc-4655-bc4d-f0498c823711",
|
||||
"name": "Array aggregation - response to AI Agent",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
2640,
|
||||
980
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData",
|
||||
"destinationFieldName": "response"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e5334c72-981c-4375-ae8e-9a3a0457880b",
|
||||
"name": "Array aggregation - response to AI Agent1",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
2660,
|
||||
1340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData",
|
||||
"destinationFieldName": "response"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2e93a798-6c26-4d34-a553-ba01b64ca3fe",
|
||||
"name": "Sticky Note13",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-398.45627799387194,
|
||||
-320
|
||||
],
|
||||
"parameters": {
|
||||
"width": 735.5589746610085,
|
||||
"height": 1615.4504601771982,
|
||||
"content": "# AI Agent to Chat with Your Search Console Data\n\nThis **AI Agent enables you to interact with your Search Console data** through a **chat interface**. Each node is **documented within the template**, providing sufficient information for setup and usage. You will also need to **configure Search Console OAuth credentials**.\n\nFollow this **[n8n documentation](https://docs.n8n.io/integrations/builtin/credentials/google/oauth-generic/#configure-your-oauth-consent-screen)** to set up the OAuth credentials.\n\n## Important Notes\n\n### Correctly Configure Scopes for Search Console API Calls\n- It’s essential to **configure the scopes correctly** in your Google Search Console API OAuth2 credentials. Incorrect **configuration can cause issues with the refresh token**, requiring frequent reconnections. Below is the configuration I use to **avoid constant re-authentication**:\n\n\n\nOf course, you'll need to add your **client_id** and **client_secret** from the **Google Cloud Platform app** you created to access your Search Console data.\n\n### Configure Authentication for the Webhook\n\nSince the **webhook will be publicly accessible**, don’t forget to **set up authentication**. I’ve used **Basic Auth**, but feel free to **choose the method that best meets your security requirements**.\n\n## 🤩💖 Example of awesome things you can do with this AI Agent\n\n\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fa630aa9-3c60-4b27-9477-aaeb79c7f37d",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
1676,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=user_message : {{ $json.chatInput }}\ndate_message : {{ $json.date_message }}",
|
||||
"options": {
|
||||
"systemMessage": "=Assist users by asking natural, conversational questions to understand their data needs and building a custom JSON API request to retrieve Search Console data. Handle assumptions internally, confirming them with the user in a friendly way. Avoid technical jargon and never imply that the user is directly building an API request.\n\nPre-Step: Retrieve the Website List\nImportant: Initial Action: Before sending your first message to the user, retrieve the list of connected Search Console properties.\n\nTool Call for Website List:\n\nTool name: SearchConsoleRequestTool\nRequest:\n{\n \"request_type\": \"website_list\" // Always include `request_type` in the API call.\n}\nUsage: Use this list to personalize your response in the initial interaction.\nStep-by-Step Guide\nStep 1: Initial Interaction and Introduction\nGreeting:\n\n\"Hi there! I’m here to help you gain valuable insights from your Search Console data. Whether you're interested in a specific time frame, performance breakdown by pages, queries, or other dimensions, I've got you covered.\n\nI can help you retrieve data for these websites:\n\nhttps://example1.com\nhttps://example2.com\nhttps://example3.com\nWhich of these properties would you like to analyze?\"\nStep 2: Handling User Response for Property Selection\nAction: When the user selects a property, use the property URL exactly as listed (e.g., \"https://example.com\") when constructing the API call.\n\nStep 3: Understanding the User's Needs\nAcknowledgment and Setting Defaults:\n\nIf the user expresses a general need (e.g., \"I want the last 3 months of page performance\"), acknowledge their request and set reasonable defaults.\n\nExample Response:\n\n\"Great! I'll gather the top 300 queries from the last 3 months for https://example.com. If you'd like more details or adjustments, just let me know.\"\n\nFollow-up Questions:\n\nConfirming Dimensions: If the user doesn’t specify dimensions, ask:\n\n\"For this analysis, I’ll look at page performance. Does that sound good, or would you like to include other details like queries, devices, or other dimensions?\"\n\nNumber of Results: If the user hasn’t specified the number of results, confirm:\n\n\"I can show you the top 100 results. Let me know if you'd like more or fewer!\"\n\nStep 4: Gathering Specific Inputs (If Necessary)\nAction: If the user provides specific needs, capture and confirm them naturally.\n\nExample Response:\n\n\"Perfect, I’ll pull the data for [specified date range], focusing on [specified dimensions]. Anything else you’d like me to include?\"\n\nImplicit Defaults:\n\nDate Range: Assume \"last 3 months\" if not specified.\nRow Limit: Default to 100, adjustable based on user input.\nStep 5: Confirming Input with the User\nAction: Summarize the request to ensure accuracy.\n\nExample Response:\n\n\"Here’s what I’m preparing: data for https://example.com, covering the last 3 months, focusing on the top 100 queries. Let me know if you’d like to adjust anything!\"\n\nStep 6: Constructing the JSON for Custom Insights\nAction: Build the API call based on the conversation.\n\n{\n \"property\": \"<USER_PROVIDED_PROPERTY_URL>\", // Use the exact property URL.\n \"request_type\": \"custom_insights\",\n \"startDate\": \"<ASSUMED_OR_USER_SPECIFIED_START_DATE>\",\n \"endDate\": \"<ASSUMED_OR_USER_SPECIFIED_END_DATE>\",\n \"dimensions\": [\"<IMPLIED_OR_USER_SPECIFIED_DIMENSIONS>\"], // Array of one or more: \"page\", \"query\", \"searchAppearance\", \"device\", \"country\"\n \"rowLimit\": 300 // Default or user-specified limit.\n}\nStep 7: Presenting the Data\nWhen Retrieving Custom Insights:\n\nImportant: Display all retrieved data in an easy-to-read markdown table format.\nStep 8: Error Handling\nAction: Provide clear, user-friendly error messages when necessary.\n\nExample Response:\n\n\"Hmm, there seems to be an issue retrieving the data. Let’s review what we have or try a different approach.\"\n\nAdditional Notes\nProactive Assistance: Offer suggestions based on user interactions, such as adding dimensions or refining details.\nTone: Maintain a friendly and helpful demeanor throughout the conversation.",
|
||||
"returnIntermediateSteps": true
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
}
|
||||
],
|
||||
"active": true,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "abda3766-7d18-46fb-83e7-c2343ff26385",
|
||||
"connections": {
|
||||
"Switch": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Search Console - Get Custom Insights",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "## Search Console - Get List of Properties",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AI Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set fields": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Tool calling": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set fields - Consruct API CALL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook - ChatInput": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set fields",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Postgres Chat Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Call Search Console Tool": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set fields - Consruct API CALL": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Switch",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Search Console - Get Custom Insights": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set fields - Create searchConsoleDataArray",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"## Search Console - Get List of Properties": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set fields - Create searchConsoleDataArray 2",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set fields - Create searchConsoleDataArray": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Array aggregation - response to AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set fields - Create searchConsoleDataArray 2": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Array aggregation - response to AI Agent1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
235
AI Agent with Ollama for current weather and wiki.txt
Normal file
235
AI Agent with Ollama for current weather and wiki.txt
Normal file
@@ -0,0 +1,235 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a",
|
||||
"templateId": "2931",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "100f23d3-cbe9-458a-9ef1-7cc5fcba8f3c",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
640,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"width": 300,
|
||||
"height": 205,
|
||||
"content": "### The conversation history(last 20 messages) is stored in a buffer memory"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b48f989f-deb9-479c-b163-03f098d00c9c",
|
||||
"name": "On new manual Chat Message",
|
||||
"type": "@n8n/n8n-nodes-langchain.manualChatTrigger",
|
||||
"position": [
|
||||
380,
|
||||
240
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "add8e8df-6b2a-4cbd-84e7-3b006733ef7d",
|
||||
"name": "Wikipedia",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWikipedia",
|
||||
"position": [
|
||||
1180,
|
||||
640
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a97454a8-001d-4986-9cb5-83176229ea70",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
980,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"width": 300,
|
||||
"height": 205,
|
||||
"content": "### Tools which agent can use to accomplish the task"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "52b57e72-8cc9-4865-9a00-d03b2e7f1b92",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
600,
|
||||
160
|
||||
],
|
||||
"parameters": {
|
||||
"width": 422,
|
||||
"height": 211,
|
||||
"content": "### Conversational agent will utilise available tools to answer the prompt. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8f0653ab-376b-40b9-b876-e608defdeb89",
|
||||
"name": "Window Buffer Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
740,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"contextWindowLength": 20
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "13237945-e143-4f65-b034-785f5ebde5bb",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
680,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.input }}",
|
||||
"options": {
|
||||
"systemMessage": "=You are a helpful assistant, with weather tool and wiki tool. find out the latitude and longitude information of a location then use the weather tool for current weather and weather forecast. For general info, use the wiki tool."
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
},
|
||||
{
|
||||
"id": "ee06c0f4-b2de-4257-9735-3ec228f2b794",
|
||||
"name": "Weather HTTP Request",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
|
||||
"position": [
|
||||
1020,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.open-meteo.com/v1/forecast",
|
||||
"sendQuery": true,
|
||||
"parametersQuery": {
|
||||
"values": [
|
||||
{
|
||||
"name": "latitude"
|
||||
},
|
||||
{
|
||||
"name": "longitude"
|
||||
},
|
||||
{
|
||||
"name": "forecast_days",
|
||||
"value": "1",
|
||||
"valueProvider": "fieldValue"
|
||||
},
|
||||
{
|
||||
"name": "hourly",
|
||||
"value": "temperature_2m",
|
||||
"valueProvider": "fieldValue"
|
||||
}
|
||||
]
|
||||
},
|
||||
"toolDescription": "Fetch current temperature for given coordinates."
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "3e5608c8-281d-47e0-af9d-77707530fd6b",
|
||||
"name": "Ollama Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
|
||||
"position": [
|
||||
520,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"model": "llama3.2:latest",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"ollamaApi": {
|
||||
"id": "xHuYe0MDGOs9IpBW",
|
||||
"name": "Local Ollama service"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b3d794f4-37b5-46c8-9d7d-ad1087006ce5",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1040,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"height": 240,
|
||||
"content": "### In System Message, add the following.\n\n\"You are a helpful assistant, with weather tool and wiki tool. find out the latitude and longitude information of a location then use the weather tool for current weather and weather forecast. For general info, use the wiki tool.\""
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Wikipedia": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Ollama Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Weather HTTP Request": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"On new manual Chat Message": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,670 @@
|
||||
{
|
||||
"id": "t1P14FvfibKYCh3E",
|
||||
"meta": {
|
||||
"instanceId": "a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "HR-focused automation pipeline with AI",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "b1092f93-502c-4af0-962e-2b69311b92a3",
|
||||
"name": "On form submission",
|
||||
"type": "n8n-nodes-base.formTrigger",
|
||||
"position": [
|
||||
-520,
|
||||
-200
|
||||
],
|
||||
"webhookId": "2a87705d-8ba1-41f1-80ef-85f364ce253e",
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"formTitle": "Send CV",
|
||||
"formFields": {
|
||||
"values": [
|
||||
{
|
||||
"fieldLabel": "Name",
|
||||
"placeholder": "Name",
|
||||
"requiredField": true
|
||||
},
|
||||
{
|
||||
"fieldType": "email",
|
||||
"fieldLabel": "Email",
|
||||
"placeholder": "Email",
|
||||
"requiredField": true
|
||||
},
|
||||
{
|
||||
"fieldType": "file",
|
||||
"fieldLabel": "CV",
|
||||
"requiredField": true,
|
||||
"acceptFileTypes": ".pdf"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "77edfe2a-4c6a-48c8-8dc9-b275491be090",
|
||||
"name": "Extract from File",
|
||||
"type": "n8n-nodes-base.extractFromFile",
|
||||
"position": [
|
||||
-160,
|
||||
-200
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"operation": "pdf",
|
||||
"binaryPropertyName": "CV"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ebf2e194-3515-4c0a-8745-790b63bf336f",
|
||||
"name": "Qualifications",
|
||||
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
|
||||
"position": [
|
||||
160,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.text }}",
|
||||
"options": {
|
||||
"systemPromptTemplate": "You are an expert extraction algorithm.\nOnly extract relevant information from the text.\nIf you do not know the value of an attribute asked to extract, you may omit the attribute's value."
|
||||
},
|
||||
"attributes": {
|
||||
"attributes": [
|
||||
{
|
||||
"name": "Educational qualification",
|
||||
"required": true,
|
||||
"description": "Summary of your academic career. Focus on your high school and university studies. Summarize in 100 words maximum and also include your grade if applicable."
|
||||
},
|
||||
{
|
||||
"name": "Job History",
|
||||
"required": true,
|
||||
"description": "Work history summary. Focus on your most recent work experiences. Summarize in 100 words maximum"
|
||||
},
|
||||
{
|
||||
"name": "Skills",
|
||||
"required": true,
|
||||
"description": "Extract the candidate’s technical skills. What software and frameworks they are proficient in. Make a bulleted list."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4f40404c-1d47-4bde-9b4b-16367cf11e4f",
|
||||
"name": "Summarization Chain",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainSummarization",
|
||||
"position": [
|
||||
900,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"summarizationMethodAndPrompts": {
|
||||
"values": {
|
||||
"prompt": "=Write a concise summary of the following:\n\nCity: {{ $json.output.city }}\nBirthdate: {{ $json.output.birthdate }}\nEducational qualification: {{ $json.output[\"Educational qualification\"] }}\nJob History: {{ $json.output[\"Job History\"] }}\nSkills: {{ $json.output.Skills }}\n\nUse 100 words or less. Be concise and conversational.",
|
||||
"combineMapPrompt": "=Write a concise summary of the following:\n\nCity: {{ $json.output.city }}\nBirthdate: {{ $json.output.birthdate }}\nEducational qualification: {{ $json.output[\"Educational qualification\"] }}\nJob History: {{ $json.output[\"Job History\"] }}\nSkills: {{ $json.output.Skills }}\n\nUse 100 words or less. Be concise and conversational."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "9f9c5f16-1dc2-4928-aef8-284daeb6be51",
|
||||
"name": "Merge",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
660,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combineBy": "combineAll"
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "51bd14cc-2c54-4f72-b162-255f7e277aff",
|
||||
"name": "Profile Wanted",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1300,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "a3d049b0-5a70-4e7b-a6f2-81447da5282a",
|
||||
"name": "profile_wanted",
|
||||
"type": "string",
|
||||
"value": "We are a web agency and we are looking for a full-stack web developer who knows how to use PHP, Python and Javascript. He has experience in the sector and lives in Northern Italy."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "4a120e5d-b849-4a29-b7f3-12c653552367",
|
||||
"name": "Google Sheets",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
1960,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"CITY": "={{ $('Merge').item.json.output.city }}",
|
||||
"DATA": "={{ $now.format('dd/LL/yyyy') }}",
|
||||
"NAME": "={{ $('On form submission').item.json.Nome }}",
|
||||
"VOTE": "={{ $json.output.vote }}",
|
||||
"EMAIL": "={{ $('On form submission').item.json.Email }}",
|
||||
"SKILLS": "={{ $('Merge').item.json.output.Skills }}",
|
||||
"TELEFONO": "={{ $('Merge').item.json.output.telephone }}",
|
||||
"SUMMARIZE": "={{ $('Summarization Chain').item.json.response.text }}",
|
||||
"EDUCATIONAL": "={{ $('Merge').item.json.output[\"Educational qualification\"] }}",
|
||||
"JOB HISTORY": "={{ $('Merge').item.json.output[\"Job History\"] }}",
|
||||
"DATA NASCITA": "={{ $('Merge').item.json.output.birthdate }}",
|
||||
"CONSIDERATION": "={{ $json.output.consideration }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "DATA",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "DATA",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "NAME",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "NAME",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "PHONE",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "PHONE",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "CITY",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "CITY",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "EMAIL",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "EMAIL",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "DATA NASCITA",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "DATA NASCITA",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "EDUCATIONAL",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "EDUCATIONAL",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "JOB HISTORY",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "JOB HISTORY",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "SKILLS",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "SKILLS",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "SUMMARIZE",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "SUMMARIZE",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "VOTE",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "VOTE",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "CONSIDERATION",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "CONSIDERATION",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ssz5RvN1Hr20Q31pnYnbjCLu1MGBvoLttBAjXunMRQE/edit#gid=0",
|
||||
"cachedResultName": "Foglio1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1ssz5RvN1Hr20Q31pnYnbjCLu1MGBvoLttBAjXunMRQE",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ssz5RvN1Hr20Q31pnYnbjCLu1MGBvoLttBAjXunMRQE/edit?usp=drivesdk",
|
||||
"cachedResultName": "Ricerca WebDev"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "JYR6a64Qecd6t8Hb",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "a154d8a5-9f85-45bb-b082-f702c13c3507",
|
||||
"name": "Structured Output Parser",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"position": [
|
||||
1720,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"schemaType": "manual",
|
||||
"inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"vote\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"consideration\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}"
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "037ac851-7885-4b78-ac75-dfa0ebb6003d",
|
||||
"name": "HR Expert",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
1560,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Profilo ricercato:\n{{ $json.profile_wanted }}\n\nCandidato:\n{{ $('Summarization Chain').item.json.response.text }}",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"message": "Sei un esperto HR e devi capire se il candidato è in linea con il profilo ricercato dall'azienda.\n\nDevi dare un voto da 1 a 10 dove 1 significa che il candidato non è in linea con quanto richiesto mentre 10 significa che è il candidato ideale perchè rispecchia in toto il profilo cercato.\n\nInoltre nel campo \"consideration\" motiva il perchè hai dato quel voto. "
|
||||
}
|
||||
]
|
||||
},
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.5
|
||||
},
|
||||
{
|
||||
"id": "ed5744c4-df06-4a01-a103-af4dd470d482",
|
||||
"name": "Personal Data",
|
||||
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
|
||||
"position": [
|
||||
160,
|
||||
-280
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.text }}",
|
||||
"options": {
|
||||
"systemPromptTemplate": "You are an expert extraction algorithm.\nOnly extract relevant information from the text.\nIf you do not know the value of an attribute asked to extract, you may omit the attribute's value."
|
||||
},
|
||||
"schemaType": "manual",
|
||||
"inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"telephone\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n \"city\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n \"birthdate\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "181c1249-b05c-4c35-8cac-5f9738cc1fe6",
|
||||
"name": "Upload CV",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
-160,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"name": "=CV-{{ $now.format('yyyyLLdd') }}-{{ $json.CV[0].filename }}",
|
||||
"driveId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "My Drive"
|
||||
},
|
||||
"options": {},
|
||||
"folderId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1tzeSpx4D3EAGXa3Wg-gqGbdaUk6LIZTV",
|
||||
"cachedResultUrl": "https://drive.google.com/drive/folders/1tzeSpx4D3EAGXa3Wg-gqGbdaUk6LIZTV",
|
||||
"cachedResultName": "CV"
|
||||
},
|
||||
"inputDataFieldName": "CV"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "HEy5EuZkgPZVEa9w",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "d31ee1c4-e4be-41d9-8f36-e6fb797ced8e",
|
||||
"name": "OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
920,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "CDX6QM4gLYanh0P4",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "0290cb72-a581-4aff-8b5d-1aa63e0a630f",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-560,
|
||||
-680
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 540,
|
||||
"content": "## HR Expert \nThis workflow automates the process of handling job applications by extracting relevant information from submitted CVs, analyzing the candidate's qualifications against a predefined profile, and storing the results in a Google Sheet"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "361084ff-9735-4a56-8988-be573391838b",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-240,
|
||||
-460
|
||||
],
|
||||
"parameters": {
|
||||
"width": 300,
|
||||
"height": 420,
|
||||
"content": "The CV is uploaded to Google Drive and converted so that it can be processed\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4b6f004f-c77b-4522-99d4-737a68f6cfac",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
120,
|
||||
-380
|
||||
],
|
||||
"parameters": {
|
||||
"width": 360,
|
||||
"height": 440,
|
||||
"content": "The essential information for evaluating the candidate is collected in two different chains"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "73e11af9-65e3-4fcd-bb99-8a3f212ce9fb",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
860,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"width": 320,
|
||||
"height": 240,
|
||||
"content": "Summary of relevant information useful for classifying the candidate"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "606711d1-8e6d-44b3-91ac-c047d8a4054f",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1240,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"width": 220,
|
||||
"height": 240,
|
||||
"content": "Characteristics of the profile sought by the company that intends to hire the candidate"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "89c3210c-c599-41dc-97a3-bf8df2beb751",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1500,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"width": 360,
|
||||
"height": 240,
|
||||
"content": "Candidate evaluation with vote and considerations of the HR agent relating the profile sought with the candidate's skills"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "594728c0-b842-404d-8810-c6f7f3f4631d",
|
||||
"connections": {
|
||||
"Merge": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Summarization Chain",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Qualifications",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Summarization Chain",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "HR Expert",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Personal Data",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HR Expert": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Sheets",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Upload CV": {
|
||||
"main": [
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Personal Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Profile Wanted": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "HR Expert",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Qualifications": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract from File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Qualifications",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Personal Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"On form submission": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extract from File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Upload CV",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Summarization Chain": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Profile Wanted",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Structured Output Parser": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "HR Expert",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,439 @@
|
||||
{
|
||||
"id": "tMiRJYDrXzpKysTX",
|
||||
"meta": {
|
||||
"instanceId": "2723a3a635131edfcb16103f3d4dbaadf3658e386b4762989cbf49528dccbdbd",
|
||||
"templateId": "1960"
|
||||
},
|
||||
"name": "Stock Q&A Workflow",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "ec3b86be-4113-4fd5-8365-02adb67693e9",
|
||||
"name": "Embeddings OpenAI1",
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"position": [
|
||||
1960,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "fOF5kro9BJ6KMQ7n",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "42fd8020-3861-4d0f-a7a2-70e2c35f0bed",
|
||||
"name": "On new manual Chat Message",
|
||||
"type": "@n8n/n8n-nodes-langchain.manualChatTrigger",
|
||||
"disabled": true,
|
||||
"position": [
|
||||
1620,
|
||||
240
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a9b48d04-691e-4537-90f8-d7a4aa6153af",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1560,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 903.0896125323785,
|
||||
"height": 733.5099670584011,
|
||||
"content": "## Step 2: Setup the Q&A \n### The incoming message from the webhook is queried from the Supabase Vector Store. The response is provided in the response webhook. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "472b4800-745a-4337-9545-163247f7e9ae",
|
||||
"name": "Retrieval QA Chain",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainRetrievalQa",
|
||||
"position": [
|
||||
1880,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"query": "={{ $json.body.input }}"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e58bd82d-abc6-44ed-8e93-ec5436126d66",
|
||||
"name": "Respond to Webhook",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"position": [
|
||||
2280,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"respondWith": "text",
|
||||
"responseBody": "={{ $json.response.text }}"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "04bbf01e-8269-47c7-897d-4ea94a1bd1c0",
|
||||
"name": "Vector Store Retriever",
|
||||
"type": "@n8n/n8n-nodes-langchain.retrieverVectorStore",
|
||||
"position": [
|
||||
2020,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"topK": 5
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "feee6d68-2e0d-4d40-897e-c1d833a13bf2",
|
||||
"name": "Webhook1",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
1620,
|
||||
420
|
||||
],
|
||||
"webhookId": "679f4afb-189e-4f04-9dc0-439eec2ec5f1",
|
||||
"parameters": {
|
||||
"path": "19f5499a-3083-4783-93a0-e8ed76a9f742",
|
||||
"options": {},
|
||||
"httpMethod": "POST",
|
||||
"responseMode": "responseNode"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "1b8d251f-7069-4d7d-b6d6-4bfa683d4ad1",
|
||||
"name": "When clicking \"Execute Workflow\"",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
280,
|
||||
260
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b746a7a4-ed94-4332-bf7b-65aadcf54130",
|
||||
"name": "Google Drive",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
580,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"fileId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1LZezppYrWpMStr4qJXtoIX-Dwzvgehll",
|
||||
"cachedResultUrl": "https://drive.google.com/file/d/1LZezppYrWpMStr4qJXtoIX-Dwzvgehll/view?usp=drivesdk",
|
||||
"cachedResultName": "crowdstrike.pdf"
|
||||
},
|
||||
"options": {},
|
||||
"operation": "download"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "1tsDIpjUaKbXy0be",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "83a7d470-f934-436d-ba3f-1ae7c776f5a5",
|
||||
"name": "Binary to Document",
|
||||
"type": "@n8n/n8n-nodes-langchain.documentBinaryInputLoader",
|
||||
"position": [
|
||||
860,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"loader": "pdfLoader",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b52b4a90-99a1-49cc-a6f0-7551d6754496",
|
||||
"name": "Recursive Character Text Splitter",
|
||||
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
|
||||
"position": [
|
||||
860,
|
||||
640
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"chunkSize": 3000,
|
||||
"chunkOverlap": 200
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b525e130-2029-4f55-a603-1fdc05a19c17",
|
||||
"name": "Embeddings OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"position": [
|
||||
1160,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "fOF5kro9BJ6KMQ7n",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5358c53f-55f9-431d-8956-c6bae7ad25bc",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
540,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 772.0680602743597,
|
||||
"height": 732.3675002130781,
|
||||
"content": "## Step 1: Upserting the PDF\n### Fetch file from Google Drive, split it into chunks and insert into Supabase index\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fb91e2da-0eeb-47a5-aa49-65bf56986857",
|
||||
"name": "Qdrant Vector Store",
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
|
||||
"position": [
|
||||
940,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "insert",
|
||||
"options": {},
|
||||
"qdrantCollection": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "=crowd"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"qdrantApi": {
|
||||
"id": "U5CpjAgFeXziP3I1",
|
||||
"name": "QdrantApi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "89e14837-d1fc-4b1e-9ebc-7cf3e7fd9a70",
|
||||
"name": "Qdrant Vector Store1",
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
|
||||
"position": [
|
||||
1980,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"qdrantCollection": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "={{ $json.body.company }}"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"qdrantApi": {
|
||||
"id": "U5CpjAgFeXziP3I1",
|
||||
"name": "QdrantApi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c619245b-5ea0-4354-974d-21ec6b8efa93",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1880,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "fOF5kro9BJ6KMQ7n",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e4aa780d-8069-4308-a61f-82ed876af71a",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-560,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 710.9124489067698,
|
||||
"height": 726.4452519516944,
|
||||
"content": "## Start here: Step-by Step Youtube Tutorial :star:\n\n[](https://www.youtube.com/watch?v=pMvizUx5n1g)\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": true,
|
||||
"pinData": {},
|
||||
"settings": {},
|
||||
"versionId": "463aec94-26a6-436d-8732-fc01d637c6ae",
|
||||
"connections": {
|
||||
"Webhook1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Retrieval QA Chain",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Drive": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Retrieval QA Chain",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Binary to Document": {
|
||||
"ai_document": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store",
|
||||
"type": "ai_document",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI1": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store1",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Retrieval QA Chain": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Qdrant Vector Store1": {
|
||||
"ai_vectorStore": [
|
||||
[
|
||||
{
|
||||
"node": "Vector Store Retriever",
|
||||
"type": "ai_vectorStore",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Vector Store Retriever": {
|
||||
"ai_retriever": [
|
||||
[
|
||||
{
|
||||
"node": "Retrieval QA Chain",
|
||||
"type": "ai_retriever",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"On new manual Chat Message": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Retrieval QA Chain",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \"Execute Workflow\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Drive",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Recursive Character Text Splitter": {
|
||||
"ai_textSplitter": [
|
||||
[
|
||||
{
|
||||
"node": "Binary to Document",
|
||||
"type": "ai_textSplitter",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
330
AI Customer feedback sentiment analysis.txt
Normal file
330
AI Customer feedback sentiment analysis.txt
Normal file
@@ -0,0 +1,330 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "82a17fa4a0b8e81bf77e5ab999d980f392150f2a9541fde626dc5f74857b1f54"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "4ea39a4f-d8c1-438f-9738-bfbb906a3d7a",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1200,
|
||||
1020
|
||||
],
|
||||
"parameters": {
|
||||
"width": 253,
|
||||
"height": 342,
|
||||
"content": "## Send customer feedback to OpenAI for sentiment analysis"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6962ea41-7d15-4932-919f-21ac94fa1269",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1960,
|
||||
1180
|
||||
],
|
||||
"parameters": {
|
||||
"width": 253,
|
||||
"height": 342,
|
||||
"content": "## Add new feedback to google sheets"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4c8a8984-2d8e-4139-866b-6f3536aced07",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
800,
|
||||
1600
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1407,
|
||||
"height": 254,
|
||||
"content": "## Instructions\n1. Connect Google sheets\n2. Connect your OpenAi account (api key + org Id)\n3. Create a customer feedback form, use an existing one or use the one below as example. \nAll set!\n\n\n- Here is the example google sheet being used in this workflow: https://docs.google.com/spreadsheets/d/1omWdRbiT6z6GNZ6JClu9gEsRhPQ6J0EJ2yXyFH9Zng4/edit?usp=sharing. You can download it to your account."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d43a9574-626d-4817-87ba-d99bdd6f41dc",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
800,
|
||||
1160
|
||||
],
|
||||
"parameters": {
|
||||
"width": 253,
|
||||
"height": 342,
|
||||
"content": "## Feedback form is submitted"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "76dab2dc-935f-416e-91aa-5a1b7017ec1b",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1600,
|
||||
1180
|
||||
],
|
||||
"parameters": {
|
||||
"width": 253,
|
||||
"height": 342,
|
||||
"content": "## Merge form data and OpenAI result"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9772eac1-8df2-4305-9b2c-265d3c5a9a4a",
|
||||
"name": "Add customer feedback to Google Sheets",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
2020,
|
||||
1320
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"Category": "={{ $json['What is your feedback about?'] }}",
|
||||
"Sentiment": "={{ $json.text }}",
|
||||
"Timestamp": "={{ $json.submittedAt }}",
|
||||
"Entered by": "=Form",
|
||||
"Customer Name": "={{ $json.Name }}",
|
||||
"Customer contact": "={{ $json['How do we get in touch with you?'] }}",
|
||||
"Customer Feedback": "={{ $json['Your feedback'] }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "Timestamp",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Timestamp",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Category",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Category",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Customer Feedback",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Customer Feedback",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Customer Name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Customer Name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Customer contact",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Customer contact",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Entered by",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Entered by",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Urgent?",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Urgent?",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "Sentiment",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "Sentiment",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": []
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1omWdRbiT6z6GNZ6JClu9gEsRhPQ6J0EJ2yXyFH9Zng4/edit#gid=0",
|
||||
"cachedResultName": "Sheet1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1omWdRbiT6z6GNZ6JClu9gEsRhPQ6J0EJ2yXyFH9Zng4",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1omWdRbiT6z6GNZ6JClu9gEsRhPQ6J0EJ2yXyFH9Zng4/edit?usp=drivesdk",
|
||||
"cachedResultName": "CustomerFeedback"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "3",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "12084971-c81b-4a0e-814e-120867562642",
|
||||
"name": "Merge sentiment with form content",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1680,
|
||||
1320
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "multiplex"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "235edf5b-7724-4712-8dc5-d8327a0620b8",
|
||||
"name": "Classify feedback with OpenAI",
|
||||
"type": "n8n-nodes-base.openAi",
|
||||
"position": [
|
||||
1280,
|
||||
1180
|
||||
],
|
||||
"parameters": {
|
||||
"prompt": "=Classify the sentiment in the following customer feedback: {{ $json['Your feedback'] }}",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "s2iucY0IctjYNbrb",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "af4b22aa-0925-40b1-a9ac-298f9745a98e",
|
||||
"name": "Submit form with customer feedback",
|
||||
"type": "n8n-nodes-base.formTrigger",
|
||||
"position": [
|
||||
860,
|
||||
1340
|
||||
],
|
||||
"webhookId": "e7bf682e-48e8-40de-9815-cd180cdd1480",
|
||||
"parameters": {
|
||||
"options": {
|
||||
"formSubmittedText": "Your response has been recorded"
|
||||
},
|
||||
"formTitle": "Customer Feedback",
|
||||
"formFields": {
|
||||
"values": [
|
||||
{
|
||||
"fieldLabel": "Name",
|
||||
"requiredField": true
|
||||
},
|
||||
{
|
||||
"fieldType": "dropdown",
|
||||
"fieldLabel": "What is your feedback about?",
|
||||
"fieldOptions": {
|
||||
"values": [
|
||||
{
|
||||
"option": "Product"
|
||||
},
|
||||
{
|
||||
"option": "Service"
|
||||
},
|
||||
{
|
||||
"option": "Other"
|
||||
}
|
||||
]
|
||||
},
|
||||
"requiredField": true
|
||||
},
|
||||
{
|
||||
"fieldType": "textarea",
|
||||
"fieldLabel": "Your feedback",
|
||||
"requiredField": true
|
||||
},
|
||||
{
|
||||
"fieldLabel": "How do we get in touch with you?"
|
||||
}
|
||||
]
|
||||
},
|
||||
"formDescription": "Please give feedback about our company orproducts."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"Classify feedback with OpenAI": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge sentiment with form content",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge sentiment with form content": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Add customer feedback to Google Sheets",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Submit form with customer feedback": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Classify feedback with OpenAI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Merge sentiment with form content",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1623
AI Data Extraction with Dynamic Prompts and Airtable.txt
Normal file
1623
AI Data Extraction with Dynamic Prompts and Airtable.txt
Normal file
File diff suppressed because it is too large
Load Diff
1300
AI Data Extraction with Dynamic Prompts and Baserow.txt
Normal file
1300
AI Data Extraction with Dynamic Prompts and Baserow.txt
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,257 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "c3ef40df-084e-435c-9a11-3aa0a2f94f36",
|
||||
"name": "When clicking \"Test workflow\"",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
740,
|
||||
520
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e0583472-a450-4582-83bc-84a014bea543",
|
||||
"name": "Split Out",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
1640,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "output.results"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b8aa573d-5b63-4669-900f-bcc915b6ad41",
|
||||
"name": "Save to Google Sheets",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
1900,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {},
|
||||
"schema": [
|
||||
{
|
||||
"id": "name",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "name",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "price",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "price",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "availability",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "availability",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "image",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "image",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "link",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "link",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "autoMapInputData",
|
||||
"matchingColumns": [
|
||||
"Book prices"
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"operation": "append",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": 258629074,
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VDbfi2PpeheD2ZlO6feX3RdMeSsm0XukQlNVW8uVcuo/edit#gid=258629074",
|
||||
"cachedResultName": "Sheet2"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1VDbfi2PpeheD2ZlO6feX3RdMeSsm0XukQlNVW8uVcuo",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1VDbfi2PpeheD2ZlO6feX3RdMeSsm0XukQlNVW8uVcuo/edit?usp=drivesdk",
|
||||
"cachedResultName": "Book Prices"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "GHRceL2SKjXxz0Dx",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "a63c3ab3-6aab-43b2-8af6-8b00e24e0ee6",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1300,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "5oYe8Cxj7liOPAKk",
|
||||
"name": "Derek T"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "40326966-0c46-4df2-8d80-fa014e05b693",
|
||||
"name": "Information Extractor",
|
||||
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
|
||||
"position": [
|
||||
1260,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.data }}",
|
||||
"options": {
|
||||
"systemPromptTemplate": "You are an expert extraction algorithm.\nOnly extract relevant information from the text.\nIf you do not know the value of an attribute asked to extract, you may omit the attribute's value.\nAlways output the data in a json array called results. Each book should have a title, price, availability and product_url, image_url"
|
||||
},
|
||||
"schemaType": "manual",
|
||||
"inputSchema": "{\n \"results\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"price\": {\n \"type\": \"string\"\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"image_url\": {\n \"type\": \"string\"\n },\n \"product_url\": {\n \"type\": \"string\"\n },\n \"availability\": {\n \"type\": \"string\"\n } \n }\n }\n }\n}"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8ddca560-8da7-4090-b865-0523f95ca463",
|
||||
"name": "Jina Fetch",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1020,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://r.jina.ai/http://books.toscrape.com/catalogue/category/books/historical-fiction_4/index.html",
|
||||
"options": {
|
||||
"allowUnauthorizedCerts": true
|
||||
},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "ALBmOXmADcPmyHr1",
|
||||
"name": "jina"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "b1745cea-fdbe-4f14-b09c-884549beac7e",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
80,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 587,
|
||||
"height": 570,
|
||||
"content": "## Start here: Step-by Step Youtube Tutorial :star:\n\n[](https://youtu.be/f3AJYXHirr8)\n\n[Google Sheet Example](https://docs.google.com/spreadsheets/d/1VDbfi2PpeheD2ZlO6feX3RdMeSsm0XukQlNVW8uVcuo/edit?usp=sharing)\n\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Split Out": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Save to Google Sheets",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Jina Fetch": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Information Extractor",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Information Extractor",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Information Extractor": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \"Test workflow\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Jina Fetch",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,423 @@
|
||||
{
|
||||
"id": "TtoDcjgthgA4NTkU",
|
||||
"meta": {
|
||||
"instanceId": "fb261afc5089eae952e09babdadd9983000b3d863639802f6ded8c5be2e40067",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "AI Voice Chat using Webhook, Memory Manager, OpenAI, Google Gemini & ElevenLabs",
|
||||
"tags": [
|
||||
{
|
||||
"id": "mqOrNvCDgQLzPA2x",
|
||||
"name": "Workflows",
|
||||
"createdAt": "2024-08-07T14:18:53.614Z",
|
||||
"updatedAt": "2024-08-07T14:18:53.614Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "86cbf150-df4f-42f7-b7b3-e03c32e6f23c",
|
||||
"name": "Get Chat",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryManager",
|
||||
"position": [
|
||||
1700,
|
||||
-400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "a9153a24-e902-4f29-9b83-447317ce3119",
|
||||
"name": "Insert Chat",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryManager",
|
||||
"position": [
|
||||
2540,
|
||||
-400
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "insert",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"type": "user",
|
||||
"message": "={{ $('OpenAI - Speech to Text').item.json[\"text\"] }}"
|
||||
},
|
||||
{
|
||||
"type": "ai",
|
||||
"message": "={{ $json.text }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "f5c272d4-248b-45a5-87b5-eb659a865d05",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1664,
|
||||
-491
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 486.4746124819703,
|
||||
"height": 238.4911357933579,
|
||||
"content": "## Get Context"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "32ad17ca-0045-487d-9387-71c2e73629d4",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2510,
|
||||
-489
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 321.2536584847704,
|
||||
"height": 231.05945912581728,
|
||||
"content": "## Save Context"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "17ae4f1a-6192-4c52-8157-3cb47b37e0fb",
|
||||
"name": "Aggregate",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
2020,
|
||||
-400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData",
|
||||
"destinationFieldName": "context"
|
||||
},
|
||||
"typeVersion": 1,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "00b3081e-fbcd-489b-b45a-4e847c346594",
|
||||
"name": "Window Buffer Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
2080,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"sessionKey": "test-0dacb3b5-4bcd-47dd-8456-dcfd8c258204",
|
||||
"sessionIdType": "customKey"
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "55ca2790-e905-414a-a9f6-7d88a9e5807d",
|
||||
"name": "Google Gemini Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
|
||||
"position": [
|
||||
2220,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"modelName": "models/gemini-1.5-flash"
|
||||
},
|
||||
"credentials": {
|
||||
"googlePalmApi": {
|
||||
"id": "2bUF1ZI9hoMIM5XN",
|
||||
"name": "Google Gemini(PaLM) Api account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e8b3433f-b205-404c-9f05-504556d6b6dd",
|
||||
"name": "Respond to Webhook",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"position": [
|
||||
3560,
|
||||
-400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"respondWith": "binary"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "de296743-5ac7-454b-bf3a-d020cc024511",
|
||||
"name": "ElevenLabs - Generate Audio",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
3240,
|
||||
-400
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.elevenlabs.io/v1/text-to-speech/{{voice id}}",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "text",
|
||||
"value": "={{ $('Basic LLM Chain').item.json.text }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpCustomAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpCustomAuth": {
|
||||
"id": "lnGfV4BlxSE6Xc4X",
|
||||
"name": "Eleven Labs"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "214e15f2-8a16-4598-b4ac-9fc2ec6545e6",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3040,
|
||||
-560
|
||||
],
|
||||
"parameters": {
|
||||
"width": 468.73250812192407,
|
||||
"height": 843.7602354099661,
|
||||
"content": "* ### For the Text-to-Speech part, we'll use ElevenLabs.io, which is free and offers a variety of voices to choose from. However, you can also use the OpenAI `\"Generate audio\"` node instead.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n* ### Since there is no pre-built node for `\"ElevenLabs\"` in n8n, we'll connect to it through its API using the \"HTTP Request\" node.\n\n## Prerequisites:\n* ### `\"ElevenLabs API Key\"` (you can obtain it from their website).\n* ### `\"Voice ID\"` (you can also get it from ElevenLabs' \"Voice Library\").\n## Setup\n* ### In the URL parameter, replace \"{{voice id}}\" at the end of the URL with the Voice ID you obtained from ElevenLabs.io.\n* ### To set up your API Key, add custom authentication and include the following `JSON` with your acual ElevenLabs API Key:\n```json\n{\n \"headers\": {\n \"xi-api-key\": \"put-your-API-Key-here\"\n }\n}\n```"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "94ad934c-4a13-47b1-83a5-76fab43b3a47",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1663,
|
||||
-598
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 487.4293487597613,
|
||||
"height": 91.01435855269375,
|
||||
"content": "### The \"Get Chat,\" \"Insert Chat,\" and \"Window Buffer Memory\" nodes will help the LLM model maintain context throughout the conversation."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0a96f48d-0d8b-4240-9eab-a681bfd4c8b5",
|
||||
"name": "Limit",
|
||||
"type": "n8n-nodes-base.limit",
|
||||
"position": [
|
||||
2900,
|
||||
-400
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9a5d4ddb-6403-4758-858e-9fbe10c421a9",
|
||||
"name": "Basic LLM Chain",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
2200,
|
||||
-400
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $('OpenAI - Speech to Text').item.json[\"text\"] }}",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"type": "AIMessagePromptTemplate",
|
||||
"message": "=To maintain context and fully understand the user's question, always review the previous conversation between you and him before providing an answer.\nThis is the previous conversation:\n{{ $('Aggregate').item.json[\"context\"].map(m => `\nHuman: ${m.human || 'undefined'}\nAI Assistant: ${m.ai || 'undefined'}\n`).join('') }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.4
|
||||
},
|
||||
{
|
||||
"id": "f2f99895-9678-41b8-ad28-db40e1e23dc0",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
1320,
|
||||
-400
|
||||
],
|
||||
"webhookId": "e9f611eb-a8dd-4520-8d24-9f36deaca528",
|
||||
"parameters": {
|
||||
"path": "voice_message",
|
||||
"options": {},
|
||||
"httpMethod": "POST",
|
||||
"responseMode": "responseNode"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "d9a5fb04-4c02-4da4-b690-7b0ecd0ae052",
|
||||
"name": "OpenAI - Speech to Text",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
1500,
|
||||
-400
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"resource": "audio",
|
||||
"operation": "transcribe",
|
||||
"binaryPropertyName": "voice_message"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "2Cije3KX7OIVwn9B",
|
||||
"name": "n8n OpenAI"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
}
|
||||
],
|
||||
"active": true,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"callerPolicy": "workflowsFromSameOwner",
|
||||
"executionOrder": "v1",
|
||||
"saveManualExecutions": true
|
||||
},
|
||||
"versionId": "fe5792ca-03d7-4cdd-96db-20f4cd479c7e",
|
||||
"connections": {
|
||||
"Limit": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "ElevenLabs - Generate Audio",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "OpenAI - Speech to Text",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Chat": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Basic LLM Chain",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Insert Chat": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Limit",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Basic LLM Chain": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Insert Chat",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "Insert Chat",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Get Chat",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI - Speech to Text": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Chat",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Gemini Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Basic LLM Chain",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"ElevenLabs - Generate Audio": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,638 @@
|
||||
{
|
||||
"id": "ibiHg6umCqvcTF4g",
|
||||
"meta": {
|
||||
"instanceId": "a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Voice RAG Chatbot with ElevenLabs and OpenAI",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "5898da57-38b0-4d29-af25-fe029cda7c4a",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
-180,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.body.question }}",
|
||||
"options": {},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "81bbedb6-5a07-4977-a68f-2bdc75b17aba",
|
||||
"name": "Vector Store Tool",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolVectorStore",
|
||||
"position": [
|
||||
20,
|
||||
1040
|
||||
],
|
||||
"parameters": {
|
||||
"name": "company",
|
||||
"description": "Risponde alle domande relative a ciò che ti viene chiesto"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fd021f6c-248d-41f4-a4f9-651e70692327",
|
||||
"name": "Qdrant Vector Store",
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
|
||||
"position": [
|
||||
-140,
|
||||
1300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"qdrantCollection": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "=COLLECTION"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"qdrantApi": {
|
||||
"id": "iyQ6MQiVaF3VMBmt",
|
||||
"name": "QdrantApi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "84aca7bb-4812-498f-b319-88831e4ca412",
|
||||
"name": "Embeddings OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"position": [
|
||||
-140,
|
||||
1460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "CDX6QM4gLYanh0P4",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "82e430db-2ad7-427d-bcf9-6aa226253d18",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-760,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 1400,
|
||||
"height": 240,
|
||||
"content": "# STEP 4\n\n## RAG System\n\nClick on \"test workflow\" on n8n and \"Test AI agent\" on ElevenLabs. If everything is configured correctly, when you ask a question to the agent, the webhook on n8n is activated with the \"question\" field in the body filled with the question asked to the voice agent.\n\nThe AI Agent will extract the information from the vector database, send it to the model to create the response which will be sent via the response webhook to ElevenLabs which will transform it into voice"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6a19e9fa-50fa-4d51-ba41-d03c999e4649",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-780,
|
||||
-880
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 1420,
|
||||
"height": 360,
|
||||
"content": "# STEP 1\n\n## Create an Agent on ElevenLabs \n- Create an agent on ElevenLabs (eg. test_n8n)\n- Add \"First message\" (eg. Hi, Can I help you?)\n- Add the \"System Prompt\" message... eg:\n'You are the waiter of \"Pizzeria da Michele\" in Verona. If you are asked a question, use the tool \"test_chatbot_elevenlabs\". When you receive the answer from \"test_chatbot_elevenlabs\" answer the user clearly and precisely.'\n- In Tools add a Webhook called eg. \"test_chatbot_elevenlabs\" and add the following description:\n'You are the waiter. Answer the questions asked and store them in the question field.'\n- Add the n8n webhook URL (method POST)\n- Enable \"Body Parameters\" and insert in the description \"Ask the user the question to ask the place.\", then in the \"Properties\" add a data type string called \"question\", value type \"LLM Prompt\" and description \"user question\""
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ec053ee7-3a4a-4697-a08c-5645810d23f0",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-740,
|
||||
-200
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3e71e40c-a5cc-40cf-a159-aeedc97c47d1",
|
||||
"name": "Create collection",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-440,
|
||||
-340
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://QDRANTURL/collections/COLLECTION",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "{\n \"filter\": {}\n}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "qhny6r5ql9wwotpn",
|
||||
"name": "Qdrant API (Hetzner)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "240283fc-50ec-475c-bd24-e6d0a367c10c",
|
||||
"name": "Refresh collection",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-440,
|
||||
-80
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://QDRANTURL/collections/COLLECTION/points/delete",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "{\n \"filter\": {}\n}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "qhny6r5ql9wwotpn",
|
||||
"name": "Qdrant API (Hetzner)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "7d10fda0-c6ab-4bf5-b73e-b93a84937eff",
|
||||
"name": "Get folder",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
-220,
|
||||
-80
|
||||
],
|
||||
"parameters": {
|
||||
"filter": {
|
||||
"driveId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "My Drive",
|
||||
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
|
||||
"cachedResultName": "My Drive"
|
||||
},
|
||||
"folderId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "=test-whatsapp"
|
||||
}
|
||||
},
|
||||
"options": {},
|
||||
"resource": "fileFolder"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "HEy5EuZkgPZVEa9w",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "c5761ad2-e66f-4d65-b653-0e89ea017f17",
|
||||
"name": "Download Files",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
0,
|
||||
-80
|
||||
],
|
||||
"parameters": {
|
||||
"fileId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "={{ $json.id }}"
|
||||
},
|
||||
"options": {
|
||||
"googleFileConversion": {
|
||||
"conversion": {
|
||||
"docsToFormat": "text/plain"
|
||||
}
|
||||
}
|
||||
},
|
||||
"operation": "download"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "HEy5EuZkgPZVEa9w",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "1f031a11-8ef3-4392-a7db-9bca00840b8f",
|
||||
"name": "Default Data Loader",
|
||||
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
|
||||
"position": [
|
||||
380,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"dataType": "binary"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7f614392-7bc7-408c-8108-f289a81d5cf6",
|
||||
"name": "Token Splitter",
|
||||
"type": "@n8n/n8n-nodes-langchain.textSplitterTokenSplitter",
|
||||
"position": [
|
||||
360,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"chunkSize": 300,
|
||||
"chunkOverlap": 30
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "648c5b3d-37a8-4a89-b88c-38e1863f09dc",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-240,
|
||||
-400
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 880,
|
||||
"height": 220,
|
||||
"content": "# STEP 2\n\n## Create Qdrant Collection\nChange:\n- QDRANTURL\n- COLLECTION"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a6c50f3c-3c73-464e-9bdc-49de96401c1b",
|
||||
"name": "Qdrant Vector Store1",
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
|
||||
"position": [
|
||||
240,
|
||||
-80
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "insert",
|
||||
"options": {},
|
||||
"qdrantCollection": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "=COLLECTION"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"qdrantApi": {
|
||||
"id": "iyQ6MQiVaF3VMBmt",
|
||||
"name": "QdrantApi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7e19ac49-4d90-4258-bd44-7ca4ffa0128a",
|
||||
"name": "Embeddings OpenAI1",
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"position": [
|
||||
220,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "CDX6QM4gLYanh0P4",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "bfa104a2-1f9c-4200-ae7b-4659894c1e6f",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-460,
|
||||
-140
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 620,
|
||||
"height": 400,
|
||||
"content": "# STEP 3\n\n\n\n\n\n\n\n\n\n\n\n\n## Documents vectorization with Qdrant and Google Drive\nChange:\n- QDRANTURL\n- COLLECTION"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a148ffcf-335f-455d-8509-d98c711ed740",
|
||||
"name": "Respond to ElevenLabs",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"position": [
|
||||
380,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "5d19f73a-b8e8-4e75-8f67-836180597572",
|
||||
"name": "OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
-300,
|
||||
1040
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "CDX6QM4gLYanh0P4",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "802b76e1-3f3e-490c-9e3b-65dc5b28d906",
|
||||
"name": "Listen",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
-700,
|
||||
800
|
||||
],
|
||||
"webhookId": "e9f611eb-a8dd-4520-8d24-9f36deaca528",
|
||||
"parameters": {
|
||||
"path": "test_voice_message_elevenlabs",
|
||||
"options": {},
|
||||
"httpMethod": "POST",
|
||||
"responseMode": "responseNode"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "bdc55a38-1d4b-48fe-bbd8-29bf1afd954a",
|
||||
"name": "Window Buffer Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
-140,
|
||||
1040
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "2d5dd8cb-81eb-41bc-af53-b894e69e530c",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
200,
|
||||
1320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "CDX6QM4gLYanh0P4",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "92d04432-1dbb-4d79-9edc-42378aee1c53",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-760,
|
||||
1620
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1400,
|
||||
"height": 240,
|
||||
"content": "# STEP 5\n\n## Add Widget\n\nAdd the widget to your business website by replacing AGENT_ID with the agent id you created on ElevenLabs\n\n<elevenlabs-convai agent-id=\"AGENT_ID\"></elevenlabs-convai><script src=\"https://elevenlabs.io/convai-widget/index.js\" async type=\"text/javascript\"></script>"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "6738abfe-e626-488d-a00b-81021cb04aaf",
|
||||
"connections": {
|
||||
"Listen": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AI Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to ElevenLabs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get folder": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Files",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Files": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Token Splitter": {
|
||||
"ai_textSplitter": [
|
||||
[
|
||||
{
|
||||
"node": "Default Data Loader",
|
||||
"type": "ai_textSplitter",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Vector Store Tool",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Vector Store Tool": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI1": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store1",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Refresh collection": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get folder",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Default Data Loader": {
|
||||
"ai_document": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store1",
|
||||
"type": "ai_document",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Qdrant Vector Store": {
|
||||
"ai_vectorStore": [
|
||||
[
|
||||
{
|
||||
"node": "Vector Store Tool",
|
||||
"type": "ai_vectorStore",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create collection",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Refresh collection",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
488
AI Youtube Trend Finder Based On Niche.txt
Normal file
488
AI Youtube Trend Finder Based On Niche.txt
Normal file
@@ -0,0 +1,488 @@
|
||||
{
|
||||
"id": "XSyVFC1tsGSxNwX9",
|
||||
"meta": {
|
||||
"instanceId": "60ad864624415060d2d0a0e71acd8b3b40e4ee2e9ef4b439d9937d3d33537a96"
|
||||
},
|
||||
"name": "Complete Youtube",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "fd74706b-609b-4723-b4a4-067e1b064194",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
300,
|
||||
60
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"systemMessage": "=You help youtube creators find trending videos based on a specific niche.\n\nVerify if the user informed a niche before doing anything. If not, then ask him for one by giving him suggestions for him to select from.\n\nAfter you know what type of content the user might produce, use the \"youtube_search\" tool up to 3 times with different search terms based on the user's content type and niche.\n\nThe tool will answer with a list of videos from the last 2 days that had the most amount of relevancy. It returns a list of json's covering each video's id, view count, like count, comment count, description, channel title, tags and channel id. Each video is separated by \"### NEXT VIDEO FOUND: ###\".\n\nYou should then proceed to understand the data received then provide the user with insightful data of what could be trending from the past 2 days. Provide the user links to the trending videos which should be in this structure:\n\nhttps://www.youtube.com/watch?v={video_id}\n\nto reach the channel's link you should use:\n\nhttps://www.youtube.com/channel/{channel_id}\n\nFind patterns in the tags, titles and especially in the related content for the videos found.\n\nYour mission isn't to find the trending videos. It's to provide the user with valuable information of what is trending in that niche in terms of content news. Remember to provide the user with the numbers of views, likes and comments while commenting about any video. So you should not talk about any particular video, focus rather in explaining the overall senario of all that was found.\n\nExample of response:\n\n\"It seems like what is trending in digital marketing right now is talking about mental triggers, since 3 of the most trending videos in the last 2 days were about...\""
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
},
|
||||
{
|
||||
"id": "ced4b937-b590-4727-b1f2-a5e88b96091a",
|
||||
"name": "chat_message_received",
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"position": [
|
||||
80,
|
||||
60
|
||||
],
|
||||
"webhookId": "ff9622a4-a6ec-4396-b9de-c95bd834c23c",
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "35a91359-5007-407d-a750-d6642e595690",
|
||||
"name": "youtube_search",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
|
||||
"position": [
|
||||
540,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"name": "youtube_search",
|
||||
"workflowId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "N9DveO781xbNf8qs",
|
||||
"cachedResultName": "Youtube Search Workflow"
|
||||
},
|
||||
"description": "Call this tool to search for trending videos based on a query.",
|
||||
"jsonSchemaExample": "{\n\t\"search_term\": \"some_value\"\n}",
|
||||
"specifyInputSchema": true
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "42f41096-531d-4587-833a-6f659ef78dd0",
|
||||
"name": "openai_llm",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
260,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e4bda5b9-abd4-4cd6-8c95-126a01aa6e21",
|
||||
"name": "window_buffer_memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
400,
|
||||
180
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "f6d86c5a-393a-4bcf-bdaf-3b06c79fa51d",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 693.2572054941234,
|
||||
"height": 354.53098948245656,
|
||||
"content": "Main Workflow"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4ddbc3f0-e3d7-4ce4-a732-d731c05024d2",
|
||||
"name": "find_video_data1",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
700,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://www.googleapis.com/youtube/v3/videos?",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "key",
|
||||
"value": "={{ $env[\"GOOGLE_API_KEY\"] }}"
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"value": "={{ $json.id.videoId }}"
|
||||
},
|
||||
{
|
||||
"name": "part",
|
||||
"value": "contentDetails, snippet, statistics"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "fdb28635-801d-4ce0-8919-11446c6a7a82",
|
||||
"name": "get_videos1",
|
||||
"type": "n8n-nodes-base.youTube",
|
||||
"position": [
|
||||
280,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"limit": 3,
|
||||
"filters": {
|
||||
"q": "={{ $json.query.search_term }}",
|
||||
"regionCode": "US",
|
||||
"publishedAfter": "={{ new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString() }}"
|
||||
},
|
||||
"options": {
|
||||
"order": "relevance",
|
||||
"safeSearch": "moderate"
|
||||
},
|
||||
"resource": "video"
|
||||
},
|
||||
"credentials": {
|
||||
"youTubeOAuth2Api": {
|
||||
"id": "dCyrga3t1tlgQQy0",
|
||||
"name": "YouTube account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "60e9e61d-0e5e-4212-8b55-71299aeec4d5",
|
||||
"name": "response1",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1100,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "b9b9117b-ea14-482e-a13b-e68b8e6b441d",
|
||||
"name": "response",
|
||||
"type": "string",
|
||||
"value": "={{ $input.all() }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "254a6740-8b25-4898-9795-4c3f0009471f",
|
||||
"name": "group_data1",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1160,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "47c172ad-90c8-4cf6-a9f5-50607e04cc90",
|
||||
"name": "id",
|
||||
"type": "string",
|
||||
"value": "={{ $json.items[0].id }}"
|
||||
},
|
||||
{
|
||||
"id": "9e639efa-0714-4b06-9847-f7b4b2fbef59",
|
||||
"name": "viewCount",
|
||||
"type": "string",
|
||||
"value": "={{ $json.items[0].statistics.viewCount }}"
|
||||
},
|
||||
{
|
||||
"id": "93328f00-91b8-425b-ad0f-a330b2f95242",
|
||||
"name": "likeCount",
|
||||
"type": "string",
|
||||
"value": "={{ $json.items[0].statistics.likeCount }}"
|
||||
},
|
||||
{
|
||||
"id": "015b0fb2-2a98-464c-a21b-51100616f26a",
|
||||
"name": "commentCount",
|
||||
"type": "string",
|
||||
"value": "={{ $json.items[0].statistics.commentCount }}"
|
||||
},
|
||||
{
|
||||
"id": "cf1e1ec3-a138-42b8-8747-d249afa58dd3",
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "={{ $json.items[0].snippet.description }}"
|
||||
},
|
||||
{
|
||||
"id": "c5c9a3a2-b820-4932-a38a-e21102992215",
|
||||
"name": "title",
|
||||
"type": "string",
|
||||
"value": "={{ $json.items[0].snippet.title }}"
|
||||
},
|
||||
{
|
||||
"id": "38216ead-1f8d-4f93-b6ad-5ef709a1ad2a",
|
||||
"name": "channelTitle",
|
||||
"type": "string",
|
||||
"value": "={{ $json.items[0].snippet.channelTitle }}"
|
||||
},
|
||||
{
|
||||
"id": "ff34194d-3d46-43a8-9127-84708987f536",
|
||||
"name": "tags",
|
||||
"type": "string",
|
||||
"value": "={{ $json.items[0].snippet.tags.join(', ') }}"
|
||||
},
|
||||
{
|
||||
"id": "e50b0f7b-3e37-4557-8863-d68d4fa505c8",
|
||||
"name": "channelId",
|
||||
"type": "string",
|
||||
"value": "={{ $json.items[0].snippet.channelId }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "124c19a9-cbbd-4010-be37-50523c05f64b",
|
||||
"name": "save_data_to_memory1",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1360,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "runOnceForEachItem",
|
||||
"jsCode": "const workflowStaticData = $getWorkflowStaticData('global');\n\nif (typeof workflowStaticData.lastExecution !== 'object') {\n workflowStaticData.lastExecution = {\n response: \"\"\n };\n}\n\nfunction removeEmojis(text) {\n return text.replace(/[\\u{1F600}-\\u{1F64F}|\\u{1F300}-\\u{1F5FF}|\\u{1F680}-\\u{1F6FF}|\\u{2600}-\\u{26FF}|\\u{2700}-\\u{27BF}]/gu, '');\n}\n\nfunction cleanDescription(description) {\n return description\n .replace(/https?:\\/\\/\\S+/g, '')\n .replace(/www\\.\\S+/g, '')\n .replace(/ +/g, ' ')\n .trim();\n}\n\nconst currentItem = { ...$input.item };\n\nif (currentItem.description) {\n currentItem.description = cleanDescription(currentItem.description);\n}\n\nlet sanitizedItem = JSON.stringify(currentItem)\n .replace(/\\\\r/g, ' ')\n .replace(/https?:\\/\\/\\S+/g, '')\n .replace(/www\\.\\S+/g, '')\n .replace(/\\\\n/g, ' ')\n .replace(/\\n/g, ' ')\n .replace(/\\\\/g, '')\n .replace(/ +/g, ' ')\n .trim();\n\nif (workflowStaticData.lastExecution.response) {\n workflowStaticData.lastExecution.response += ' ### NEXT VIDEO FOUND: ### ';\n}\n\nworkflowStaticData.lastExecution.response += removeEmojis(sanitizedItem);\n\nreturn workflowStaticData.lastExecution;\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "67f92ec4-71c0-49df-a0ea-11d2e3cf0f94",
|
||||
"name": "retrieve_data_from_memory1",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
780,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const workflowStaticData = $getWorkflowStaticData('global');\n\nconst lastExecution = workflowStaticData.lastExecution;\n\nreturn lastExecution;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "685820ba-b089-4cdc-984d-52f134754b5c",
|
||||
"name": "loop_over_items1",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
500,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "3d4d5a4b-d06b-41db-bb78-a64a266d5308",
|
||||
"name": "if_longer_than_3_",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
880,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "08ba3db9-6bcf-47f8-a74d-9e26f28cb08f",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ \n (() => {\n const duration = $json.items[0].contentDetails.duration;\n\n // Helper function to convert ISO 8601 duration to seconds\n const iso8601ToSeconds = iso8601 => {\n const match = iso8601.match(/PT(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+)S)?/);\n const hours = parseInt(match[1] || 0, 10);\n const minutes = parseInt(match[2] || 0, 10);\n const seconds = parseInt(match[3] || 0, 10);\n return hours * 3600 + minutes * 60 + seconds;\n };\n\n // Convert duration to seconds\n const durationInSeconds = iso8601ToSeconds(duration);\n\n // Check if greater than 210 seconds (3 minutes 30 seconds)\n return durationInSeconds > 210;\n })() \n}}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "7c6b8b82-fd6c-4f44-bccf-88c5a76f0319",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
0,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 1607,
|
||||
"height": 520,
|
||||
"content": "This part should be abstracted to another workflow and called inside the \"youtube_search\" tool of the main AI Agent."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "cea84238-2b82-4a32-85dd-0c71ad685d47",
|
||||
"connections": {
|
||||
"openai_llm": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"get_videos1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "loop_over_items1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"group_data1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "save_data_to_memory1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"youtube_search": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"find_video_data1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "if_longer_than_3_",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"loop_over_items1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "retrieve_data_from_memory1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "find_video_data1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"if_longer_than_3_": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "group_data1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "loop_over_items1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"save_data_to_memory1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "loop_over_items1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"window_buffer_memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"chat_message_received": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"retrieve_data_from_memory1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "response1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
131
AI agent chat.txt
Normal file
131
AI agent chat.txt
Normal file
@@ -0,0 +1,131 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "939bb301-5e12-4d5b-9a56-61a61cca5f0d",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
640,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o-mini",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "372777e8-ce90-4dea-befc-ac1b2eb4729f",
|
||||
"name": "Window Buffer Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
780,
|
||||
460
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "7a8f0ad1-1c00-4043-b3e5-c88521140a1a",
|
||||
"name": "SerpAPI",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolSerpApi",
|
||||
"position": [
|
||||
920,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"serpApi": {
|
||||
"id": "aJCKjxx6U3K7ydDe",
|
||||
"name": "SerpAPI account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a7624108-e3da-4193-a625-887314216b8b",
|
||||
"name": "When chat message received",
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"position": [
|
||||
360,
|
||||
240
|
||||
],
|
||||
"webhookId": "53c136fe-3e77-4709-a143-fe82746dd8b6",
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "6b8b7de8-fe3f-43b5-97ce-a52a9e44eb5e",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
680,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"SerpAPI": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When chat message received": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,272 @@
|
||||
{
|
||||
"id": "qww129cm4TM9N8Ru",
|
||||
"meta": {
|
||||
"instanceId": "038da3428bba4563b42be267feeca21b4922693db254331ac640a5c56ee7cadf",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "InstaTest",
|
||||
"tags": [
|
||||
{
|
||||
"id": "8PlqXsDyqVlHJ7RC",
|
||||
"name": "AI",
|
||||
"createdAt": "2024-07-10T14:12:10.657Z",
|
||||
"updatedAt": "2024-07-10T14:12:10.657Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "51dcaa84-d1f9-4abc-aebc-24a06801e42d",
|
||||
"name": "Set your system promt for AI",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"notes": "In this node in \"prompt\" variable you can set your system prompt",
|
||||
"position": [
|
||||
1120,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "0b3c3d71-5627-4b8c-91f0-ac44eaedf196",
|
||||
"name": "prompt",
|
||||
"type": "string",
|
||||
"value": "=Persona: You are a instagram influencer.\nContext: You receive a messages from your subscribers\nTask: Answer questions in your writing style and patterns according to your previous posts text. Use your post only for style and patterns reference.\nStyle rules:\nsimple answers"
|
||||
},
|
||||
{
|
||||
"id": "c2a9e272-5c0d-4685-ad0e-ce6995f92a1c",
|
||||
"name": "sessionId",
|
||||
"type": "string",
|
||||
"value": "={{ $json.body.session_id }}"
|
||||
},
|
||||
{
|
||||
"id": "b3c20ee3-07a1-4584-b0d9-7310a2c6b723",
|
||||
"name": "chatInput",
|
||||
"type": "string",
|
||||
"value": "={{ $json.body.text }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "0fb36573-d632-4403-8809-3973f9caa32a",
|
||||
"name": "Local n8n memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
1500,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"sessionKey": "={{ $('Set your system promt for AI').last().json.sessionId }}",
|
||||
"sessionIdType": "customKey",
|
||||
"contextWindowLength": 20
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "2f0471a7-2a84-41ce-aab1-896d5ea95ac3",
|
||||
"name": "ChatGPT model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1360,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "HxWZhtJcnqTXVHAA",
|
||||
"name": "General"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "49abc3a3-faf9-4249-b874-908138a84aea",
|
||||
"name": "Send respond ",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"position": [
|
||||
1720,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "49382508-9307-4ffa-8b31-78fac3a7db10",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
320,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 458.4028599661066,
|
||||
"height": 447.98321744507007,
|
||||
"content": "## Easy Instagram(via ManyChat) bot\n---\n### Description:\nThis template is a main part of Entire solution. It's getting new message from Instagram via ManyChat(Extra No-Code tool for getting and sending message in Instagram). Generating message using ChatGPT and send back to ManyChat that sends it to Instagrtam.\n\n### Logic:\n1. Getting message from Instagram(from ManyChat)\n2. Set you system prompt for AI\n3. Create simple answer for message in AI block\n4. Send answer to Instagram(to ManyChat)\n\n---\n*Helpful links:*\n- [Guide in Notion how to create full bot](https://shadowed-pound-d6e.notion.site/Instagram-GPT-light-version-Manychat-X-N8N-176293bddff880899a9ac255585d29f7?pvs=4)\n- [ManyChat](https://manychat.partnerlinks.io/vm4wkw8j81tc)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5d14544c-7039-435f-a53c-615b5722bb99",
|
||||
"name": "Getting message from Instagram",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
900,
|
||||
620
|
||||
],
|
||||
"webhookId": "68d3fbc9-6e49-4bdc-851c-2a532be911ab",
|
||||
"parameters": {
|
||||
"path": "instagram_chat",
|
||||
"options": {},
|
||||
"httpMethod": "POST",
|
||||
"responseMode": "responseNode"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "3770f558-341b-4d67-a7f0-0bb2fecf51a3",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1320,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"width": 313.9634922216307,
|
||||
"height": 614.7475040550845,
|
||||
"content": "## 3) AI block\n---\nThere is 3 nodes:\n- AI Agent\n- Chat GPT model\n- Memory for history messages\n\n### To do:\n- in ChatGPT node you can choose the best model for you\n- in Memory Block you can change number of messages in history\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cbb6c5a2-9b96-4305-afce-5ac560ae2dec",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
1340,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.chatInput }}",
|
||||
"options": {
|
||||
"systemMessage": "={{ $json.prompt }}"
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "4e28119f-b1aa-4b20-a8ed-28bd137f9627",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
820,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"height": 440,
|
||||
"content": "## 1) HTTP Post webhook\n\n**To do:**\nJust copy production link from this node and insert to custom action in ManyChat\n\nNo edits needed"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b18a8890-b420-4086-91c8-8edbc845c8af",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1080,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"width": 220,
|
||||
"height": 320,
|
||||
"content": "## 2) Edit prompt\n\n**To do:**\nGo inside and change input\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "74d4e6f5-069e-4b37-8005-8c03226b05df",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1660,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"height": 300,
|
||||
"content": "## 4) Respond webhook\n\nNo edits needed"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": true,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "2f36fc7a-0a69-4af3-a958-25e9d278f058",
|
||||
"connections": {
|
||||
"AI Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send respond ",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"ChatGPT model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Local n8n memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set your system promt for AI": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Getting message from Instagram": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set your system promt for AI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
556
AI agent that can scrape webpages.txt
Normal file
556
AI agent that can scrape webpages.txt
Normal file
@@ -0,0 +1,556 @@
|
||||
{
|
||||
"id": "dsKnCFwysROIA4MT",
|
||||
"meta": {
|
||||
"instanceId": "03524270bab2c2dfd5b82778cd1355e56cdda3cf098bf2dfd865e18164c00485"
|
||||
},
|
||||
"name": "Agent with custom HTTP Request",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "e7374976-f3c1-4f60-ae57-9eec65444216",
|
||||
"name": "On new manual Chat Message",
|
||||
"type": "@n8n/n8n-nodes-langchain.manualChatTrigger",
|
||||
"position": [
|
||||
763,
|
||||
676
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "97e84a23-9536-43cd-94e9-b8166be8ed32",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
983,
|
||||
896
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4-1106-preview",
|
||||
"options": {
|
||||
"timeout": 300000,
|
||||
"temperature": 0.7,
|
||||
"frequencyPenalty": 0.3
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "wPFAzp4ZHdLLwvkK",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "63d98361-8978-4042-84e7-53a0e226f946",
|
||||
"name": "HTTP Request",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
1360,
|
||||
1200
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ encodeURI($json.query.url) }}",
|
||||
"options": {
|
||||
"response": {
|
||||
"response": {
|
||||
"neverError": true
|
||||
}
|
||||
},
|
||||
"allowUnauthorizedCerts": true
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.1,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "17d4b5ae-f5d3-4793-8419-d3c879f7f50d",
|
||||
"name": "Exctract HTML Body",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1780,
|
||||
1480
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "HTML",
|
||||
"stringValue": "={{ $json?.data.match(/<body[^>]*>([\\s\\S]*?)<\\/body>/i)[1] }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": "selected",
|
||||
"options": {},
|
||||
"includeFields": "HTML"
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "36c38ee4-724c-4ba2-a59a-ac0bbc912e94",
|
||||
"name": "Is error?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1560,
|
||||
1200
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"boolean": [
|
||||
{
|
||||
"value1": "={{ $json.hasOwnProperty('error') }}",
|
||||
"value2": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4e4d97ce-14a9-4f4f-aa75-f218784d9ed9",
|
||||
"name": "Stringify error message",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1780,
|
||||
980
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "page_content",
|
||||
"stringValue": "={{ $('QUERY_PARAMS').first()?.json?.query?.url == null ? \"INVALID action_input. This should be an HTTP query string like this: \\\"?url=VALIDURL&method=SELECTEDMETHOD\\\". Only a simple string value is accepted. JSON object as an action_input is NOT supported!\" : JSON.stringify($json.error) }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": "selected",
|
||||
"options": {},
|
||||
"includeFields": "HTML"
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "8452e5c4-aa29-4a02-9579-8d9da3727bcb",
|
||||
"name": "Execute Workflow Trigger",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
760,
|
||||
1200
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "063220c2-fa4d-4d5e-9549-7712aaa72921",
|
||||
"name": "Remove extra tags",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1980,
|
||||
1480
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "HTML",
|
||||
"stringValue": "={{ ($json.HTML || \"HTML BODY CONTENT FOR THIS SEARCH RESULT IS NOT AVAILABLE\").replace(/<script[^>]*>([\\s\\S]*?)<\\/script>|<style[^>]*>([\\s\\S]*?)<\\/style>|<noscript[^>]*>([\\s\\S]*?)<\\/noscript>|<!--[\\s\\S]*?-->|<iframe[^>]*>([\\s\\S]*?)<\\/iframe>|<object[^>]*>([\\s\\S]*?)<\\/object>|<embed[^>]*>([\\s\\S]*?)<\\/embed>|<video[^>]*>([\\s\\S]*?)<\\/video>|<audio[^>]*>([\\s\\S]*?)<\\/audio>|<svg[^>]*>([\\s\\S]*?)<\\/svg>/ig, '')}}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "036511d7-a4be-4bbf-b4bc-47ddfabfe76f",
|
||||
"name": "Simplify output",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"notes": "remove links and image URLs",
|
||||
"position": [
|
||||
2360,
|
||||
1380
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "HTML",
|
||||
"stringValue": "={{ $json.HTML.replace(/href\\s*=\\s*\"(.+?)\"/gi, 'href=\"NOURL\"').replace(/src\\s*=\\s*\"(.+?)\"/gi, 'src=\"NOIMG\"')}}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "5e2b5383-adcf-4de0-a406-4f5d631b5e8a",
|
||||
"name": "Simplify?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
2180,
|
||||
1480
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"string": [
|
||||
{
|
||||
"value1": "={{ $('CONFIG').first()?.json?.query?.method }}",
|
||||
"value2": "simplif",
|
||||
"operation": "contains"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a0fc004a-ab0f-4b31-94df-50f5eee69c86",
|
||||
"name": "QUERY_PARAMS",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
960,
|
||||
1200
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "query",
|
||||
"type": "objectValue",
|
||||
"objectValue": "={{ $json.query.substring($json.query.indexOf('?') + 1).split('&').reduce((result, item) => (result[item.split('=')[0]] = decodeURIComponent(item.split('=')[1]), result), {}) }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "3b6599d6-ce9a-4861-9b52-07156eb52539",
|
||||
"name": "CONFIG",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1160,
|
||||
1200
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "query.maxlimit",
|
||||
"type": "numberValue",
|
||||
"numberValue": "={{ $json?.query?.maxlimit == null ? 70000 : Number($json?.query?.maxlimit) }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "14f683be-76f6-4034-9a0e-d785738b135f",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
721,
|
||||
1134
|
||||
],
|
||||
"parameters": {
|
||||
"width": 556.25,
|
||||
"height": 235.79999999999995,
|
||||
"content": "### Convert the query string into JSON, apply the limit for a page length"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6deabcb7-a984-48ec-af2a-8c70b3a4e4bf",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1720,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"width": 491,
|
||||
"height": 285.7,
|
||||
"content": "## Send an error message:\n1. If query param was incorrect, return the instruction. AI Agent should pick up on this and adapt the query on the next iteration.\n2. If the query is OK and an error was during the HTTP Request, then send back the original error message."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "df1e8d00-0e18-44fa-8f94-8a53c27f7c88",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1720,
|
||||
1160
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1200,
|
||||
"height": 472.5,
|
||||
"content": "## Post-processing of the HTML page:\n1. Keep only <BODY> content\n2. Remove inline <SCRIPT> tag entirely, as well as: NOSCRIPT, IFRAME, OBJECT, EMBED, VIDEO, AUDIO, SVG, and HTML comments.\n3. In case query parameter method=simplified, replace all page URLs (a href) and IMG (src) with NOURL / NOIMG - this may save up to 20% of the page length\n4. Convert the remaining HTML to Markdown. This step further reduces the length of the page: long HTML tags and styles are eliminated, but the markdown syntax keeps some page structure. This gives much better results compared to just a blank text.\n5. Finally, check the page length. If it's too long, send an \"ERROR: PAGE CONTENT TOO LONG\" instead of the actual page. Of course, you could split the page content in chunks, but sometimes long pages just don't have a needed content, so it makes little sense to burn tokens on them."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6afe96a0-0fba-4ae1-ab8f-f7da56d420b1",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
720,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"width": 616.8597285067872,
|
||||
"height": 483.0226244343891,
|
||||
"content": "## Example ReAct AI Agent\n1. Agent Prompt is default\n2. Check the description of the HTTP_Request_Tool, it guides the agent to provide a query string with several parameters instead of a JSON object"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d5ff2114-1e74-43cf-9f3c-744c241988db",
|
||||
"name": "ReAct AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
983,
|
||||
676
|
||||
],
|
||||
"parameters": {
|
||||
"agent": "reActAgent",
|
||||
"options": {
|
||||
"prefix": "Answer the following questions as best you can. You have access to the following tools:",
|
||||
"suffix": "Begin!\n\n\tQuestion: {input}\n\tThought:{agent_scratchpad}",
|
||||
"suffixChat": "Begin! Reminder to always use the exact characters `Final Answer` when responding.",
|
||||
"humanMessageTemplate": "{input}\n\n{agent_scratchpad}"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cc7aef4a-a1fb-4a69-a670-1f200f9e9541",
|
||||
"name": "Convert to Markdown",
|
||||
"type": "n8n-nodes-base.markdown",
|
||||
"position": [
|
||||
2540,
|
||||
1480
|
||||
],
|
||||
"parameters": {
|
||||
"html": "={{ $json.HTML }}",
|
||||
"options": {},
|
||||
"destinationKey": "page_content"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "11806e8c-5fc4-4d9d-8144-179356993aa7",
|
||||
"name": "Send Page Content",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2740,
|
||||
1480
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "page_content",
|
||||
"stringValue": "={{ $json.page_content.length < $('CONFIG').first()?.json?.query?.maxlimit ? $json.page_content : \"ERROR: PAGE CONTENT TOO LONG\" }}"
|
||||
},
|
||||
{
|
||||
"name": "page_length",
|
||||
"type": "numberValue",
|
||||
"numberValue": "={{ $json.page_content.length }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": "selected",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "a3a6b199-517b-4987-8281-d7997a32f54b",
|
||||
"name": "HTTP_Request_Tool",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
|
||||
"position": [
|
||||
1103,
|
||||
896
|
||||
],
|
||||
"parameters": {
|
||||
"name": "HTTP_Request_Tool",
|
||||
"workflowId": "={{ $workflow.id }}",
|
||||
"description": "Call this tool to fetch a webpage content. The input should be a stringified HTTP query parameter like this: \"?url=VALIDURL&method=SELECTEDMETHOD\". \"url\" parameter should contain the valid URL string. \"method\" key can be either \"full\" or \"simplified\". method=full will fetch the whole webpage content in the Markdown format, including page links and image links. method=simplified will return the Markdown content of the page but remove urls and image links from the page content for simplicity. Before calling this tool, think strategically which \"method\" to call. Best of all to use method=simplified. However, if you anticipate that the page request is not final or if you need to extract links from the page, pick method=full.",
|
||||
"responsePropertyName": "page_content"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "9db853c5-3658-47c1-b98a-5858b1c184ec",
|
||||
"connections": {
|
||||
"CONFIG": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "HTTP Request",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Is error?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Stringify error message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Exctract HTML Body",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Simplify?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Simplify output",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Convert to Markdown",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTTP Request": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Is error?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"QUERY_PARAMS": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "CONFIG",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Simplify output": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Convert to Markdown",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"HTTP_Request_Tool": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "ReAct AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "ReAct AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Remove extra tags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Simplify?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Exctract HTML Body": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Remove extra tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert to Markdown": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Page Content",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute Workflow Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "QUERY_PARAMS",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"On new manual Chat Message": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "ReAct AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
277
AI chat with any data source (using the n8n workflow tool).txt
Normal file
277
AI chat with any data source (using the n8n workflow tool).txt
Normal file
@@ -0,0 +1,277 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "cb484ba7b742928a2048bf8829668bed5b5ad9787579adea888f05980292a4a7"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "4c52efcf-039b-4550-8a63-3d3d4dde488b",
|
||||
"name": "On new manual Chat Message",
|
||||
"type": "@n8n/n8n-nodes-langchain.manualChatTrigger",
|
||||
"position": [
|
||||
740,
|
||||
300
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "adb528f1-b87b-4bb2-99e1-776fd839522e",
|
||||
"name": "Execute Workflow Trigger",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
680,
|
||||
940
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "092cf737-5b53-4fc8-82f5-c775b77ea0bd",
|
||||
"name": "Hacker News",
|
||||
"type": "n8n-nodes-base.hackerNews",
|
||||
"position": [
|
||||
900,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"limit": 50,
|
||||
"resource": "all",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a0805137-630c-4065-826e-88afa000660f",
|
||||
"name": "Clean up data",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1120,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "title",
|
||||
"stringValue": "={{ $json._highlightResult.title.value }}"
|
||||
},
|
||||
{
|
||||
"name": "points",
|
||||
"type": "numberValue",
|
||||
"numberValue": "={{ $json.points }}"
|
||||
},
|
||||
{
|
||||
"name": "url",
|
||||
"stringValue": "={{ $json.url }}"
|
||||
},
|
||||
{
|
||||
"name": "created_at",
|
||||
"stringValue": "={{ $json.created_at }}"
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"stringValue": "={{ $json.author }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"include": "none",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "e1b255f4-e970-42d6-9870-4e302bf2da83",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
960,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"maxIterations": 10
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "91e3391e-909e-4d63-9649-ff62781dbba9",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
960,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "VQtv7frm7eLiEDnd",
|
||||
"name": "OpenAi account 7"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cd1f0028-635e-48eb-ac38-4c6fb25ed63e",
|
||||
"name": "Stringify",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1340,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "return {\n 'response': JSON.stringify($input.all().map(x => x.json))\n}"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "7df241eb-67d3-4724-8b32-4b53561ed55f",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
880,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 150,
|
||||
"height": 293,
|
||||
"content": "### Replace me\nwith any other service, e.g. fetching your own data"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "270845df-7c2d-4035-9ac0-e41d418b3026",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
600,
|
||||
738.125
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 927.5,
|
||||
"height": 406.875,
|
||||
"content": "### Sub-workflow: Custom tool\nThis can be called by the agent above. This example fetches the top 50 posts ever on Hacker News"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1d796a86-45d1-4fc4-8245-893525505d1f",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
600,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 927.5,
|
||||
"height": 486.5625,
|
||||
"content": "### Main workflow: AI agent using custom tool\nTry it out by clicking 'Chat' and entering 'What is the 5th most popular post ever on Hacker News?'"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "38ff64b5-6f47-4d2d-9051-caab418bb0e8",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
440,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"width": 185.9375,
|
||||
"height": 218,
|
||||
"content": "## Try me out\n\nClick the 'Chat' button and enter:\n\n_What is the 5th most popular post ever on Hacker News?_"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3532e461-bd74-48f7-93e1-96d608c88688",
|
||||
"name": "Custom tool to call the wf below",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
|
||||
"position": [
|
||||
1120,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"name": "hn_tool",
|
||||
"workflowId": "={{ $workflow.id }}",
|
||||
"description": "Returns a list of the most popular posts ever on Hacker News, in json format"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Hacker News": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Clean up data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Clean up data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Stringify",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute Workflow Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Hacker News",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"On new manual Chat Message": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Custom tool to call the wf below": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
195
AI chatbot that can search the web.txt
Normal file
195
AI chatbot that can search the web.txt
Normal file
@@ -0,0 +1,195 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "3a3bcb2d-cb94-40d8-8b9e-322ea9d27f6e",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1000,
|
||||
640
|
||||
],
|
||||
"parameters": {
|
||||
"width": 300,
|
||||
"height": 185,
|
||||
"content": "### The conversation history(last 20 messages) is stored in a buffer memory"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e279af43-b003-4499-b221-58716e735379",
|
||||
"name": "On new manual Chat Message",
|
||||
"type": "@n8n/n8n-nodes-langchain.manualChatTrigger",
|
||||
"position": [
|
||||
740,
|
||||
340
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f4f8bf03-a43e-4a1f-a592-cd0f8408f552",
|
||||
"name": "Chat OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
840,
|
||||
653
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o-mini",
|
||||
"options": {
|
||||
"temperature": 0.3
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "66b60f68-bae8-4958-ac81-03883f563ab3",
|
||||
"name": "Wikipedia",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWikipedia",
|
||||
"position": [
|
||||
1480,
|
||||
693
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "70f6b43b-9290-4fbc-992f-0895d4578c9f",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1340,
|
||||
633
|
||||
],
|
||||
"parameters": {
|
||||
"width": 300,
|
||||
"height": 185,
|
||||
"content": "### Tools which agent can use to accomplish the task"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8696269f-6556-41f1-bbe4-5597e4e46e02",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
960,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"width": 422,
|
||||
"height": 211,
|
||||
"content": "### Conversational agent will utilise available tools to answer the prompt. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6814967b-4567-4cdd-bf09-6b1b5ed0c68e",
|
||||
"name": "Window Buffer Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
1100,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"contextWindowLength": 20
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ce4358ac-c2cc-45ba-b950-247f8360b36c",
|
||||
"name": "SerpAPI",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolSerpApi",
|
||||
"position": [
|
||||
1380,
|
||||
693
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "de80add8-c37d-4d46-80ec-b43234e21150",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
1040,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.input }}",
|
||||
"options": {},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"SerpAPI": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Wikipedia": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Chat OpenAI": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"On new manual Chat Message": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
747
AI web researcher for sales.txt
Normal file
747
AI web researcher for sales.txt
Normal file
@@ -0,0 +1,747 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "2b1cc1a8b0a2fb9caab11ab2d5eb3712f9973066051b2e898cf4041a1f2a7757",
|
||||
"templateId": "2324",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "71b06728-7f59-49e3-9365-3281189a6659",
|
||||
"name": "When clicking \"Test workflow\"",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
920,
|
||||
340
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b37019e3-c7ab-4119-986d-c27d082a036e",
|
||||
"name": "Input",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1340,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "fcc97354-b9f6-4459-a004-46e87902c77c",
|
||||
"name": "company_input",
|
||||
"type": "string",
|
||||
"value": "={{ $json.input }}"
|
||||
},
|
||||
{
|
||||
"id": "e5415c49-5204-45b1-a0e9-814157127b12",
|
||||
"name": "row_number",
|
||||
"type": "number",
|
||||
"value": "={{ $json.row_number }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "7d5d53ac-6d3c-4b24-97c7-deb6b76749e5",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
2020,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o",
|
||||
"options": {
|
||||
"temperature": 0.3
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "FMTQypGcsAwaRQdC",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "24e2f3b0-8b90-49a9-bde6-0fb0c2baf52a",
|
||||
"name": "Get website content",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
|
||||
"position": [
|
||||
2580,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"name": "get_website_content",
|
||||
"source": "parameter",
|
||||
"description": "This tool will return the text from the given URL. ",
|
||||
"workflowJson": "{\n \"meta\": {\n \"templateCredsSetupCompleted\": true,\n \"instanceId\": \"2b1cc1a8b0a2fb9caab11ab2d5eb3712f9973066051b2e898cf4041a1f2a7757\"\n },\n \"nodes\": [\n {\n \"parameters\": {},\n \"id\": \"475eaf3c-7e11-457e-8b72-4d3e683e2f80\",\n \"name\": \"Execute Workflow Trigger\",\n \"type\": \"n8n-nodes-base.executeWorkflowTrigger\",\n \"typeVersion\": 1,\n \"position\": [\n 260,\n 340\n ]\n },\n {\n \"parameters\": {\n \"url\": \"={{ $json.query.url }}\",\n \"options\": {}\n },\n \"id\": \"321fbc74-d749-4f9b-954e-7cad37601ddf\",\n \"name\": \"Visit Website\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"typeVersion\": 4.2,\n \"position\": [\n 440,\n 340\n ]\n },\n {\n \"parameters\": {\n \"operation\": \"extractHtmlContent\",\n \"extractionValues\": {\n \"values\": [\n {\n \"key\": \"body\",\n \"cssSelector\": \"html\",\n \"skipSelectors\": \"head\"\n }\n ]\n },\n \"options\": {\n \"cleanUpText\": true\n }\n },\n \"id\": \"6e51732a-4999-4805-838b-f692e9965197\",\n \"name\": \"HTML\",\n \"type\": \"n8n-nodes-base.html\",\n \"typeVersion\": 1.2,\n \"position\": [\n 620,\n 340\n ]\n }\n ],\n \"connections\": {\n \"Execute Workflow Trigger\": {\n \"main\": [\n [\n {\n \"node\": \"Visit Website\",\n \"type\": \"main\",\n \"index\": 0\n }\n ]\n ]\n },\n \"Visit Website\": {\n \"main\": [\n [\n {\n \"node\": \"HTML\",\n \"type\": \"main\",\n \"index\": 0\n }\n ]\n ]\n }\n },\n \"pinData\": {\n \"Execute Workflow Trigger\": [\n {\n \"query\": {\n \"url\": \"https://www.lemlist.com\"\n }\n }\n ]\n }\n}",
|
||||
"jsonSchemaExample": "{\n\t\"url\": \"https://www.lemlist.com\"\n}",
|
||||
"specifyInputSchema": true,
|
||||
"responsePropertyName": "body"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "ff7ab74c-dfc6-43ce-8c57-6edf935b4915",
|
||||
"name": "SerpAPI - Search Google",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolSerpApi",
|
||||
"position": [
|
||||
2300,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"serpApi": {
|
||||
"id": "ECK6FimAloRJOZMG",
|
||||
"name": "SerpAPI account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4fe311f2-4983-4380-b4ed-a827a406fce5",
|
||||
"name": "Structured Output Parser",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"position": [
|
||||
2880,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"schemaType": "manual",
|
||||
"inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"case_study_link\": {\n\t\t\t\"type\":[\"string\", \"null\"]\n\t\t},\n \t\t\"domain\": {\n\t\t\t\"type\": [\"string\", \"null\"]\n\t\t},\n \"linkedinUrl\": {\n\t\t\t\"type\": [\"string\", \"null\"]\n\t\t},\n \t\"market\": {\n\t\t\t\"type\": [\"string\", \"null\"]\n\t\t},\n\t\t\"cheapest_plan\": {\n\t\t\t\"type\": [\"number\", \"null\"]\n\t\t},\n\t\"has_enterprise_plan\": {\n\t\t\t\"type\": [\"boolean\", \"null\"]\n\t\t},\n\t\"has_API\": {\n\t\t\t\"type\": [\"boolean\", \"null\"]\n\t\t},\n\t\"has_free_trial\": {\n\t\t\t\"type\": [\"boolean\", \"null\"]\n\t\t},\n\t\"integrations\": {\n\t\t\t\"type\": [\"array\",\"null\"],\n \"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t}\n\t}\n}"
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "89ed0723-4dbe-428d-b1a9-ebdf515e42bb",
|
||||
"name": "Loop Over Items",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
1600,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "34ea3862-e8e5-4bf2-a9aa-2ad084376bb5",
|
||||
"name": "AI Researcher Output Data",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2960,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "4109ca11-1bb8-4f5c-8bec-a962f44b0746",
|
||||
"name": "domain",
|
||||
"type": "string",
|
||||
"value": "={{ $json.output.domain }}"
|
||||
},
|
||||
{
|
||||
"id": "7f492768-375e-48fa-866b-644b2b5cbd68",
|
||||
"name": "linkedinUrl",
|
||||
"type": "string",
|
||||
"value": "={{ $json.output.linkedinUrl }}"
|
||||
},
|
||||
{
|
||||
"id": "e30b0d07-68db-45a1-9593-fd6ce24a1d50",
|
||||
"name": "market",
|
||||
"type": "string",
|
||||
"value": "={{ $json.output.market }}"
|
||||
},
|
||||
{
|
||||
"id": "0c03a51e-2c07-4583-85c6-d3d2ee81c5d1",
|
||||
"name": "cheapest_plan",
|
||||
"type": "number",
|
||||
"value": "={{ $json.output.cheapest_plan }}"
|
||||
},
|
||||
{
|
||||
"id": "0c9622d0-8446-4663-9a94-964b5df851f1",
|
||||
"name": "has_enterprise_plan",
|
||||
"type": "boolean",
|
||||
"value": "={{ $json.output.has_enterprise_plan }}"
|
||||
},
|
||||
{
|
||||
"id": "564cf6ea-457f-4762-bc19-6900b7d5743c",
|
||||
"name": "has_API",
|
||||
"type": "boolean",
|
||||
"value": "={{ $json.output.has_API }}"
|
||||
},
|
||||
{
|
||||
"id": "7fd39897-65c3-45d6-9563-8254f55ecef0",
|
||||
"name": "has_free_trial",
|
||||
"type": "boolean",
|
||||
"value": "={{ $json.output.has_free_trial }}"
|
||||
},
|
||||
{
|
||||
"id": "26477939-d407-4cae-92b2-9a9dc0f53a64",
|
||||
"name": "integrations",
|
||||
"type": "array",
|
||||
"value": "={{ $json.output.integrations }}"
|
||||
},
|
||||
{
|
||||
"id": "f0cc61d1-6b6b-4142-8627-4a4c721b19a1",
|
||||
"name": "case_study_link",
|
||||
"type": "string",
|
||||
"value": "={{ $json.output.case_study_link }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "ff1cb26d-6138-4ee1-9f28-4ecc80c1c8ae",
|
||||
"name": "Google Sheets - Update Row with data",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
3600,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"domain": "={{ $json.domain }}",
|
||||
"market": "={{ $json.market }}",
|
||||
"row_number": "={{ $json.row_number }}",
|
||||
"linkedinUrl": "={{ $json.linkedinUrl }}",
|
||||
"integrations": "={{ $json.integrations }}",
|
||||
"cheapest_plan": "={{ $json.cheapest_plan }}",
|
||||
"has_free_trial": "={{ $json.has_free_trial }}",
|
||||
"enrichment_status": "done",
|
||||
"has_entreprise_plan": "={{ $json.has_enterprise_plan }}",
|
||||
"last_case_study_link": "={{ $json.case_study_link }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "input",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"required": false,
|
||||
"displayName": "input",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "domain",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "domain",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "linkedinUrl",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "linkedinUrl",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "has_free_trial",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "has_free_trial",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "cheapest_plan",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "cheapest_plan",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "has_entreprise_plan",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "has_entreprise_plan",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "last_case_study_link",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"required": false,
|
||||
"displayName": "last_case_study_link",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "market",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "market",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "integrations",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "integrations",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "enrichment_status",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "enrichment_status",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "row_number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": true,
|
||||
"required": false,
|
||||
"displayName": "row_number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"row_number"
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"operation": "update",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19U7gAgkUEz6mbFcnygf1zKDdGvY6OAdUqq3bZQWgjxE/edit#gid=0",
|
||||
"cachedResultName": "Sheet1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "19U7gAgkUEz6mbFcnygf1zKDdGvY6OAdUqq3bZQWgjxE",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19U7gAgkUEz6mbFcnygf1zKDdGvY6OAdUqq3bZQWgjxE/edit?usp=drivesdk",
|
||||
"cachedResultName": "Enrich companies using AI agents"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "GC2OQl3Jvy543LT2",
|
||||
"name": "Google Sheets account - perso"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.3
|
||||
},
|
||||
{
|
||||
"id": "6611f852-b4d6-4a07-9428-db206ef57cc3",
|
||||
"name": "Merge data",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
3240,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "mergeByPosition"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "2a19516b-33a1-4987-9b5f-242a084621e0",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
380,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"width": 409.0131656322444,
|
||||
"height": 658.0614601225933,
|
||||
"content": "## Read Me\n\nThis workflow allows you to do account research with the web using AI.\n\nThe advanced AI module has 2 capabilities: \n- Research Google using SerpAPI\n- Visit and get website content using a sub-workflow\n\n\nFrom an unstructured input like a domain or a company name. \n\nIt will return the following properties: \n- domain\n- company Linkedin Url\n- cheapest plan\n- has free trial\n- has entreprise plan\n- has API\n- market (B2B or B2C)\n\n\nThe strength of n8n here is that you can adapt this workflow to research whatever information you need.\n\nYou just have to precise it in the prompt and to precise the output format in the \"Strutured Output Parser\" module.\n\n[Click here to find more detailed instructions with video guide.](https://lempire.notion.site/AI-Web-research-with-n8n-a25aae3258d0423481a08bd102f16906)\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "67d485c9-3289-4bb3-9523-cd24c0b1aa05",
|
||||
"name": "Get rows to enrich",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
1140,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"returnAllMatches": "returnAllMatches"
|
||||
},
|
||||
"filtersUI": {
|
||||
"values": [
|
||||
{
|
||||
"lookupColumn": "enrichment_status"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19U7gAgkUEz6mbFcnygf1zKDdGvY6OAdUqq3bZQWgjxE/edit#gid=0",
|
||||
"cachedResultName": "Sheet1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "19U7gAgkUEz6mbFcnygf1zKDdGvY6OAdUqq3bZQWgjxE",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19U7gAgkUEz6mbFcnygf1zKDdGvY6OAdUqq3bZQWgjxE/edit?usp=drivesdk",
|
||||
"cachedResultName": "Enrich companies using AI agents"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "GC2OQl3Jvy543LT2",
|
||||
"name": "Google Sheets account - perso"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.3
|
||||
},
|
||||
{
|
||||
"id": "eb0c95e7-2211-48d1-abaf-07cd0c76d3a6",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1540,
|
||||
227.25301102878547
|
||||
],
|
||||
"parameters": {
|
||||
"width": 300.49399096535876,
|
||||
"height": 333.8263184006576,
|
||||
"content": "### Process rows 1 by 1\nThis module will allow us to process rows 1 by 1"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8bf0deae-dda7-4e27-9ac7-978db14cca19",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2740,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"width": 300.49399096535876,
|
||||
"height": 236.01118609685022,
|
||||
"content": "Precise here the format in which you need the data to be "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "dc4f1550-1e3c-4175-a2b3-10153dc2fd77",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2180,
|
||||
200.2582716310755
|
||||
],
|
||||
"parameters": {
|
||||
"width": 300.49399096535876,
|
||||
"height": 279.8787004666023,
|
||||
"content": "### Ask AI what are the information you are looking for about the company"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "70fc73a0-303b-46e1-822d-cebdbccf8e32",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2220,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"height": 248.91749449109562,
|
||||
"content": "Get your free API key here https://serpapi.com/"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0c1dafa9-28fe-4ef4-b80e-d4034e16f6c0",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
920,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "hours",
|
||||
"hoursInterval": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "8b5ebee9-f519-4621-bf2a-12891794f2c5",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
820,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"width": 266.12865147126786,
|
||||
"height": 627.5654650079845,
|
||||
"content": "Run the workflow manually or activate it to run it every 2 hours"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d7db2452-ba3d-4adb-bd8b-d17a92d1bce5",
|
||||
"name": "AI company researcher",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
2200,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=This is the company I want you to research info about:\n{{ $json.company_input }}\n\nReturn me:\n- the linkedin URL of the company\n- the domain of the company. in this format ([domain].[tld])\n- market: if they are B2B or B2C. Only reply by \"B2B\" or \"B2B\"\n- the lowest paid plan the company is offering. If you are not sure, reply null.\n- the latest case study URL published on the website (find case study hub using google, and return the first case study link)\n- tell me if the company offer an API\n- tell me if the company has an enterprise plan\n- tell me if the company has a free trial mentionned in their homepage. reply false if you don't find strong evidence.\n- return an array with up to 5 tools the company is integrated with",
|
||||
"options": {
|
||||
"maxIterations": 10
|
||||
},
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
},
|
||||
{
|
||||
"id": "f7896dbd-5c15-44e9-96ca-c695a66562cc",
|
||||
"name": "Search Google with ScrapingBee",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
|
||||
"position": [
|
||||
2300,
|
||||
1140
|
||||
],
|
||||
"parameters": {
|
||||
"name": "search_google",
|
||||
"source": "parameter",
|
||||
"description": "Call this tool to get results from a google search.",
|
||||
"workflowJson": "{\n \"meta\": {\n \"templateCredsSetupCompleted\": true,\n \"instanceId\": \"2b1cc1a8b0a2fb9caab11ab2d5eb3712f9973066051b2e898cf4041a1f2a7757\"\n },\n \"nodes\": [\n {\n \"parameters\": {},\n \"id\": \"fbb17d8d-e2dc-46ae-aba4-8c27cc9d8766\",\n \"name\": \"Execute Workflow Trigger\",\n \"type\": \"n8n-nodes-base.executeWorkflowTrigger\",\n \"typeVersion\": 1,\n \"position\": [\n 20,\n 460\n ]\n },\n {\n \"parameters\": {\n \"url\": \"https://app.scrapingbee.com/api/v1/store/google\",\n \"authentication\": \"genericCredentialType\",\n \"genericAuthType\": \"httpQueryAuth\",\n \"sendQuery\": true,\n \"queryParameters\": {\n \"parameters\": [\n {\n \"name\": \"search\",\n \"value\": \"={{ $json.query.google_search_query }}\"\n },\n {\n \"name\": \"language\",\n \"value\": \"en\"\n },\n {\n \"name\": \"nb_results\",\n \"value\": \"5\"\n }\n ]\n },\n \"options\": {}\n },\n \"id\": \"b938a2bd-030e-46d7-adee-4e3c85cfc1b3\",\n \"name\": \"Search Google\",\n \"type\": \"n8n-nodes-base.httpRequest\",\n \"typeVersion\": 4.2,\n \"position\": [\n 300,\n 460\n ],\n \"credentials\": {\n \"httpQueryAuth\": {\n \"id\": \"Pb2CIMT0tN838QPy\",\n \"name\": \"ScrapingBee\"\n }\n }\n },\n {\n \"parameters\": {\n \"assignments\": {\n \"assignments\": [\n {\n \"id\": \"096fee70-444e-4948-816c-752b20786062\",\n \"name\": \"response\",\n \"value\": \"={{ $json.organic_results }}\",\n \"type\": \"array\"\n }\n ]\n },\n \"options\": {}\n },\n \"id\": \"c5db1fb6-d875-47d2-97db-287777583f22\",\n \"name\": \"Response\",\n \"type\": \"n8n-nodes-base.set\",\n \"typeVersion\": 3.3,\n \"position\": [\n 520,\n 460\n ]\n }\n ],\n \"connections\": {\n \"Execute Workflow Trigger\": {\n \"main\": [\n [\n {\n \"node\": \"Search Google\",\n \"type\": \"main\",\n \"index\": 0\n }\n ]\n ]\n },\n \"Search Google\": {\n \"main\": [\n [\n {\n \"node\": \"Response\",\n \"type\": \"main\",\n \"index\": 0\n }\n ]\n ]\n }\n },\n \"pinData\": {\n \"Execute Workflow Trigger\": [\n {\n \"query\": {\n \"google_search_query\": \"site:lemlist.com pricing\"\n }\n }\n ]\n }\n}",
|
||||
"jsonSchemaExample": "{\n\t\"google_search_query\": \"site:lemlist.com pricing\"\n}",
|
||||
"specifyInputSchema": true
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "7a89c803-8145-49c2-aafe-ec2aff0b2fbc",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2220,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"height": 340.14969579315925,
|
||||
"content": "Instead of SERP API module, you can also use this custom module for ScrapingBee. It is more cost-efficient.\n\nGet your free API key here https://www.scrapingbee.com/"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "79eff129-790b-46da-bef3-899eb6db3ced",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1100,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"width": 194.6864335083109,
|
||||
"height": 525.6560478822986,
|
||||
"content": "In this workflow, I use Google Sheets to store the results. \n\nYou can use my template to get started faster:\n\n1. [Click on this link to get the template](https://docs.google.com/spreadsheets/d/1vR6s2nlTwu01v3GP7wvSRWS5W49FJIh20ZF7AUkmMDo/edit?usp=sharing)\n2. Make a copy of the Sheets\n3. Add the URL to this node and the node **\"Google Sheets - Update Row with data\"**\n\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Input": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Sheets - Update Row with data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items": {
|
||||
"main": [
|
||||
null,
|
||||
[
|
||||
{
|
||||
"node": "AI company researcher",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Merge data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get rows to enrich",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI company researcher",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get rows to enrich": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Input",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get website content": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI company researcher",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AI company researcher": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Researcher Output Data",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"SerpAPI - Search Google": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI company researcher",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Structured Output Parser": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "AI company researcher",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AI Researcher Output Data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge data",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \"Test workflow\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get rows to enrich",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Sheets - Update Row with data": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,733 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "e4f78845dfed9ddcfba1945ae00d12e9a7d76eab052afd19299228ce02349d86"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "23291d25-3e1a-4b0d-9b1d-d066e8c04a1f",
|
||||
"name": "Customer Lead AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
-640,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=**System Prompt:**\n\nYou are an AI assistant designed to process new leads and generate appropriate responses. Your role includes analyzing lead notes, categorizing them, and generating an email from the system to inform the relevant contact about the inquiry. Do not send the email as if it is directly from the customer; instead, draft it as a notification from the system summarizing the inquiry.\n\n### **Process Flow**\n\n1. **Analyzing Lead Notes:**\n - Extract key details such as the customer name, organization, contact information, and their specific request. \n - Determine if the inquiry relates to products, services, or solutions offered by the company.\n\n2. **Finding the Appropriate Contact(s):**\n - Search the contact database to find the responsible person(s) for the relevant product, service, or solution. \n - If one person is responsible, provide their email. \n - If multiple people are responsible, list all emails separated by commas.\n\n3. **Generating an Email Notification:**\n - Draft a professional email as a notification from the system.\n - Summarize the customer’s inquiry.\n - Include all relevant details to assist the recipient in addressing the inquiry.\n\n4. **Handling Invalid Leads:**\n - If the inquiry is unrelated to products, services, or solutions (e.g., job inquiries or general product inquiries), classify it as invalid and return: \n `\"Invalid Lead - Not related to products, services, or solutions.\"`\n\n### **Output Requirements**\n\n1. **For Relevant Leads:**\n - **Email Address(es):** Provide the appropriate email(s). \n - **Email Message Body:** Generate an email notification from the system summarizing the inquiry.\n\n2. **For Invalid Leads:**\n - Return: `\"Invalid Lead - Not related to products, services, or solutions.\"`\n\n\n### **Email Template for Relevant Leads**\n\n**Email Address(es):** [Relevant Email IDs]\n\n**Email Message Body:**\n\n_Subject: New Inquiry from Customer Regarding [Product/Service/Solution]_ \n\nDear [Recipient(s)], \n\nWe have received a new inquiry from a customer through our system. Below are the details: \n\n**Customer Name:** [Customer Name] \n**Organization:** [Organization Name] \n**Contact Information:** [Contact Details] \n\n**Inquiry Summary:** \n[Summarized description of the customer's request, e.g., “The customer is seeking to upgrade their restroom facilities with touchless soap dispensers and tissue holders installed behind mirrors. They have requested a site visit to assess the location and provide a proposal.”] \n\n**Action Required:** \nPlease prioritize this inquiry and reach out to the customer promptly to address their requirements. \n\nThank you, \n[Your System Name] \n\n\n### **Example Output**\n\n**Input Lead Notes:**\n*\"Dear Syncbricks, We are looking to Develop Workflow Automation Soluition for our company, can you let us know the details what do you offer in tems of this.\"*\n\n**Output:**\n\n- **Email Address(es):** employee@syncbricks.com\n\n- **Email Message Body:** \n\n_Subject: Workflow Automation Platform Integration_ \n\nDear -Emploiyee Name (s) --, \n\nWe have received a new inquiry from a customer through our system. Below are the details: \n\n**Customer Name:** Amjid Ali \n**Organization:** Syncbricks LLC\n**Contact Information:** 123456789 \n\n**Inquiry Summary:** \nThe customer is asking for workflow automation for their company \n\n**Action Required:** \nPlease prioritize this inquiry and reach out to the customer promptly to address their requirements. \n\nThank you, \nSyncbricks LLC\n\n---\nHere are the Lead Details\nLead Name : {{ $json.data.lead_name }}\nCompany : {{ $json.data.company_name }}\nSource : {{ $json.data.source }}\nNotes : {{ $json.data.notes }}\nCity : {{ $json.data.city }}\nCountry : {{ $json.data.country }}\nMobile : {{ $json.data.mobile_no }}",
|
||||
"options": {},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "1831dc36-910b-4a72-a90e-b411f105a8c3",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
-800,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "hTl3a2XqteCwExYY",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "79713c56-2f7c-4872-90e4-331715f54048",
|
||||
"name": "Abbriviations",
|
||||
"type": "n8n-nodes-base.googleSheetsTool",
|
||||
"position": [
|
||||
-640,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1gtdrAe-jjQH9gQdXA9PJ5y3dSAN4i6k_Rs5sDyALIfU/edit#gid=0",
|
||||
"cachedResultName": "abbrivaitions"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "1gtdrAe-jjQH9gQdXA9PJ5y3dSAN4i6k_Rs5sDyALIfU",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1gtdrAe-jjQH9gQdXA9PJ5y3dSAN4i6k_Rs5sDyALIfU/edit?usp=drivesdk",
|
||||
"cachedResultName": "Abbriviations List"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "L3lApjbQfMm36LLX",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "73b1e3c9-4703-4f87-8399-e7a9bf368d4c",
|
||||
"name": "Lead Body",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
-1640,
|
||||
640
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "82a674a2-4d12-45f2-b276-cc95cf7b2e93",
|
||||
"name": "body",
|
||||
"type": "object",
|
||||
"value": "={{ $json.body }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "5f25d846-c639-49e5-bea2-160000bfb104",
|
||||
"name": "Source Website and Status Open",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
-1920,
|
||||
640
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "2b184de2-a64e-44e3-8f25-645539681533",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.body.source }}",
|
||||
"rightValue": "Website"
|
||||
},
|
||||
{
|
||||
"id": "9632cf65-11a1-483c-95c8-94bfe84fb243",
|
||||
"operator": {
|
||||
"name": "filter.operator.equals",
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.body.status }}",
|
||||
"rightValue": "Open"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "12ba65c9-0890-4862-9704-98492eb8f637",
|
||||
"name": "Microsoft Outlook",
|
||||
"type": "n8n-nodes-base.microsoftOutlook",
|
||||
"position": [
|
||||
1180,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"subject": "={{ $('Fields for Outlook').item.json.subject }}",
|
||||
"bodyContent": "={{ $json.html }}\n<a href=\"https://erpnext.syncbricks.com/app/lead/{{ $('Webhook').item.json.body.name }}\" target=\"_blank\" rel=\"noopener noreferrer\">Here is Lead {{ $('Source Website and Status Open').item.json.body.name }} </a>\n",
|
||||
"toRecipients": "= {{ $('Fields for Outlook').item.json.email_addresses }}",
|
||||
"additionalFields": {
|
||||
"bodyContentType": "html"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"microsoftOutlookOAuth2Api": {
|
||||
"id": "9gy3uvf3pmBdpEsq",
|
||||
"name": "Microsoft Outlook Al Ansari"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "b1410997-3705-4234-918e-a14e4ccc6b70",
|
||||
"name": "Email Body Text Generated by AI",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
700,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "cdce31fb-2ec9-45ce-a4ac-a6ff9c811dc3",
|
||||
"name": "email_body",
|
||||
"type": "string",
|
||||
"value": "={{ $json.email_body }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "b10684b9-9f72-42b3-a9f9-c54e711ceb59",
|
||||
"name": "Fields for Outlook",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
360,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Input text from the `output` field\nconst textOutput = $json?.output || '';\n\n// Function to extract values from the text\nfunction extractFields(text) {\n const fields = {};\n\n // Regular expressions to extract each field\n const emailMatch = text.match(/\\*\\*Email Address\\(es\\):\\*\\*\\s*([^\\n]+)/);\n const subjectMatch = text.match(/_Subject:\\s*([^_]+)/);\n const emailBodyMatch = text.match(/Dear[\\s\\S]+/);\n\n // Assign extracted values to the fields\n fields.email_addresses = emailMatch ? emailMatch[1].trim() : null;\n fields.subject = subjectMatch ? subjectMatch[1].trim() : null;\n fields.email_body = emailBodyMatch ? emailBodyMatch[0].trim() : null;\n\n return fields;\n}\n\n// Extract fields from the output\nconst extractedFields = extractFields(textOutput);\n\n// Return the fields as JSON\nreturn {\n json: extractedFields\n};\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "e2c10569-fde2-425c-8b20-fdb32a6e2bd5",
|
||||
"name": "Email Body for Outlook",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
860,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Input email body\nconst emailBody = $json.email_body || '';\n\n// Function to convert plain text email body into HTML\nfunction formatEmailBodyAsHtml(body) {\n // Replace markdown-like sections with corresponding HTML\n let htmlBody = body\n .replace(/\\*\\*Customer Name:\\*\\* (.+)/, '<p><strong>Customer Name:</strong> $1</p>')\n .replace(/\\*\\*Organization:\\*\\* (.+)/, '<p><strong>Organization:</strong> $1</p>')\n .replace(/\\*\\*Contact Information:\\*\\* (.+)/, '<p><strong>Contact Information:</strong> $1</p>')\n .replace(/\\*\\*Inquiry Summary:\\*\\*\\s*([\\s\\S]+?)(?=\\n\\n\\*\\*Action Required:)/, '<p><strong>Inquiry Summary:</strong> $1</p>')\n .replace(/\\*\\*Action Required:\\*\\*\\s*([\\s\\S]+)/, '<p><strong>Action Required:</strong> $1</p>');\n\n // Wrap each paragraph in `<p>` tags for better readability\n htmlBody = htmlBody\n .replace(/Dear (.+?),/, '<p>Dear <strong>$1</strong>,</p>')\n .replace(/Thank you,\\s+(.+)/, '<p>Thank you,<br><strong>$1</strong></p>');\n\n return htmlBody;\n}\n\n// Convert the email body into HTML\nconst formattedHtmlBody = formatEmailBodyAsHtml(emailBody);\n\n// Return the formatted HTML\nreturn {\n html: formattedHtmlBody\n};\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "3297550b-ed78-4528-ad65-facdc879590a",
|
||||
"name": "Inquiry has Notes",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
-1080,
|
||||
640
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "bc81994a-2ad8-4af7-8c58-2c7e58a0fd2e",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "exists",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.data.notes }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "e2544a27-8b6d-4bb0-84f1-00c3a5e66978",
|
||||
"name": "Inquiry is Valid?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
40,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "ddd5e8a2-277f-4db6-b38d-28a7b91a2f66",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "notEquals"
|
||||
},
|
||||
"leftValue": "={{ $json.output }}",
|
||||
"rightValue": "**Invalid Lead - Not related to products, services, or solutions.**"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "39cc73e7-ceb3-4e8e-a5bc-55648595f784",
|
||||
"name": "Company Profile",
|
||||
"type": "n8n-nodes-base.googleDocsTool",
|
||||
"position": [
|
||||
-540,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "get",
|
||||
"documentURL": "you-must-provide-the-doc-id"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDocsOAuth2Api": {
|
||||
"id": "RdTuYvYpBqEKhIQ3",
|
||||
"name": "Google Docs account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "8ee24c59-1acb-4d76-a136-74e69d694a49",
|
||||
"name": "Company Policies",
|
||||
"type": "n8n-nodes-base.googleDocsTool",
|
||||
"position": [
|
||||
-420,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "get",
|
||||
"documentURL": "you-must-provide-the-doc-id"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDocsOAuth2Api": {
|
||||
"id": "RdTuYvYpBqEKhIQ3",
|
||||
"name": "Google Docs account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "a5db3aa7-8a77-4553-9c13-a96c51f32745",
|
||||
"name": "Company Contact Database",
|
||||
"type": "n8n-nodes-base.googleSheetsTool",
|
||||
"position": [
|
||||
-300,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "",
|
||||
"cachedResultUrl": "",
|
||||
"cachedResultName": ""
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "=Telephone Directory"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "L3lApjbQfMm36LLX",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "f3e73266-faa4-4e6d-8c60-92669d64233b",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2000,
|
||||
257.53836663807056
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 297.84037615575886,
|
||||
"height": 643.0692298205195,
|
||||
"content": "### Filter the Lead\nI have done only for theose which are open and where the source is Website. You can remove this if you want to have all leads."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0056e35c-4901-406d-9a95-f6da26808841",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-60,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 302.58963031819115,
|
||||
"height": 660,
|
||||
"content": "### Output from AI Agent\nIf the INquiry is invalid, not related to the products and services offered, it will invalidate that you can optionnally link the invalid output to email or anything. Options are limitless"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5e0e9561-0fb8-4225-aa59-58e25abc8ca1",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-880,
|
||||
280.0000000000002
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 764.2159851725196,
|
||||
"height": 648.5051458745236,
|
||||
"content": "### Customer Experience Agent (AI)\nNow this Node is an AI Agent who is speicalized to understand the Lead Source and the Inquiry sent by Cusomter. The Agent will look at company information, which has detials of producuts and services defined in Google Docs, and the Contacts Sheet where a column must be added mentioning that who is the person dealing in which products, solutions and services. Once the inquiry is about speicifc product solution and service it will look from the sheet and then will decide to whom the email has to be sent. Details is defined in the Agent.\nMake sure to drag fields from http request node"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5a3ca9c9-07c2-4c74-ba8c-6b14f487fc4d",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2420,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 398,
|
||||
"height": 642,
|
||||
"content": "### Once the Lead is generatd in ERP\n\nConsider creating creating an inquiry web form in ERPNext and let the Website Visitor fill that Inquiry form, as soon as the iqnuiry form is filled this workflow will start.\n\nMake sure to create a webhook in ERPNext. Follow Below steps in ERPNext.\n\nGo to Wehbooks \nDoctype : Lead\nTrigger : on_insert\n\nPaste this webhook there, as test first and finally production"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cf930f52-d06b-40c1-91f5-fa1c3dfee09a",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
618.1625654107004,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 388.6432532629275,
|
||||
"height": 662,
|
||||
"content": "### Email Body\nGet only Email body from Previous Node and then Convert this to HTML Format so that it looks professional. \n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a1023b2b-3e0d-486f-9050-8ff98ff060b5",
|
||||
"name": "Sticky Note12",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1440,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 248.905549047384,
|
||||
"height": 654.6630436071407,
|
||||
"content": "### Get Details of Lead from ERPNext. For us most important is Notes"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "732046b2-967a-4e0c-85e4-ae04e8c0f9cf",
|
||||
"name": "Sticky Note13",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1680,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 222.5278407657604,
|
||||
"height": 651.0941643427163,
|
||||
"content": "### Get Lead ID\nThis will extract the Lead Name in ERPNext. Ensure to send doc.name from the webhook in ERPnext\n\nIt will then send this to next node to get full details of this lead."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b80448ee-5a15-4569-99e4-c3e616a5600d",
|
||||
"name": "Sticky Note14",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1035.2592266730085,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 399.43186296400074,
|
||||
"height": 662,
|
||||
"content": "### Send Email\n\nNow drag and drop the fields from Previous Nodes. Email Addresses Subject and Body.\n\nRemember all fields are selected by AI Agent, whom to send email, what to send and so on. \n\nYou can alternatively inform your employees by whatsapp for quick action."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3d190d34-f6e0-47bc-9216-d312d1d6ee38",
|
||||
"name": "Sticky Note11",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-2920,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 475.27306699862953,
|
||||
"height": 636.1483291619771,
|
||||
"content": "## Developed by Amjid Ali\n\nThank you for using this workflow template. It has taken me countless hours of hard work, research, and dedication to develop, and I sincerely hope it adds value to your work.\n\nIf you find this template helpful, I kindly ask you to consider supporting my efforts. Your support will help me continue improving and creating more valuable resources.\n\nYou can contribute via PayPal here:\n\nhttp://paypal.me/pmptraining\n\nFor Full Course about ERPNext or Automation using AI follow below link\n\nhttp://lms.syncbricks.com\n\nAdditionally, when sharing this template, I would greatly appreciate it if you include my original information to ensure proper credit is given.\n\nThank you for your generosity and support!\nEmail : amjid@amjidali.com\nhttps://linkedin.com/in/amjidali\nhttps://syncbricks.com\nhttps://youtube.com/@syncbricks"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cfd7effc-92aa-43c6-9fc5-054b53de74a2",
|
||||
"name": "Sticky Note16",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1160,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 248.905549047384,
|
||||
"height": 654.6630436071407,
|
||||
"content": "### Inquiry with Notes\nIf inquiry is having notes then only it will forward to next node."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e5b0992c-e360-4323-82cb-c7ddec45deb5",
|
||||
"name": "Get Lead Data from ERPNext",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-1360,
|
||||
640
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://erpnext.syncbricks.com/api/resource/Lead/{{ $('Source Website and Status Open').item.json.body.name }}",
|
||||
"options": {},
|
||||
"authentication": "predefinedCredentialType",
|
||||
"nodeCredentialType": "erpNextApi"
|
||||
},
|
||||
"credentials": {
|
||||
"erpNextApi": {
|
||||
"id": "PInpnsxvPkvaiW0z",
|
||||
"name": "ERPNext account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "87508043-baf5-4fa6-aa38-0f06881dc267",
|
||||
"name": "Sticky Note10",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
280,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 302.58963031819115,
|
||||
"height": 660,
|
||||
"content": "### Prepare for Email\nThis node will get approprate Fields for Email \nEmail Addresses:\nSubject : \nEmail Body : "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2b4c1e91-c64b-43cb-aba2-c6f8f5a17c79",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
-2300,
|
||||
640
|
||||
],
|
||||
"webhookId": "a39ea4e2-99b7-4ae1-baff-9fb370333e2a",
|
||||
"parameters": {
|
||||
"path": "new-lead-generated-in-erpnext",
|
||||
"options": {},
|
||||
"httpMethod": "POST"
|
||||
},
|
||||
"typeVersion": 2
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Source Website and Status Open",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Lead Body": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Lead Data from ERPNext",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Abbriviations": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Customer Lead AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Company Profile": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Customer Lead AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Company Policies": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Customer Lead AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Inquiry has Notes": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Customer Lead AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Inquiry is Valid?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Fields for Outlook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Customer Lead AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Fields for Outlook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Email Body Text Generated by AI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Customer Lead AI Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Inquiry is Valid?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Email Body for Outlook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Microsoft Outlook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Company Contact Database": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Customer Lead AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Lead Data from ERPNext": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Inquiry has Notes",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Source Website and Status Open": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Lead Body",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Email Body Text Generated by AI": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Email Body for Outlook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}AI-Driven Lead Management and Inquiry Automation with ERPNext & n8n
|
||||
1034
AI-Generated Summary Block for WordPress Posts.txt
Normal file
1034
AI-Generated Summary Block for WordPress Posts.txt
Normal file
File diff suppressed because it is too large
Load Diff
1078
AI-Powered Candidate Shortlisting Automation for ERPNext.txt
Normal file
1078
AI-Powered Candidate Shortlisting Automation for ERPNext.txt
Normal file
File diff suppressed because it is too large
Load Diff
431
AI-Powered Children_s Arabic Storytelling on Telegram.txt
Normal file
431
AI-Powered Children_s Arabic Storytelling on Telegram.txt
Normal file
@@ -0,0 +1,431 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "84ba6d895254e080ac2b4916d987aa66b000f88d4d919a6b9c76848f9b8a7616",
|
||||
"templateId": "2234"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "e0f68f60-f036-4103-a9fc-d6cb80b6f8a2",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1980,
|
||||
1100
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4-turbo",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "kDo5LhPmHS2WQE0b",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "23779dea-c21d-42da-b493-09394bc64436",
|
||||
"name": "OpenAI Chat Model1",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
2420,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4-turbo",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "kDo5LhPmHS2WQE0b",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "af59863e-12c5-414c-bf64-dd6712e3aa7b",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
1680,
|
||||
960
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "hours",
|
||||
"hoursInterval": 12
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "bc2ad02b-72c9-4132-96e8-b64487f589f7",
|
||||
"name": "Recursive Character Text Splitter",
|
||||
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
|
||||
"position": [
|
||||
2160,
|
||||
1140
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"chunkSize": 500,
|
||||
"chunkOverlap": 300
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cb11a8bb-bdca-43cb-a586-7f93471d58f7",
|
||||
"name": "OpenAI Chat Model2",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
2420,
|
||||
1300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "kDo5LhPmHS2WQE0b",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9d02b910-a467-4d4d-a2fa-32d1d3361d21",
|
||||
"name": "Create a Prompt for DALL-E",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainSummarization",
|
||||
"position": [
|
||||
2400,
|
||||
1080
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"summarizationMethodAndPrompts": {
|
||||
"values": {
|
||||
"prompt": "Summarize the characters in this story based on their appearance and describe them if they are humans or animals and how they look like and what kind of are they, the prompt should be no-text in the picture.\n\n\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:",
|
||||
"summarizationMethod": "stuff"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "4723dd65-96f5-41c1-9ff6-f1a344d96241",
|
||||
"name": "Generate an Image for the Story",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
2860,
|
||||
1080
|
||||
],
|
||||
"parameters": {
|
||||
"prompt": "=Produce an image ensuring that no text is generated within the visual content. {{ $json.response.text }}",
|
||||
"options": {},
|
||||
"resource": "image"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "kDo5LhPmHS2WQE0b",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "70b7f55a-31c4-456b-8273-8250bac74409",
|
||||
"name": "Generate Audio for the Story",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
2640,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"input": "={{ $json.response.text }}",
|
||||
"options": {},
|
||||
"resource": "audio"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "kDo5LhPmHS2WQE0b",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "c381dbe4-6112-441c-b213-8a2d218f4cc2",
|
||||
"name": "Send the Story To Channel",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
3160,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.response.text }}",
|
||||
"chatId": "=-4170994782",
|
||||
"additionalFields": {
|
||||
"appendAttribution": false
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "k3RE6o9brmFRFE9p",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "78289bfa-54b4-4acb-b513-7a0134a010f3",
|
||||
"name": "Send Image to the Channel",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
3180,
|
||||
1080
|
||||
],
|
||||
"parameters": {
|
||||
"chatId": "=-4170994782",
|
||||
"operation": "sendPhoto",
|
||||
"binaryData": true,
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "k3RE6o9brmFRFE9p",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "f779047b-6dec-4e4e-ae09-4dd91f961d08",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
380,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1224.7156767468991,
|
||||
"height": 1282.378312060854,
|
||||
"content": "# Template for Kids' Story in Arabic\n\nThe n8n template for creating kids' stories in Arabic provides a versatile platform for storytellers to captivate young audiences with educational and interactive tales. Along with its core functionalities, this template allows for customization to suit various use cases and can be set up effortlessly.\n\nCheck this example: [https://t.me/st0ries95](https://t.me/st0ries95)\n\n\n## Node Functionalities\n\n\n## Automated Storytelling Process\n\n\n## Use Cases\n1. **Educational Platforms**:\n Educational platforms can automate the creation and distribution of educational stories in Arabic for children using this template. By incorporating visual and auditory elements into the storytelling process, educational platforms can enhance learning experiences and engage young learners effectively.\n\n2. **Children's Libraries**:\n Children's libraries can utilize this template to curate and share a diverse collection of Arabic stories with young readers. The automated generation of visual content and audio files enhances the storytelling experience, encouraging children to immerse themselves in new worlds and characters through captivating narratives.\n\n3. **Language Learning Apps**:\n Language learning apps focused on Arabic can integrate this template to offer culturally rich storytelling experiences for children learning the language. By translating stories into Arabic and supplementing them with visual and auditory components, these apps can facilitate language acquisition in an enjoyable and interactive manner.\n\n## Configuration Guide for Nodes\n\n### OpenAI Chat Model Nodes:\n- **Credentials**: Provide the necessary API credentials for the OpenAI GPT-4 Turbo model.\n- **Options**: Configure any specific options required for the chat model.\n\n### Create a Prompt for DALL-E Node:\n- **Prompts Customization**: Customize prompts to generate relevant visual content for the stories.\n- **Summarization Method and Prompts**: Define the summarization method and prompts for generating visual content without text.\n\n### Generate an Image for the Story Node:\n- **Resource**: Specify the type of resource (image).\n- **Prompt**: Set up the prompt for producing an image without text within the visual content.\n\n### Generate Audio for the Story Node:\n- **Resource**: Select the type of resource (audio).\n- **Input**: Define the input text for generating audio files.\n\n### Translate the Story to Arabic Node:\n- **Chunking Mode**: Choose the chunking mode (advanced).\n- **Summarization Method and Prompts**: Set the summarization method and prompts for translating the story into Arabic.\n\n### Send the Story To Channel Node:\n- **Chat ID**: Provide the chat ID where the story text will be sent.\n- **Text**: Configure the text to be sent to the channel.\n\nBy configuring each node as per the guidelines above, users can effectively set up and customize the n8n template for kids' stories in Arabic, tailoring it to specific use cases and delivering a seamless and engaging storytelling experience for young audiences.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5ef92ebc-e4e4-4165-a7df-9f94802f8e27",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1620,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1811.9647367735226,
|
||||
"height": 1280.7253282813103,
|
||||
"content": ""
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "76d2b256-8083-42d9-8465-63b2f9c73a67",
|
||||
"name": "Translate the Story to Arabic",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainSummarization",
|
||||
"position": [
|
||||
2400,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"summarizationMethodAndPrompts": {
|
||||
"values": {
|
||||
"prompt": "Translate this story texts to \"Arabic\" and make it easy to understands for kids with easy words and moral lesson :\n\n\n\"{text}\"\n\n\n",
|
||||
"summarizationMethod": "stuff"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chunkingMode": "advanced"
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "126e463e-f1e8-4cd2-856d-aaaebc279797",
|
||||
"name": "Send Audio to the Channel",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
3180,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"chatId": "-4170994782",
|
||||
"operation": "sendAudio",
|
||||
"binaryData": true,
|
||||
"additionalFields": {
|
||||
"caption": "نهاية القصة ... "
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "k3RE6o9brmFRFE9p",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "162049a0-620a-4044-966a-27b665827b60",
|
||||
"name": "Create a Story for Kids",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainSummarization",
|
||||
"position": [
|
||||
1980,
|
||||
960
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"summarizationMethodAndPrompts": {
|
||||
"values": {
|
||||
"prompt": "Create a captivating short tale for kids, whisking them away to magical lands brimming with wisdom. Explore diverse themes in a fun and simple way, weaving in valuable messages. Dive into cultural adventures with lively language that sparks curiosity. Let your story inspire young minds through enchanting narratives that linger long after the last word. Begin crafting your imaginative tale now! (Approximately 900 characters)\n\n\n\"{text}\"\n\nCONCISE SUMMARY:",
|
||||
"summarizationMethod": "stuff"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chunkingMode": "advanced"
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 2
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create a Story for Kids",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Create a Story for Kids",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model1": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Translate the Story to Arabic",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model2": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Create a Prompt for DALL-E",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create a Story for Kids": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Translate the Story to Arabic",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Create a Prompt for DALL-E",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create a Prompt for DALL-E": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Generate an Image for the Story",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate Audio for the Story": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Audio to the Channel",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Translate the Story to Arabic": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send the Story To Channel",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Generate Audio for the Story",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate an Image for the Story": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Image to the Channel",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Recursive Character Text Splitter": {
|
||||
"ai_textSplitter": [
|
||||
[
|
||||
{
|
||||
"node": "Create a Story for Kids",
|
||||
"type": "ai_textSplitter",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,401 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "84ba6d895254e080ac2b4916d987aa66b000f88d4d919a6b9c76848f9b8a7616",
|
||||
"templateId": "2233"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "757a7e67-073a-4fa1-b571-2ddd147b35f6",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1000,
|
||||
1240
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-3.5-turbo-16k-0613",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "kDo5LhPmHS2WQE0b",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "761ed83a-2cfb-474a-b596-922e5a7e2717",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
660,
|
||||
1060
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "hours",
|
||||
"hoursInterval": 12
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "41faf334-30d6-4cc0-9a94-9c486ec3fa6c",
|
||||
"name": "OpenAI Chat Model2",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1520,
|
||||
1420
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "kDo5LhPmHS2WQE0b",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d9ad0a3a-2ce6-4071-8262-8176b3eecf36",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1780,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1004.4263690337257,
|
||||
"height": 811.7188223885136,
|
||||
"content": "### Setting Up a Workflow for \"AI-Powered Children's English Storytelling on Telegram\"\n\nIn this guide, we will walk you through the process of setting up a workflow to create and share captivating children's stories using the provided configuration. Let's dive into the steps required to bring these imaginative tales to life on your Telegram channel:\n\n#### Steps to Setup the Workflow:\n1. **Import the Workflow:**\n - Copy the provided workflow JSON configuration.\n - In your n8n instance, go to Workflows and select \"Import from JSON.\"\n - Paste the configuration and import the workflow.\n\n2. **Configure Node Credentials:**\n - For nodes requiring API credentials (OpenAI and Telegram), create credentials with the appropriate API keys or tokens.\n\n3. **Set Node Parameters:**\n - Modify node parameters as needed, such as chat IDs, prompts, and intervals.\n - Change the chatId in Config node to the ID of the chat you want the story to be posted.\n\n4. **Ensure Data Flow:**\n - Check the connections between nodes to ensure a smooth flow of data and actions.\n\n5. **Execute Once:**\n - Activate the \"executeOnce\" option in nodes where necessary to trigger actions only once during setup.\n\n6. **Test the Workflow:**\n - Run the workflow to verify that each node functions correctly and data is processed as expected.\n\n7. **Enable Recurring Triggers:**\n - Confirm that the Schedule Trigger node is set to trigger the workflow at the desired interval (every 12 hours).\n\n8. **Initiate Workflow:**\n - Once everything is configured correctly, activate the workflow to start generating and sharing children's stories on Telegram.\n\nBy following these steps meticulously, you can seamlessly establish and operate the workflow designed to create captivating children's stories for your audience. Embrace the power of automation to inspire young minds and foster a love for storytelling through engaging narratives shared on Telegram.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b550e4ff-167d-4b12-8dff-0511a435cd7c",
|
||||
"name": "Create a Prompt for DALL-E",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainSummarization",
|
||||
"position": [
|
||||
1500,
|
||||
1280
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"summarizationMethodAndPrompts": {
|
||||
"values": {
|
||||
"prompt": "Summarize the characters in this story based on their appearance and describe them if they are humans or animals and how they look like and what kind of are they, the prompt should be no-text in the picture, make sure the text is free from any prohibited or inappropriate content:\n\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:",
|
||||
"summarizationMethod": "stuff"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "024a3615-9e90-4e47-81e3-21febfc2f0c9",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
380,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"width": 611.6882702103559,
|
||||
"height": 651.7145525871413,
|
||||
"content": "### Use Case for Setting Up a Workflow for Children's Stories\n\nCheck this example: [https://t.me/st0ries95](https://t.me/st0ries95)\n\n\nThe workflow for children's stories serves as a valuable tool for content creators, educators, and parents looking to engage children with imaginative and educational storytelling. Here are some key use cases for this workflow:\n\n1. **Content Creation:** The workflow streamlines the process of creating captivating children's stories by providing a structured framework and automation for story generation, audio creation, and image production.\n\n2. **Educational Resources:** Teachers can use this workflow to develop educational materials that incorporate storytelling to make learning more engaging and interactive for students.\n\n3. **Parental Engagement:** Parents can utilize the workflow to share personalized stories with their children, fostering a love for reading and creativity while bonding over shared storytelling experiences.\n\n4. **Community Building:** Organizations and community groups can leverage the workflow to create and share children's stories as a way to connect with their audience and promote literacy and creativity.\n\n5. **Inspiring Young Minds:** By automating the process of creating and sharing enchanting children's stories, this workflow aims to inspire young minds, spark imagination, and instill a passion for storytelling in children.\n\nOverall, the use case for this workflow extends to various settings where storytelling plays a significant role in engaging, educating, and entertaining children, making it a versatile tool for enhancing the storytelling experience.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "11bfff09-33c6-48ab-b9e6-2e5349a87ca5",
|
||||
"name": "Recursive Character Text Splitter",
|
||||
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
|
||||
"position": [
|
||||
1160,
|
||||
1260
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"chunkSize": 500,
|
||||
"chunkOverlap": 300
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9da21054-961e-4b7a-973e-1c180571ce92",
|
||||
"name": "Create a story",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainSummarization",
|
||||
"position": [
|
||||
1080,
|
||||
1060
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"summarizationMethodAndPrompts": {
|
||||
"values": {
|
||||
"prompt": "Create a captivating short tale for kids, whisking them away to magical lands brimming with wisdom. Explore diverse themes in a fun and simple way, weaving in valuable messages. Dive into cultural adventures with lively language that sparks curiosity. Let your story inspire young minds through enchanting narratives that linger long after the last word. Begin crafting your imaginative tale now! (Approximately 900 characters)\n\n\n\"{text}\"\n\nCONCISE SUMMARY:",
|
||||
"summarizationMethod": "stuff"
|
||||
}
|
||||
}
|
||||
},
|
||||
"chunkingMode": "advanced"
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "35579446-e11c-416b-b34a-b31e8461a1b3",
|
||||
"name": "Generate Audio for the story",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
1520,
|
||||
1060
|
||||
],
|
||||
"parameters": {
|
||||
"input": "={{ $json.response.text }}",
|
||||
"options": {},
|
||||
"resource": "audio"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "kDo5LhPmHS2WQE0b",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "453d149f-a2a7-4fc9-ba3b-85b42df1c29b",
|
||||
"name": "Generate a Picture for the story",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
1840,
|
||||
1280
|
||||
],
|
||||
"parameters": {
|
||||
"prompt": "=Produce an image ensuring that no text is generated within the visual content. {{ $json.response.text }}",
|
||||
"options": {},
|
||||
"resource": "image"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "kDo5LhPmHS2WQE0b",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "8f324f12-b21e-4d0c-b7fa-5e2f93ba08aa",
|
||||
"name": "Send Story Text",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
1520,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.response.text }}",
|
||||
"chatId": "={{ $('Config').item.json.chatId }}",
|
||||
"additionalFields": {
|
||||
"appendAttribution": false
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "k3RE6o9brmFRFE9p",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "51a08f75-1c34-48a0-86de-b47e435ef618",
|
||||
"name": "Send Audio for the story",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
1720,
|
||||
1060
|
||||
],
|
||||
"parameters": {
|
||||
"chatId": "={{ $('Config').item.json.chatId }}",
|
||||
"operation": "sendAudio",
|
||||
"binaryData": true,
|
||||
"additionalFields": {
|
||||
"caption": "End of the Story for today ....."
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "k3RE6o9brmFRFE9p",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "3f890a4d-26ea-452a-8ed5-917282e8b0d8",
|
||||
"name": "Send Story Picture",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
2020,
|
||||
1280
|
||||
],
|
||||
"parameters": {
|
||||
"chatId": "={{ $('Config').item.json.chatId }}",
|
||||
"operation": "sendPhoto",
|
||||
"binaryData": true,
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "k3RE6o9brmFRFE9p",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "1cbec52c-b545-45df-885f-57c287f81017",
|
||||
"name": "Config",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
880,
|
||||
1060
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "327667cb-b5b0-4f6f-915c-544696ed8e5a",
|
||||
"name": "chatId",
|
||||
"type": "string",
|
||||
"value": "-4170994782"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Config": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create a story",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create a story": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Generate Audio for the story",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Create a Prompt for DALL-E",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Send Story Text",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Config",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Create a story",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model2": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Create a Prompt for DALL-E",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create a Prompt for DALL-E": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Generate a Picture for the story",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate Audio for the story": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Audio for the story",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate a Picture for the story": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Story Picture",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Recursive Character Text Splitter": {
|
||||
"ai_textSplitter": [
|
||||
[
|
||||
{
|
||||
"node": "Create a story",
|
||||
"type": "ai_textSplitter",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,851 @@
|
||||
{
|
||||
"id": "q8IFGLeOCGSfoWZu",
|
||||
"meta": {
|
||||
"instanceId": "a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Email AI Auto-responder. Summerize and send email",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "59885699-0f6c-4522-acff-9e28b2a07b82",
|
||||
"name": "Email Trigger (IMAP)",
|
||||
"type": "n8n-nodes-base.emailReadImap",
|
||||
"position": [
|
||||
-440,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"imap": {
|
||||
"id": "k31W9oGddl9pMDy4",
|
||||
"name": "IMAP info@n3witalia.com"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "b268ab9d-b2e3-46e6-b7ae-70aff0b5484d",
|
||||
"name": "Markdown",
|
||||
"type": "n8n-nodes-base.markdown",
|
||||
"position": [
|
||||
-220,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"html": "={{ $json.textHtml }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "13c2d151-6f59-4e1f-a174-02d4d0bcaefd",
|
||||
"name": "DeepSeek R1",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
-20,
|
||||
160
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "deepseek/deepseek-r1:free",
|
||||
"cachedResultName": "deepseek/deepseek-r1:free"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "XJTqRiKFJpFs5MuX",
|
||||
"name": "OpenRouter account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "8149e40d-64e6-4fb9-aebc-2a2483961f07",
|
||||
"name": "Send Email",
|
||||
"type": "n8n-nodes-base.emailSend",
|
||||
"position": [
|
||||
500,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"html": "={{ $json.text }}",
|
||||
"options": {},
|
||||
"subject": "=Re: {{ $('Email Trigger (IMAP)').item.json.subject }}",
|
||||
"toEmail": "={{ $('Email Trigger (IMAP)').item.json.from }}",
|
||||
"fromEmail": "={{ $('Email Trigger (IMAP)').item.json.to }}"
|
||||
},
|
||||
"credentials": {
|
||||
"smtp": {
|
||||
"id": "hRjP3XbDiIQqvi7x",
|
||||
"name": "SMTP info@n3witalia.com"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "633f0ce9-04ff-4653-8bbc-7457ba0d18bd",
|
||||
"name": "Qdrant Vector Store",
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
|
||||
"position": [
|
||||
-320,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "retrieve-as-tool",
|
||||
"options": {},
|
||||
"toolName": "company_knowladge_base",
|
||||
"toolDescription": "Extracts information regarding the request made.",
|
||||
"qdrantCollection": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "=COLLECTION"
|
||||
},
|
||||
"includeDocumentMetadata": false
|
||||
},
|
||||
"credentials": {
|
||||
"qdrantApi": {
|
||||
"id": "iyQ6MQiVaF3VMBmt",
|
||||
"name": "QdrantApi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "20daf5d3-dc9c-4fad-9f2f-98d86bc1660c",
|
||||
"name": "Embeddings OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"position": [
|
||||
-340,
|
||||
760
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "CDX6QM4gLYanh0P4",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "67699bca-4096-4259-bbd4-51a879539aca",
|
||||
"name": "Email Classifier",
|
||||
"type": "@n8n/n8n-nodes-langchain.textClassifier",
|
||||
"position": [
|
||||
360,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"fallback": "other",
|
||||
"multiClass": false,
|
||||
"enableAutoFixing": true,
|
||||
"systemPromptTemplate": "Please classify the text provided by the user into one of the following categories: {categories}, and use the provided formatting instructions below. Don't explain, and only output the json.\n"
|
||||
},
|
||||
"inputText": "=You must classify the following email::\n\n{{ $json.response.text }}",
|
||||
"categories": {
|
||||
"categories": [
|
||||
{
|
||||
"category": "Company info request",
|
||||
"description": "Company info request"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9f7742e9-87d5-40b9-9129-0777d8a37933",
|
||||
"name": "Email Summarization Chain",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainSummarization",
|
||||
"position": [
|
||||
0,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"binaryDataKey": "={{ $json.data }}",
|
||||
"summarizationMethodAndPrompts": {
|
||||
"values": {
|
||||
"prompt": "=Write a concise summary of the following in max 100 words:\n\n\"{{ $json.data }}\"\n\nDo not enter the total number of words used.",
|
||||
"combineMapPrompt": "=Write a concise summary of the following in max 100 words:\n\n\"{{ $json.data }}\"\n"
|
||||
}
|
||||
}
|
||||
},
|
||||
"operationMode": "nodeInputBinary"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "e2d404c0-2aad-407d-b75e-5ef0c5105c0e",
|
||||
"name": "Write email",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
-440,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Write the text to reply to the following email:\n\n{{ $json.response.text }}",
|
||||
"options": {
|
||||
"systemMessage": "You are an expert at answering emails. You need to answer them professionally based on the information you have. This is a business email. Be concise and never exceed 100 words."
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "3786c2de-c5cb-4233-826e-7265f2bccbdb",
|
||||
"name": "Review email",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
40,
|
||||
340
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Review at the following email:\n\n{{ $json.output }}",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"message": "=If you are an expert in reviewing emails before sending them. You need to review and structure them in such a way that you can send them. It must be in HTML format and you can insert (if you think it is appropriate) only HTML characters such as <br>, <b>, <i>, <p> where necessary.\n\nNon superare le 100 parole."
|
||||
}
|
||||
]
|
||||
},
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.5
|
||||
},
|
||||
{
|
||||
"id": "baf60eba-5e7b-467f-b27e-1388a91622d0",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-500,
|
||||
-980
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "77e6160f-20a7-4a75-9fef-bc875b953a16",
|
||||
"name": "Create collection",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-200,
|
||||
-1120
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://QDRANTURL/collections/COLLECTION",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "{\n \"filter\": {}\n}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "qhny6r5ql9wwotpn",
|
||||
"name": "Qdrant API (Hetzner)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "ab7764d1-531c-4281-8b89-015fb3f5e780",
|
||||
"name": "Refresh collection",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-200,
|
||||
-860
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://QDRANTURL/collections/COLLECTION/points/delete",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"jsonBody": "{\n \"filter\": {}\n}",
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpHeaderAuth",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Type",
|
||||
"value": "application/json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
"id": "qhny6r5ql9wwotpn",
|
||||
"name": "Qdrant API (Hetzner)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "cd3eaa81-0f94-484b-b0c2-ecf0ca4541dc",
|
||||
"name": "Get folder",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
20,
|
||||
-860
|
||||
],
|
||||
"parameters": {
|
||||
"filter": {
|
||||
"driveId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "My Drive",
|
||||
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
|
||||
"cachedResultName": "My Drive"
|
||||
},
|
||||
"folderId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "=test-whatsapp"
|
||||
}
|
||||
},
|
||||
"options": {},
|
||||
"resource": "fileFolder"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "HEy5EuZkgPZVEa9w",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "b39ecd2d-4d5b-4885-86a9-2cfe9f6074ef",
|
||||
"name": "Download Files",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
240,
|
||||
-860
|
||||
],
|
||||
"parameters": {
|
||||
"fileId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "={{ $json.id }}"
|
||||
},
|
||||
"options": {
|
||||
"googleFileConversion": {
|
||||
"conversion": {
|
||||
"docsToFormat": "text/plain"
|
||||
}
|
||||
}
|
||||
},
|
||||
"operation": "download"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "HEy5EuZkgPZVEa9w",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "8171b8f2-998d-4d72-ac28-524daae4a2d7",
|
||||
"name": "Default Data Loader",
|
||||
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
|
||||
"position": [
|
||||
620,
|
||||
-660
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"dataType": "binary"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ec6737ad-3fbe-4864-9df8-44f82d6f2c5c",
|
||||
"name": "Token Splitter",
|
||||
"type": "@n8n/n8n-nodes-langchain.textSplitterTokenSplitter",
|
||||
"position": [
|
||||
600,
|
||||
-500
|
||||
],
|
||||
"parameters": {
|
||||
"chunkSize": 300,
|
||||
"chunkOverlap": 30
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "57b6a4f3-e935-4058-bfdf-309d606c0ca9",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
0,
|
||||
-1180
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 880,
|
||||
"height": 220,
|
||||
"content": "# STEP 1\n\n## Create Qdrant Collection\nChange:\n- QDRANTURL\n- COLLECTION"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "21e2326a-138d-46f3-a849-a80aa7917da9",
|
||||
"name": "Qdrant Vector Store1",
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
|
||||
"position": [
|
||||
480,
|
||||
-860
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "insert",
|
||||
"options": {},
|
||||
"qdrantCollection": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "=COLLECTION"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"qdrantApi": {
|
||||
"id": "iyQ6MQiVaF3VMBmt",
|
||||
"name": "QdrantApi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0818fb6a-2adf-4725-90a4-11cdd7d14036",
|
||||
"name": "Embeddings OpenAI1",
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"position": [
|
||||
500,
|
||||
-620
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "CDX6QM4gLYanh0P4",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "8949d938-2743-45d6-b2ad-ce4ac139e0a3",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-220,
|
||||
-920
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 620,
|
||||
"height": 400,
|
||||
"content": "# STEP 2\n\n\n\n\n\n\n\n\n\n\n\n\n## Documents vectorization with Qdrant and Google Drive\nChange:\n- QDRANTURL\n- COLLECTION"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "36d384be-3e11-43b1-b8c3-f63df600a6a6",
|
||||
"name": "Do nothing",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
820,
|
||||
0
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "386c27cb-6e69-4d96-a8ab-8cfd43e6b171",
|
||||
"name": "OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
-520,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini",
|
||||
"cachedResultName": "gpt-4o-mini"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "CDX6QM4gLYanh0P4",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "0bd17bef-e205-464e-9b36-dcda75254e06",
|
||||
"name": "DeepSeek",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
40,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "deepseek/deepseek-r1:free",
|
||||
"cachedResultName": "deepseek/deepseek-r1:free"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "XJTqRiKFJpFs5MuX",
|
||||
"name": "OpenRouter account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "3e68a65f-af29-432f-8159-4a599e8a0866",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-540,
|
||||
-320
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1620,
|
||||
"height": 240,
|
||||
"content": "# STEP 3 - MAIN FLOW\n\n- Transform the email into Markdown format for optimal reading by the LLM model\n- Email Summarization through DeepSeek R1 (any model can be used)\n- I classify the email in such a way as to continue only with emails regarding general information about the company. In this way I can respond independently through the information obtained from the vector database\n- I create a chain where I entrust the review of the email to a high-performance model designed for this purpose\n- I send the response email\n\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3b6ae6aa-75a8-4038-bbc2-248ab533b3ab",
|
||||
"name": "OpenAI 4-o-mini",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
360,
|
||||
160
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini",
|
||||
"cachedResultName": "gpt-4o-mini"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "CDX6QM4gLYanh0P4",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {
|
||||
"Email Trigger (IMAP)": [
|
||||
{
|
||||
"json": {
|
||||
"to": "info@n3witalia.com",
|
||||
"date": "Wed, 5 Feb 2025 13:38:51 +0100",
|
||||
"from": "n3w Italia <info@n3w.it>",
|
||||
"subject": "Richiesta di informazioni aziendali",
|
||||
"metadata": {
|
||||
"x-gm-gg": "ASbGncsq6D/oyHjmnpbG4gCUuC0rZNUR8WW4c+LmGMSdGJ1lHkRnKn7b3ngCdndp8NB\tkyDG3unga3kPebzAv1LO7DS6rDMHTWb8F7kZoLijJUGlAy6wqmfX/n4z2DH1uSxp7EsnIP9K9",
|
||||
"arc-seal": "i=1; s=arc-2022; d=mailchannels.net; t=1738759167; a=rsa-sha256;\tcv=none;\tb=Fdjl0FQlp2JxGTUy9B6U3UVZDgw2xRK0M9ge2H7QXFuX8Jhy2/eDktsWwyDOuAnebq+pZB\tZmt9/ZWM+VqpfvPc9j4+cpX1HnXkRnyV9HMp0KK1Srpkuc7iimLDX1puMEQP08mC8fBI9n\tYW9JAMVmy55D2xtcOgqQPe6HUsAM8vFfk0y7dv7aV/MMc4tW+lyBddf4BHedDPabmHtog9\tlI9qQB8f5o78KJoJHi9jUfoibHrw7ePCi/XNi1KzfLhkkcvaEhOIg82JgyaTOVuLX4TTpy\t713VrUVQKemdE8AJBgxrUyI8AM/XZDRxF92tDNRD5k+rFxVwZnNg1KzovEUFiw==",
|
||||
"received": "from postfix-inbound-v2-3.inbound.mailchannels.net (inbound-egress-7.mailchannels.net [23.83.220.5])\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\t key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)\t(No client certificate requested)\tby pdx1-sub0-mail-mx201.dreamhost.com (Postfix) with ESMTPS id 4Yp0DP2WKvz6n5V\tfor <info@n3witalia.com>; Wed, 5 Feb 2025 04:39:33 -0800 (PST)",
|
||||
"message-id": "<CACo-EPti-vvs3198N-KKhAMnm70ppkmGJPkUz3Y483wxAv_z3g@mail.gmail.com>",
|
||||
"x-received": "by 2002:a05:6820:4ccb:b0:5fa:7e37:e42e with SMTP id 006d021491bc7-5fc479d7b7dmr1800193eaf.3.1738759166233; Wed, 05 Feb 2025 04:39:26 -0800 (PST)",
|
||||
"return-path": "<info@n3w.it>",
|
||||
"content-type": "multipart/alternative; boundary=\"000000000000742c2a062d646a8f\"",
|
||||
"delivered-to": "x21967472@pdx1-sub0-mail-mx201.dreamhost.com",
|
||||
"mime-version": "1.0",
|
||||
"received-spf": "none (dmarc-service-75b56dd9b6-qz8tf: n3w.it does not provide an SPF record) client-ip=209.85.161.50; envelope-from=info@n3w.it; helo=mail-oo1-f50.google.com;",
|
||||
"x-message-id": "YDPlyzG1R2Ky6usgMxqEJvf1",
|
||||
"x-gm-features": "AWEUYZl838uJdYn-9fUMGZvOqArNBONSW_VOkpWSkn1OYyR-HUtJL8UAJf2I33g",
|
||||
"x-original-to": "info@n3witalia.com",
|
||||
"dkim-signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=n3w-it.20230601.gappssmtp.com; s=20230601; t=1738759166; x=1739363966; darn=n3witalia.com; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=2N6Y8wbn3yS/TpkJr2ZQZ3rEEFMq1gc4mSHvPNXonAg=; b=eH1Dg2CwoWEuiif+VkxoPH8PcgiveMtY7urkbJAXXAEnpmkknbrSX7fLQ/pdfnV2YF RaDEVEFBYeYde7pra1NhNmQXQfamV6dxTZSoNOVj0DtdOuSZVYC4BQMMQiIk7emERgdx keDGBtYe2SifOK9QDK4deKKFPaswC7vATsPmBIAnN0MDahaOlsDPbm6aFSR39aK0qEpx MTylUSCNFx52cTYegrpzMGCRTrCxcHwvpq0gGZo1ol0mlq5WC4sa260qsVEQq566N1wh ICipbEhLdoX0nryrR67fJ+mq05kfg39gv++0p1aZl3/ahTdLTijPJswPs4phiTUj6fUH Z3Fg==",
|
||||
"x-gm-message-state": "AOJu0YwNwfJ1yYtAsu71S9Oy+BVSQqPDS1EJCni+CLWs7aDwxkFYjxsP\tX0A935B/tHpnOhgJuR8W5FwuKnXSFMZ/xP8TFQz8zBVGw7DYInyaC0lKAxPSbBsLDIFyVj2LYki\tR4sfj6a9YJDaWKE/HYPwbidCOfOV/mZvqJ2ESL5uJgSL0W4FrMJKmondc",
|
||||
"x-google-smtp-source": "AGHT+IFsZ2bQKEg+M9ddjCSDXjf2Okz49s6pteuNGyJAkFpjMLwhH4mshXYItB/GVj4r8fUIiAiACRT+QDfae1MMj48=",
|
||||
"arc-message-signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net;\ts=arc-2022; t=1738759167;\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\t to:to:cc:mime-version:mime-version:content-type:content-type:\t dkim-signature; bh=2N6Y8wbn3yS/TpkJr2ZQZ3rEEFMq1gc4mSHvPNXonAg=;\tb=xytHIe/PVvcfCsSYAhcVE9VlTvmbJcVbkpq0oKRt4H0M1VOfZZlsg5ILysJvwLAzrRO7SZ\tDUrh4bw57jqMpcE+Sk5AAcbgBMc6x1G+Wf/2nqnjy0hRCyqtajuUwtFOS3kDM7TKvFOU+/\tMFChI5mg97hb/0loj8DWQ+J24bu4a6YixGDglupW3JYJoDsPWje2oA+mYyiI5tsnRXFEwe\tpku9KlXkPburbm/ASqKbbi1Y9bEOa2vlRwLL3fFontmC+3kgogunW2fjf4YJlFlSaAj/Xb\tZXQiytNgKOJtkBQMvb0AmYMLgBbYdOBVzUkOUTQCP3Wzbuu0zslvl7cS3HkFIg==",
|
||||
"authentication-results": "inbound.mailchannels.net; spf=none smtp.mailfrom=info@n3w.it; dkim=temperror header.d=n3w-it.20230601.gappssmtp.com; dmarc=none; arc=none",
|
||||
"x-google-dkim-signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738759166; x=1739363966; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=2N6Y8wbn3yS/TpkJr2ZQZ3rEEFMq1gc4mSHvPNXonAg=; b=h+GPFjY1knf3xPd+R62zD7JNhs37K+F1qx+6EA3codzYY+yTXSJyTuETXOGVW5r2VK GOcntvGBdeijxte5RLmN6ZwLjvzePLlJLQVOnY8FICowUbwClQbDW1vXvucD+WaGpnBg O95TH/8jKWRBU34EZ9kAY5EqtauKSt675WyhVCmmT864BPbVV335d0t9RgJwV86rM9zy /miMTqpWeDJxDcX4thRlIk19GDc2Wh+5bqFD9kacOAur46RWdwqWaU7T8+5bQmbrKUg5 hqeO8ZDefVV6AyOjSnuLItHcHhlk1PaQ9uOumkRnFQfLUjS08bvLEnJyMA1YrEdo7mCi tD2Q==",
|
||||
"arc-authentication-results": "i=1;\tinbound-rspamd-8684fd6f95-jsctp;\tnone"
|
||||
},
|
||||
"textHtml": "<div dir=\"ltr\">mi chiamo Davide e sto scrivendo per richiedere alcune informazioni riguardanti il vostro negozio di tecnologia. Sto valutando diverse opzioni per [motivo della richiesta, ad esempio: acquistare un nuovo dispositivo, richiedere assistenza tecnica, o esplorare servizi aziendali] e sarei grato se poteste fornirmi alcuni dettagli utili.<br><br>In particolare, avrei bisogno di sapere:<br><br>Gli orari di apertura del vostro negozio, inclusi eventuali giorni di chiusura o orari ridotti durante i festivi.<br><br>Se offrite servizi di assistenza tecnica per dispositivi elettronici e, in caso affermativo, quali tipologie di dispositivi supportate (es. smartphone, computer, tablet).<br><br>Se disponete di un catalogo prodotti aggiornato o un sito web dove posso consultare lâofferta disponibile.<br><br>Se effettuate consegne a domicilio o se è possibile prenotare prodotti online per il ritiro in negozio.<br><br>Se offrite sconti o promozioni per studenti, aziende o clienti abituali.<br><br>Se organizzate eventi o workshop legati alla tecnologia, come corsi di formazione o presentazioni di nuovi prodotti.<br><br>Inoltre, sarei interessato a sapere se il vostro negozio aderisce a programmi di riciclo di dispositivi elettronici o se offrite servizi di smaltimento ecologico per apparecchiature obsolete.<br><br>Se possibile, gradirei ricevere anche informazioni sui metodi di pagamento accettati (es. carte di credito, PayPal, finanziamenti) e se è possibile richiedere un preventivo personalizzato per acquisti di grandi dimensioni.<br><br>Resto a disposizione per eventuali chiarimenti o per fornire ulteriori dettagli sulle mie esigenze. Vi ringrazio in anticipo per il tempo dedicato alla mia richiesta e attendo con interesse una vostra risposta.<br><br>Cordiali saluti,</div>\r\n",
|
||||
"textPlain": "mi chiamo Davide e sto scrivendo per richiedere alcune informazioni\r\nriguardanti il vostro negozio di tecnologia. Sto valutando diverse opzioni\r\nper [motivo della richiesta, ad esempio: acquistare un nuovo dispositivo,\r\nrichiedere assistenza tecnica, o esplorare servizi aziendali] e sarei grato\r\nse poteste fornirmi alcuni dettagli utili.\r\n\r\nIn particolare, avrei bisogno di sapere:\r\n\r\nGli orari di apertura del vostro negozio, inclusi eventuali giorni di\r\nchiusura o orari ridotti durante i festivi.\r\n\r\nSe offrite servizi di assistenza tecnica per dispositivi elettronici e, in\r\ncaso affermativo, quali tipologie di dispositivi supportate (es.\r\nsmartphone, computer, tablet).\r\n\r\nSe disponete di un catalogo prodotti aggiornato o un sito web dove posso\r\nconsultare lâofferta disponibile.\r\n\r\nSe effettuate consegne a domicilio o se è possibile prenotare prodotti\r\nonline per il ritiro in negozio.\r\n\r\nSe offrite sconti o promozioni per studenti, aziende o clienti abituali.\r\n\r\nSe organizzate eventi o workshop legati alla tecnologia, come corsi di\r\nformazione o presentazioni di nuovi prodotti.\r\n\r\nInoltre, sarei interessato a sapere se il vostro negozio aderisce a\r\nprogrammi di riciclo di dispositivi elettronici o se offrite servizi di\r\nsmaltimento ecologico per apparecchiature obsolete.\r\n\r\nSe possibile, gradirei ricevere anche informazioni sui metodi di pagamento\r\naccettati (es. carte di credito, PayPal, finanziamenti) e se è possibile\r\nrichiedere un preventivo personalizzato per acquisti di grandi dimensioni.\r\n\r\nResto a disposizione per eventuali chiarimenti o per fornire ulteriori\r\ndettagli sulle mie esigenze. Vi ringrazio in anticipo per il tempo dedicato\r\nalla mia richiesta e attendo con interesse una vostra risposta.\r\n\r\nCordiali saluti,\r\n"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Email Summarization Chain": [
|
||||
{
|
||||
"json": {
|
||||
"response": {
|
||||
"text": "Davide contatta il negozio di tecnologia per richiedere informazioni in merito a: orari di apertura (compresi festivi e chiusure), assistenza tecnica (specificando dispositivi supportati come smartphone, computer, tablet), disponibilità di catalogo aggiornato/sito web, opzioni di consegna a domicilio o ritiro in negozio, sconti per studenti/aziende/clienti abituali, eventi/workshop tematici, programmi di riciclo/smaltimento ecologico, metodi di pagamento accettati (carte, PayPal, finanziamenti) e preventivi personalizzati per acquisti consistenti. Si rende disponibile per ulteriori chiarimenti e ringrazia per la risposta. (99 parole)"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "eee08614-3096-477a-b462-859782a74188",
|
||||
"connections": {
|
||||
"OpenAI": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Write email",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"DeepSeek": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Review email",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Markdown": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Email Summarization Chain",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get folder": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Files",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"DeepSeek R1": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Email Summarization Chain",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Write email": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Review email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Review email": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Files": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Token Splitter": {
|
||||
"ai_textSplitter": [
|
||||
[
|
||||
{
|
||||
"node": "Default Data Loader",
|
||||
"type": "ai_textSplitter",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI 4-o-mini": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Email Classifier",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Email Classifier": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Write email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Do nothing",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI1": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store1",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Refresh collection": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get folder",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Default Data Loader": {
|
||||
"ai_document": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store1",
|
||||
"type": "ai_document",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Qdrant Vector Store": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Write email",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Email Trigger (IMAP)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Markdown",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Email Summarization Chain": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Email Classifier",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create collection",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Refresh collection",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
521
AI-Powered RAG Workflow For Stock Earnings Report Analysis.txt
Normal file
521
AI-Powered RAG Workflow For Stock Earnings Report Analysis.txt
Normal 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
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1115
AI-Powered Social Media Amplifier.txt
Normal file
1115
AI-Powered Social Media Amplifier.txt
Normal file
File diff suppressed because it is too large
Load Diff
1087
AI-powered WooCommerce Support-Agent.txt
Normal file
1087
AI-powered WooCommerce Support-Agent.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,504 @@
|
||||
{
|
||||
"id": "OuHrYOR3uWGmrhWQ",
|
||||
"meta": {
|
||||
"instanceId": "a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "AI Email processing autoresponder with approval (Yes/No)",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "06a098db-160b-45f7-aeac-a73ef868148e",
|
||||
"name": "Email Trigger (IMAP)",
|
||||
"type": "n8n-nodes-base.emailReadImap",
|
||||
"position": [
|
||||
-180,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"imap": {
|
||||
"id": "k31W9oGddl9pMDy4",
|
||||
"name": "IMAP info@n3witalia.com"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "9589443b-efb7-4e0d-bafc-0be9858a4755",
|
||||
"name": "Markdown",
|
||||
"type": "n8n-nodes-base.markdown",
|
||||
"position": [
|
||||
40,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"html": "={{ $json.textHtml }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8de7b2f3-bf75-4f3c-a1ee-eec047a7b82e",
|
||||
"name": "DeepSeek R1",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
240,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "deepseek/deepseek-r1:free",
|
||||
"cachedResultName": "deepseek/deepseek-r1:free"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "XJTqRiKFJpFs5MuX",
|
||||
"name": "OpenRouter account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "babf37dc-99ca-439a-b094-91c52799b8df",
|
||||
"name": "Send Email",
|
||||
"type": "n8n-nodes-base.emailSend",
|
||||
"position": [
|
||||
1840,
|
||||
-120
|
||||
],
|
||||
"webhookId": "f84fcde7-6aac-485a-9a08-96a35955af49",
|
||||
"parameters": {
|
||||
"html": "={{ $('Write email').item.json.output }}",
|
||||
"options": {},
|
||||
"subject": "=Re: {{ $('Email Trigger (IMAP)').item.json.subject }}",
|
||||
"toEmail": "={{ $('Email Trigger (IMAP)').item.json.from }}",
|
||||
"fromEmail": "={{ $('Email Trigger (IMAP)').item.json.to }}"
|
||||
},
|
||||
"credentials": {
|
||||
"smtp": {
|
||||
"id": "hRjP3XbDiIQqvi7x",
|
||||
"name": "SMTP info@n3witalia.com"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "ebeb986d-053a-420d-8482-ee00e75f2f10",
|
||||
"name": "Qdrant Vector Store",
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
|
||||
"position": [
|
||||
1180,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "retrieve-as-tool",
|
||||
"options": {},
|
||||
"toolName": "company_knowladge_base",
|
||||
"toolDescription": "Extracts information regarding the request made.",
|
||||
"qdrantCollection": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "=COLLECTION"
|
||||
},
|
||||
"includeDocumentMetadata": false
|
||||
},
|
||||
"credentials": {
|
||||
"qdrantApi": {
|
||||
"id": "iyQ6MQiVaF3VMBmt",
|
||||
"name": "QdrantApi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ccc3d026-bfa3-4fda-be0a-ef70bf831aa7",
|
||||
"name": "Embeddings OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"position": [
|
||||
1180,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "CDX6QM4gLYanh0P4",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "1726aac9-a77d-4f19-8c07-70b032c3abeb",
|
||||
"name": "Email Summarization Chain",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainSummarization",
|
||||
"position": [
|
||||
260,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"binaryDataKey": "={{ $json.data }}",
|
||||
"summarizationMethodAndPrompts": {
|
||||
"values": {
|
||||
"prompt": "=Write a concise summary of the following in max 100 words :\n\n\"{{ $json.data }}\"\n\nDo not enter the total number of words used.",
|
||||
"combineMapPrompt": "=Write a concise summary of the following in max 100 words:\n\n\"{{ $json.data }}\"\n\nDo not enter the total number of words used."
|
||||
}
|
||||
}
|
||||
},
|
||||
"operationMode": "nodeInputBinary"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "81b889d0-e724-4c1f-9ce3-7593c796aaaf",
|
||||
"name": "Write email",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
980,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Write the text to reply to the following email:\n\n{{ $('Email Summarization Chain').item.json.response.text }}",
|
||||
"options": {
|
||||
"systemMessage": "You are an expert at answering emails. You need to answer them professionally based on the information you have. This is a business email. Be concise and never exceed 100 words. Only the body of the email, not create the subject.\n\nIt must be in HTML format and you can insert (if you think it is appropriate) only HTML characters such as <br>, <b>, <i>, <p> where necessary."
|
||||
},
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "cf38e319-59b3-490e-b841-579afc9fbc02",
|
||||
"name": "OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
980,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini",
|
||||
"cachedResultName": "gpt-4o-mini"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "CDX6QM4gLYanh0P4",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "19842e5f-c372-4dfd-b860-87dc5f00b1af",
|
||||
"name": "Set Email",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
760,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "759dc0f9-f582-492c-896c-6426f8410127",
|
||||
"name": "email",
|
||||
"type": "string",
|
||||
"value": "={{ $json.response.text }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "2cf7a9af-c5e8-45dd-bda5-01c562a0defb",
|
||||
"name": "Approve?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
1560,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"ignoreCase": false
|
||||
},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "5c377c1c-43c6-45e7-904e-dbbe6b682686",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.data.approved }}",
|
||||
"rightValue": "true"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "08cabec6-9840-4214-8315-b877c86794bf",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-220,
|
||||
-680
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 580,
|
||||
"height": 420,
|
||||
"content": "# Main Flow\n\n## Preliminary step:\nCreate a vector database on Qdrant and tokenize the documents useful for generating a response\n\n\n## How it works\nThis workflow is designed to automate the process of handling incoming emails, summarizing their content, generating appropriate responses with RAG, and obtaining approval (YES/NO button) before sending replies.\n\nThis workflow is designed to handle general inquiries that come in via corporate email via IMAP and generate responses using RAG. You can quickly integrate Gmail and Outlook via the appropriate trigger nodes"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "80692c8f-e236-43ac-aad2-91bd90f40065",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-40,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"height": 240,
|
||||
"content": "Convert email to Markdown format for better understanding of LLM models"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e6957fde-bf05-4b67-aa0e-44c575fca04d",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
240,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"width": 320,
|
||||
"height": 240,
|
||||
"content": "Chain that summarizes the received email"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7cfba59f-83ce-4f0b-b54a-b2c11d58fd82",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
940,
|
||||
-180
|
||||
],
|
||||
"parameters": {
|
||||
"width": 340,
|
||||
"height": 240,
|
||||
"content": "Agent that retrieves business information from a vector database and processes the response"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "28c4bd00-6a47-422f-a50a-935f3724ba01",
|
||||
"name": "Send Draft",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
1340,
|
||||
-100
|
||||
],
|
||||
"webhookId": "d6dd2e7c-90ea-4b65-9c64-523d2541a054",
|
||||
"parameters": {
|
||||
"sendTo": "YOUR GMAIL ADDRESS",
|
||||
"message": "=<h3>MESSAGE</h3>\n{{ $('Email Trigger (IMAP)').item.json.textHtml }}\n\n<h3>AI RESPONSE</h3>\n{{ $json.output }}",
|
||||
"options": {},
|
||||
"subject": "=[Approval Required] {{ $('Email Trigger (IMAP)').item.json.subject }}",
|
||||
"operation": "sendAndWait",
|
||||
"approvalOptions": {
|
||||
"values": {
|
||||
"approvalType": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "nyuHvSX5HuqfMPlW",
|
||||
"name": "Gmail account (n3w.it)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "0aae1689-cee7-403a-8640-396db32eceed",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1300,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"height": 360,
|
||||
"content": "## IMPORTANT\n\nFor the \"Send Draft\" node, you need to send the draft email to a Gmail address because it is the only one that allows the \"Send and wait for response\" function."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "6f7b864e-1589-418c-960e-b832cf032d1b",
|
||||
"connections": {
|
||||
"OpenAI": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Write email",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Approve?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Set Email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Markdown": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Email Summarization Chain",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Email": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Write email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Send Draft": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Approve?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"DeepSeek R1": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Email Summarization Chain",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Write email": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Draft",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Qdrant Vector Store",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Qdrant Vector Store": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Write email",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Email Trigger (IMAP)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Markdown",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Email Summarization Chain": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
{
|
||||
"id": "mjCQV12PbF6fw8hR",
|
||||
"meta": {
|
||||
"instanceId": "021d3c82ba2d3bc090cbf4fc81c9312668bcc34297e022bb3438c5c88a43a5ff"
|
||||
},
|
||||
"name": "LangChain - Example - Workflow Retriever",
|
||||
"tags": [
|
||||
{
|
||||
"id": "snf16n0p2UrGP838",
|
||||
"name": "LangChain - Example",
|
||||
"createdAt": "2023-09-25T16:21:55.962Z",
|
||||
"updatedAt": "2023-09-25T16:21:55.962Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "efdc3050-6c68-4419-9f12-f37d6fefb276",
|
||||
"name": "When clicking \"Execute Workflow\"",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
460,
|
||||
200
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e0edb9ab-c59f-4d34-983d-861bb2df4f01",
|
||||
"name": "Workflow Retriever",
|
||||
"type": "@n8n/n8n-nodes-langchain.retrieverWorkflow",
|
||||
"position": [
|
||||
1120,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"workflowId": "QacfBRBnf1xOyckC"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ba47dd13-67d0-499a-b9a2-16928099efce",
|
||||
"name": "Retrieval QA Chain2",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainRetrievalQa",
|
||||
"position": [
|
||||
900,
|
||||
200
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f6d16571-0573-4860-aed9-611f93b050ad",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
800,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "4jRB4A20cPycBqP5",
|
||||
"name": "OpenAI account - n8n"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4fd00751-3db0-489b-8c7f-4ee0fb32fb51",
|
||||
"name": "Example Prompt",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
680,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "input",
|
||||
"stringValue": "What notes can you find for Jay Gatsby and what is his email address?"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "732b6277-cb4d-4586-ab95-778ac9473fe5",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
860,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"width": 363,
|
||||
"height": 211.90203341144422,
|
||||
"content": "### Q&A on data returned from a workflow"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f09583a3-78e3-4888-8251-2148ffb7ab18",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1040,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"width": 262.67019427016413,
|
||||
"height": 255.8330939602389,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nReplace \"Workflow ID\" with the ID the Subworkflow got saved as"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "48d3bdae-4cec-4b18-b92a-89215def0c68",
|
||||
"connections": {
|
||||
"Example Prompt": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Retrieval QA Chain2",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Retrieval QA Chain2",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Workflow Retriever": {
|
||||
"ai_retriever": [
|
||||
[
|
||||
{
|
||||
"node": "Retrieval QA Chain2",
|
||||
"type": "ai_retriever",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \"Execute Workflow\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Example Prompt",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
463
AI_ Summarize podcast episode and enhance using Wikipedia.txt
Normal file
463
AI_ Summarize podcast episode and enhance using Wikipedia.txt
Normal file
File diff suppressed because one or more lines are too long
0
ALL_unique_nodes.txt
Normal file
0
ALL_unique_nodes.txt
Normal file
3777
API Schema Extractor.txt
Normal file
3777
API Schema Extractor.txt
Normal file
File diff suppressed because it is too large
Load Diff
762
Actioning Your Meeting Next Steps using Transcripts and AI.txt
Normal file
762
Actioning Your Meeting Next Steps using Transcripts and AI.txt
Normal file
@@ -0,0 +1,762 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "26ba763460b97c249b82942b23b6384876dfeb9327513332e743c5f6219c2b8e"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "bec5c6c1-52d4-4665-b814-56a6bb82ea6b",
|
||||
"name": "OpenAI Chat Model1",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
800,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"temperature": 0
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d3e057d1-df44-4ac3-ac46-fc2b04e3de78",
|
||||
"name": "Get Meeting ConferenceRecords",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
20,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://meet.googleapis.com/v2/conferenceRecords",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"authentication": "predefinedCredentialType",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "filter",
|
||||
"value": "=space.meeting_code={{ $json.conferenceData.conferenceId }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "googleOAuth2Api"
|
||||
},
|
||||
"credentials": {
|
||||
"googleOAuth2Api": {
|
||||
"id": "kgVOfvlBIWTWXthG",
|
||||
"name": "Google Meets Oauth2 API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "831668fd-04ab-4144-bec0-c733902f2a13",
|
||||
"name": "Get Meeting Transcript Location",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
200,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://meet.googleapis.com/v2/{{ $json.conferenceRecords[0].name }}/transcripts",
|
||||
"options": {},
|
||||
"authentication": "predefinedCredentialType",
|
||||
"nodeCredentialType": "googleOAuth2Api"
|
||||
},
|
||||
"credentials": {
|
||||
"googleOAuth2Api": {
|
||||
"id": "kgVOfvlBIWTWXthG",
|
||||
"name": "Google Meets Oauth2 API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "0a1c3386-1456-4abd-a67c-4f2084efb1f1",
|
||||
"name": "Get Transcript File",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
380,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"fileId": {
|
||||
"__rl": true,
|
||||
"mode": "url",
|
||||
"value": "={{ $json.docsDestination.document }}"
|
||||
},
|
||||
"options": {
|
||||
"googleFileConversion": {
|
||||
"conversion": {
|
||||
"docsToFormat": "application/pdf"
|
||||
}
|
||||
}
|
||||
},
|
||||
"operation": "download"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "yOwz41gMQclOadgu",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "40d1e969-3a04-4fb0-98c3-59865f317e07",
|
||||
"name": "When clicking \"Test workflow\"",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-480,
|
||||
540
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1d277cc0-9f51-43a2-9d17-17d535b4dd53",
|
||||
"name": "PDF Loader",
|
||||
"type": "n8n-nodes-base.extractFromFile",
|
||||
"position": [
|
||||
660,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"operation": "pdf"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "08b2d0ce-0f59-45d8-b010-53910a1bc746",
|
||||
"name": "Get Calendar Event",
|
||||
"type": "n8n-nodes-base.googleCalendar",
|
||||
"position": [
|
||||
-280,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"eventId": "abc123",
|
||||
"options": {},
|
||||
"calendar": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "c_5792bdf04bc395cbcbc6f7b754268245a33779d36640cc80a357711aa2f09a0a@group.calendar.google.com",
|
||||
"cachedResultName": "n8n-events"
|
||||
},
|
||||
"operation": "get"
|
||||
},
|
||||
"credentials": {
|
||||
"googleCalendarOAuth2Api": {
|
||||
"id": "kWMxmDbMDDJoYFVK",
|
||||
"name": "Google Calendar account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "35a68444-15da-4b6e-a3c8-d296971b0fc0",
|
||||
"name": "Structured Output Parser",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"position": [
|
||||
1040,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"jsonSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"summary\": { \"type\": \"string\" },\n \"highlights\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"attendee\": { \"type\": \"string\" },\n \"message\": { \"type\": \"string\" }\n }\n }\n },\n \"next_steps\": {\n \"type\": \"array\",\n \"items:\": {\n \"type\": \"string\"\n }\n },\n \"meetings_created\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"event_title\": { \"type\": \"string\" },\n \"event_invite_url\": { \"type\" : \"string\" }\n }\n }\n }\n }\n}"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "e73ab051-1763-4130-bf44-f1461886e5f4",
|
||||
"name": "Execute Workflow Trigger",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
640,
|
||||
1200
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c940c9e1-8236-45b8-bdb2-39a326004680",
|
||||
"name": "Response",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1780,
|
||||
1080
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "3c12dc11-0ff3-4c6a-9d67-1454d7b0d16d",
|
||||
"name": "response",
|
||||
"type": "string",
|
||||
"value": "={{ JSON.stringify($('Create Calendar Event1').item.json) }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "daa3e96f-bcc1-4f99-a050-c09189041ce5",
|
||||
"name": "Edit Fields",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
800,
|
||||
1200
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "7263764b-8409-4cea-8db3-3278dd7ef9d8",
|
||||
"name": "=route",
|
||||
"type": "string",
|
||||
"value": "={{ $json.route }}"
|
||||
},
|
||||
{
|
||||
"id": "55c3b207-2e98-4137-8413-f72cbff17986",
|
||||
"name": "query",
|
||||
"type": "object",
|
||||
"value": "={{ $json.query.parseJson() }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "4e492c9f-6be3-4b7c-a8f7-e18dd94cd158",
|
||||
"name": "Fallback Response",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
960,
|
||||
1340
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "raw",
|
||||
"options": {},
|
||||
"jsonOutput": "{\n \"response\": {\n \"ok\": false,\n \"error\": \"The requested tool was not found or the service may be unavailable. Do not retry.\"\n }\n}\n"
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "7af68b6d-75ef-4332-8193-eb810179ec90",
|
||||
"name": "Actions Router",
|
||||
"type": "n8n-nodes-base.switch",
|
||||
"position": [
|
||||
960,
|
||||
1200
|
||||
],
|
||||
"parameters": {
|
||||
"rules": {
|
||||
"values": [
|
||||
{
|
||||
"outputKey": "meetings.create",
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "equals"
|
||||
},
|
||||
"leftValue": "={{ $json.route }}",
|
||||
"rightValue": "meetings.create"
|
||||
}
|
||||
]
|
||||
},
|
||||
"renameOutput": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {
|
||||
"fallbackOutput": "extra"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "8cc6b737-2867-4fca-93d1-8973f14a9f00",
|
||||
"name": "Get Attendees",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1440,
|
||||
1080
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "521823f4-cee1-4f69-82e7-cea9be0dbc41",
|
||||
"name": "attendees",
|
||||
"type": "array",
|
||||
"value": "={{ $('Actions Router').item.json.query.attendees }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "1b3bb8f7-3775-48be-8b73-5c9f0db37ebf",
|
||||
"name": "Attendees List",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
1444,
|
||||
1212
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "attendees"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c285a0fa-4b0b-4775-83bb-5acb597dd9a8",
|
||||
"name": "Add Attendee to Invite",
|
||||
"type": "n8n-nodes-base.googleCalendar",
|
||||
"position": [
|
||||
1620,
|
||||
1080
|
||||
],
|
||||
"parameters": {
|
||||
"eventId": "={{ $('Create Calendar Event1').item.json.id }}",
|
||||
"calendar": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "c_5792bdf04bc395cbcbc6f7b754268245a33779d36640cc80a357711aa2f09a0a@group.calendar.google.com",
|
||||
"cachedResultName": "n8n-events"
|
||||
},
|
||||
"operation": "update",
|
||||
"updateFields": {
|
||||
"attendees": [
|
||||
"={{ $json.name }} <{{ $json.email }}>"
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleCalendarOAuth2Api": {
|
||||
"id": "kWMxmDbMDDJoYFVK",
|
||||
"name": "Google Calendar account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "006c2b05-4526-4e7d-b303-0cd72b36b9e8",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1180,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 756.2929032891963,
|
||||
"height": 445.79624302689535,
|
||||
"content": "## 4. This Tool Creates Calendar Events\nThis tool, given event details and a list of attendees, will create a new Google calendar event and add the attendees to it."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "512dfd7d-ba06-48e5-b97f-3dfbbfb0023f",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-56.39068896608171,
|
||||
391.01655789481134
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 586.8663941671947,
|
||||
"height": 405.6964113279832,
|
||||
"content": "## 1. Retrieve Meeting Transcript\n[Read more about working with HTTP node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest)\n\nThere's no built-in support for Google Meets transcript API however, we can solve this problem with the HTTP node. Note you may also need to setup a separate Google OAuth API Credential to obtain the required scopes."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "91c5b898-b491-4359-90b4-2b7458cc03c8",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
560,
|
||||
323.25204909069373
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 681.4281346810014,
|
||||
"height": 588.2833041602365,
|
||||
"content": "## 2. Let AI Agent Carry Out Follow-Up Actions\n[Read more about working with AI Agents](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent)\n\nThe big difference between Basic LLM chains and AI Agents is that AI agents are given the automony to perform actions. Provided the right tool exists, AI Agents can send emails, book flights and even order pizza! Here we're leaving it up to our agent to book any follow-up meetings after the call and invite all interested parties."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7df4412d-b82b-4623-8ff5-89f3bd9356d8",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
560,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 591.4907024073684,
|
||||
"height": 579.2725119898125,
|
||||
"content": "## 3: Using the Custom Workflow Tool\n[Read more about Workflow Triggers](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executeworkflowtrigger)\n\nOne common implementation of tool use is to set them up as workflows which are intended triggered via other workflows. With this, we can either build a tool per workflow or for efficiency, take an API approach where multiple tools can exist behind a router (in this case our \"switch\" node).\n\nOur AI agent will therefore only passing through the parameters of the request and won't have to learn/know how to intereact directly with the tools and services."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "06b0b3ae-344a-4150-9fa1-bdbcfe80b000",
|
||||
"name": "Create Calendar Event1",
|
||||
"type": "n8n-nodes-base.googleCalendar",
|
||||
"position": [
|
||||
1240,
|
||||
1080
|
||||
],
|
||||
"parameters": {
|
||||
"end": "={{ $json.query.end_date }} {{ $json.query.end_time }}",
|
||||
"start": "={{ $json.query.start_date }} {{ $json.query.start_time }}",
|
||||
"calendar": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "c_5792bdf04bc395cbcbc6f7b754268245a33779d36640cc80a357711aa2f09a0a@group.calendar.google.com",
|
||||
"cachedResultName": "n8n-events"
|
||||
},
|
||||
"additionalFields": {
|
||||
"summary": "={{ $json.query.title }}",
|
||||
"attendees": [],
|
||||
"description": "={{ $json.query.description }}"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleCalendarOAuth2Api": {
|
||||
"id": "kWMxmDbMDDJoYFVK",
|
||||
"name": "Google Calendar account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "2e2eec66-a737-48b9-b1ab-264182163dae",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-940,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"width": 359.6648027457353,
|
||||
"height": 385.336571355038,
|
||||
"content": "## Try It Out!\n### This workflow does the following:\n* Retrieves a meeting transcript\n* Sends transcript to an AI Agent to parse and carry out follow up actions if necessary.\n* If transcript mentions a follow up meeting is required, the AI Agent will call a tool to create the meeting.\n* Additionally if able, the AI Agent will also assign attendees it thinks should attend the meeting. \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": "3833bb1c-1145-4abd-a371-bce4c0543fb6",
|
||||
"name": "Schedule Meeting",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
|
||||
"position": [
|
||||
920,
|
||||
740
|
||||
],
|
||||
"parameters": {
|
||||
"name": "create_calendar_event",
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "route",
|
||||
"stringValue": "meetings.create"
|
||||
}
|
||||
]
|
||||
},
|
||||
"workflowId": "={{ $workflow.id }}",
|
||||
"description": "Call this tool to create an calendar event. This tool requires the following object request body.\n```\n{\n \"type\": \"object\",\n \"properties\": {\n \"title\": { \"type\": \"string\" },\n \"description\": { \"type\": \"string\" },\n \"start_date\": { \"type\": \"string\" },\n \"start_time\": { \"type\": \"string\" },\n \"end_date\": { \"type\": \"string\" },\n \"end_time\": { \"type\": \"string\" },\n \"attendees\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" }\n }\n }\n }\n }\n}\n```\nNote that dates are in the format yyyy-MM-dd and times are in the format HH:mm:ss."
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "ac955f91-9aa1-4ce8-9a5a-740c4d48dd18",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
820,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=system: your role is to help people get the most out of their meetings. You achieve this by helpfully summarising the meeting transcript to pull out useful information and key points of interest and delivery this in note form. You also help carry out any follow-up actions on behalf of the meeting attendees.\n1. Summarise the meeting and highlight any key goals of the meeting.\n2. Identify and list important points mentioned by each attendee. If non-applicable for an attendee, skip and proceed to the next attendee.\n3. Identify and list all next steps agreed by the attendees. If there are none, make a maximum of 3 suggestions based on the transcript instead. Please list the steps even if they've already been actioned.\n4. identify and perform follow-up actions based on a transcript of a meeting. These actions which are allowed are: creating follow-up calendar events if suggested by the attendees.\n\nThe meeting details were as follows:\n* The creator of the meeting was {{ $('Get Calendar Event').item.json[\"creator\"][\"displayName\"] }} <{{ $('Get Calendar Event').item.json[\"creator\"][\"email\"]}}>\n* The attendees were {{ $('Get Calendar Event').item.json[\"attendees\"].map(attendee => `${attendee.display_name} <${attendee.email}>`).join(', ') }}\n* The meeting was scheduled for {{ $('Get Calendar Event').item.json[\"start\"][\"dateTime\"] }}\n\nThe meeting transcript as follows:\n```\n{{ $json[\"text\"] }}\n```",
|
||||
"agent": "openAiFunctionsAgent",
|
||||
"options": {},
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.5
|
||||
},
|
||||
{
|
||||
"id": "b6d24f80-9f47-4c54-b84e-23d5de76f027",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-560,
|
||||
303.2560786071914
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 464.50696860436165,
|
||||
"height": 446.9122178333584,
|
||||
"content": "## 1. Get Calendar Event\n[Read more about working with Google Calendar](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlecalendar)\n\nIn this demo, we've decided to go with google meet as transcripts are stored in the user google drive. First, we'll need to get the calendar event of which the google meet was attached.\nIf the meet was not arranged through Google calendar, you may need to skip this step and just reference the transcripts in google drive directly."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b28e2c8f-7a4e-4ae8-b298-9a78747b81e5",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-320,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"width": 184.0677386144551,
|
||||
"height": 299.3566512487305,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n🚨**Required**\n* Set your calendar event ID here."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5ffb49d4-6bfd-420e-9c0f-ed73a955bd46",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
180,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 349.91944442094535,
|
||||
"height": 80,
|
||||
"content": "### 💡 Can't find your transcript?\nOnly meetings which own and were recorded and had transcription enabled will be available.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "241ccec3-d8a0-4ca6-9267-31fe6f27aed6",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1200,
|
||||
1060
|
||||
],
|
||||
"parameters": {
|
||||
"width": 184.0677386144551,
|
||||
"height": 299.3566512487305,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n🚨**Required**\n* Set your calendar ID here."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"PDF Loader": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Edit Fields": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Actions Router",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Attendees": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Attendees List",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Actions Router": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Calendar Event1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Fallback Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Attendees List": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Add Attendee to Invite",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Meeting": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Calendar Event": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Meeting ConferenceRecords",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model1": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Transcript File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "PDF Loader",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Add Attendee to Invite": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Calendar Event1": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Attendees",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute Workflow Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Edit Fields",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Structured Output Parser": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Meeting ConferenceRecords": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Meeting Transcript Location",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \"Test workflow\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Calendar Event",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Meeting Transcript Location": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Transcript File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
179
Add positive feedback messages to a table in Notion.txt
Normal file
179
Add positive feedback messages to a table in Notion.txt
Normal file
@@ -0,0 +1,179 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Typeform Trigger",
|
||||
"type": "n8n-nodes-base.typeformTrigger",
|
||||
"position": [
|
||||
0,
|
||||
400
|
||||
],
|
||||
"webhookId": "ad8a87ef-d293-4e48-8d36-838d69ebce0f",
|
||||
"parameters": {
|
||||
"formId": "fBYjtY5e"
|
||||
},
|
||||
"credentials": {
|
||||
"typeformApi": ""
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Google Cloud Natural Language",
|
||||
"type": "n8n-nodes-base.googleCloudNaturalLanguage",
|
||||
"position": [
|
||||
200,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"content": "={{$json[\"Any suggestions for us? \"]}}",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"googleCloudNaturalLanguageOAuth2Api": ""
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "IF",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
400,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"number": [
|
||||
{
|
||||
"value1": "={{$node[\"Google Cloud Natural Language\"].json[\"documentSentiment\"][\"score\"]}}",
|
||||
"operation": "larger"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Notion",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"position": [
|
||||
600,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"resource": "databasePage",
|
||||
"databaseId": "b7d1130a-3756-4bb3-aa56-0c77bf416437",
|
||||
"propertiesUi": {
|
||||
"propertyValues": [
|
||||
{
|
||||
"key": "Name|title",
|
||||
"title": "={{$node[\"Typeform Trigger\"].json[\"Name\"]}}"
|
||||
},
|
||||
{
|
||||
"key": "Feedback|rich_text",
|
||||
"textContent": "={{$node[\"Typeform Trigger\"].json[\"Any suggestions for us? \"]}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"notionApi": ""
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Slack",
|
||||
"type": "n8n-nodes-base.slack",
|
||||
"position": [
|
||||
800,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"channel": "general",
|
||||
"blocksUi": {
|
||||
"blocksValues": []
|
||||
},
|
||||
"attachments": [
|
||||
{
|
||||
"text": "={{$node[\"Typeform Trigger\"].json[\"Any suggestions for us? \"]}}",
|
||||
"title": "={{$node[\"Typeform Trigger\"].json[\"Name\"]}} {{$node[\"Google Cloud Natural Language\"].json[\"documentSentiment\"][\"score\"]}}"
|
||||
}
|
||||
],
|
||||
"otherOptions": {}
|
||||
},
|
||||
"credentials": {
|
||||
"slackApi": ""
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Trello",
|
||||
"type": "n8n-nodes-base.trello",
|
||||
"position": [
|
||||
600,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"name": "=Score: {{$json[\"documentSentiment\"][\"score\"]}}",
|
||||
"listId": "5fbb9e2eb1d5cc0a8a7ab8ac",
|
||||
"description": "=Score: {{$json[\"documentSentiment\"][\"score\"]}}\nFeedback: {{$node[\"Typeform Trigger\"].json[\"Any suggestions for us? \"]}}\nUser: {{$node[\"Typeform Trigger\"].json[\"Name\"]}}",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"trelloApi": ""
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"IF": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Notion",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Trello",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Notion": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Slack",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Typeform Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Cloud Natural Language",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Cloud Natural Language": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "IF",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
927
Advanced AI Demo (Presented at AI Developers #14 meetup).txt
Normal file
927
Advanced AI Demo (Presented at AI Developers #14 meetup).txt
Normal file
@@ -0,0 +1,927 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "84ba6d895254e080ac2b4916d987aa66b000f88d4d919a6b9c76848f9b8a7616",
|
||||
"templateId": "2358"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "fb774d11-da48-4481-ad4e-8c93274f123e",
|
||||
"name": "Send message",
|
||||
"type": "n8n-nodes-base.slack",
|
||||
"position": [
|
||||
2340,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Data from webhook: {{ $json.query.email }}",
|
||||
"select": "channel",
|
||||
"channelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "C079GL6K3U6",
|
||||
"cachedResultName": "general"
|
||||
},
|
||||
"otherOptions": {},
|
||||
"authentication": "oAuth2"
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "5a3ad8f1-eba7-4076-80fc-0c1237aab50b",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
380,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1163.3132111854613,
|
||||
"height": 677.0358687053997,
|
||||
"content": ""
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "01c59396-0fef-4d1c-aa1f-787669300650",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1860,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 437,
|
||||
"height": 99,
|
||||
"content": "# What is n8n?\n### Low-code Automation Platform for technical teams"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0bdd4a35-7f5c-443c-a14a-4e6f7ed18712",
|
||||
"name": "Execute JavaScript",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
2340,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nfor (const item of $input.all()) {\n item.json.myNewField = 1;\n}\n\nreturn $input.all();"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "4b1b6cc1-1a9f-4a0c-96d5-fd179c84c79d",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
4440,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 318,
|
||||
"height": 106,
|
||||
"content": "# Example #2\n### RAG with PDF as source"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7e9e7802-5695-4240-83b9-d6f02192ad2b",
|
||||
"name": "Recursive Character Text Splitter",
|
||||
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
|
||||
"position": [
|
||||
5120,
|
||||
1000
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"chunkSize": 3000,
|
||||
"chunkOverlap": 200
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "63783c21-af6d-4e70-8dec-c861641c53fb",
|
||||
"name": "Embeddings OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"position": [
|
||||
4880,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5742ce9c-2f73-4129-85eb-876f562cf6b1",
|
||||
"name": "Default Data Loader",
|
||||
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
|
||||
"position": [
|
||||
5100,
|
||||
820
|
||||
],
|
||||
"parameters": {
|
||||
"loader": "pdfLoader",
|
||||
"options": {
|
||||
"metadata": {
|
||||
"metadataValues": [
|
||||
{
|
||||
"name": "document-title",
|
||||
"value": "={{ $('PDFs to download').item.json.whitepaper_title }}"
|
||||
},
|
||||
{
|
||||
"name": "document-publish-year",
|
||||
"value": "={{ $('PDFs to download').item.json.publish_year }}"
|
||||
},
|
||||
{
|
||||
"name": "document-author",
|
||||
"value": "={{ $('PDFs to download').item.json.author }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"dataType": "binary"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "686c63fa-4672-4107-bd58-ffbb0650b44b",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
5840,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o",
|
||||
"options": {
|
||||
"temperature": 0.3
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "73a7df02-aa2c-4f0f-aa88-38cbbbf3b1cb",
|
||||
"name": "Embeddings OpenAI2",
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"position": [
|
||||
5980,
|
||||
1140
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "42737305-fd39-4ec7-b4ba-53f70085dd5f",
|
||||
"name": "Vector Store Retriever",
|
||||
"type": "@n8n/n8n-nodes-langchain.retrieverVectorStore",
|
||||
"position": [
|
||||
6040,
|
||||
840
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2c7a3666-e123-439d-8b74-41eb375f066c",
|
||||
"name": "Download PDF",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
4700,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.file_url }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "866eaeb9-6a7c-4209-b485-8ef13ed006b4",
|
||||
"name": "PDFs to download",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"notes": "BTC Whitepaper + metadata",
|
||||
"position": [
|
||||
4440,
|
||||
600
|
||||
],
|
||||
"parameters": {},
|
||||
"notesInFlow": true,
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e78f2191-096c-4575-9d48-fb891fd18698",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
4440,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 414.36616595939887,
|
||||
"height": 91.0723900084547,
|
||||
"content": "## A. Load PDF into Pinecone\nDownload the PDF, then text embeddings into Pincecone"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7c3ccf27-32b1-4ea7-b2ef-6997793de733",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
5600,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 284.62109466374466,
|
||||
"height": 86.95121951219511,
|
||||
"content": "## B. Chat with PDF\nUse GPT4o to chat with Pinecone index"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6063d009-da6e-4cbf-899f-c86b879931a7",
|
||||
"name": "Read Pinecone Vector Store",
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
|
||||
"position": [
|
||||
5980,
|
||||
980
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"pineconeNamespace": "whitepaper"
|
||||
},
|
||||
"pineconeIndex": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "whitepapers",
|
||||
"cachedResultName": "whitepapers"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8aa52156-264d-4911-993c-ac5117a76b21",
|
||||
"name": "Question and Answer Chain",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainRetrievalQa",
|
||||
"position": [
|
||||
5840,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.chatInput }}. \nOnly use vector store knowledge to answer the question. Don't make anything up. If you don't know the answer, tell the user that you don't know.",
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "b394ee1d-a2ca-4db0-8caa-981f8f066787",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
7380,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 504.25,
|
||||
"height": 106,
|
||||
"content": "# Example #3\n### AI Assistant that knows how to use predefined API endpoints "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "37a8b8f2-c444-4c6e-9b02-b97a5c616e84",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3020,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 318,
|
||||
"height": 111,
|
||||
"content": "# Example #1\n### Categorize incoming emails with AI"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "07123e8e-8760-4c89-acda-aaef6de68be2",
|
||||
"name": "Anthropic Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
|
||||
"position": [
|
||||
7580,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"temperature": 0.4
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "e338a175-e823-4cd4-b77d-f5acbfcbdb9d",
|
||||
"name": "Get calendar availability",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
|
||||
"position": [
|
||||
7900,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://www.googleapis.com/calendar/v3/freeBusy",
|
||||
"method": "POST",
|
||||
"jsonBody": "={\n \"timeMin\": \"{timeMin}\",\n \"timeMax\": \"{timeMax}\",\n \"timeZone\": \"Europe/Berlin\",\n \"groupExpansionMax\": 20,\n \"calendarExpansionMax\": 10,\n \"items\": [\n {\n \"id\": \"max@n8n.io\"\n }\n ]\n}",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"toolDescription": "Call this tool to get the appointment availability for a particular period on the calendar. The tool may refer to availability as \"Free\" or \"Busy\". \n\nUse {timeMin} and {timeMax} to specify the window for the availability query. For example, to get availability for 25 July, 2024 the {timeMin} would be 2024-07-25T09:00:00+02:00 and {timeMax} would be 2024-07-25T17:00:00+02:00.\n\nIf the tool returns an empty response, it means that something went wrong. It does not mean that there is no availability.",
|
||||
"nodeCredentialType": "googleCalendarOAuth2Api"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ae05933c-dfa9-4272-b610-8b5fc94d76fe",
|
||||
"name": "Appointment booking agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
7680,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"systemMessage": "=You are an efficient and courteous assistant tasked with scheduling appointments with Max Tkacz.\n\nWhen users mention an appointment or meeting, they are referring to a meeting with Max.\nWhen users refer to the calendar or \"your schedule,\" they are referring to Max's calendar. \n\nYou can use various tools to access and manage Max's calendar. Your primary goal is to assist users in successfully booking an appointment with Max, ensuring no scheduling conflicts. Only book an appointment if the requested time slot is available (the tool may refer to this as \"Free\")\n\nToday's date is {{ $today.format('dd LLL yyyy') }}.\nAppointments are always 30 minutes in length. \n\n\nProvide accurate information at all times. If the tools are not functioning correctly, inform the user that you are unable to assist them at the moment.\n"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
},
|
||||
{
|
||||
"id": "7e3b1797-150e-4c7c-93a5-306b981e0b6c",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
8300,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 327.46658341463433,
|
||||
"height": 571.8601927804875,
|
||||
"content": "\n[Open Calendar](https://calendar.google.com/calendar/u/0/r/day/2024/7/26)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "afe8d14d-d0d0-4a11-bb4f-57358de66bc1",
|
||||
"name": "Window Buffer Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
7720,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"contextWindowLength": 10
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "53d131ea-3235-4e4e-828b-dc22c9021e50",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
6380,
|
||||
640
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 615.2162978341456,
|
||||
"height": 403.1877919219511,
|
||||
"content": "\nBTC Whitepaper references"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "55a0f180-bb35-4b35-b72c-b9361698e5ad",
|
||||
"name": "Sticky Note9",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
9660,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 345.33741540309194,
|
||||
"height": 398.9629539487597,
|
||||
"content": "### Connect with me or explore this demo 👇\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "14b3231d-aa96-4783-be8f-cb2f70b0bc7f",
|
||||
"name": "Sticky Note10",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
9220,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 411.2946586626259,
|
||||
"height": 197.19036476628202,
|
||||
"content": "# Thank you and happy flowgramming 🤘\n\n### Max Tkacz | Senior Developer Advocate @ n8n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c9a2fcdc-c8ab-4b9d-9979-4fd7cca1e8a8",
|
||||
"name": "Insert into Pinecone vector store",
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
|
||||
"position": [
|
||||
4920,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "insert",
|
||||
"options": {
|
||||
"clearNamespace": true,
|
||||
"pineconeNamespace": "whitepaper"
|
||||
},
|
||||
"pineconeIndex": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "whitepapers",
|
||||
"cachedResultName": "whitepapers"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6a890c74-67f9-4eee-bb56-7c9a68921ae1",
|
||||
"name": "Book appointment",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
|
||||
"position": [
|
||||
8060,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://www.googleapis.com/calendar/v3/calendars/max@n8n.io/events",
|
||||
"method": "POST",
|
||||
"jsonBody": "={\n \"summary\": \"Appointment with {userName}\",\n \"start\": {\n \"dateTime\": \"{startTime}\",\n \"timeZone\": \"Europe/Berlin\"\n },\n \"end\": {\n \"dateTime\": \"{endTime}\",\n \"timeZone\": \"Europe/Berlin\"\n },\n \"attendees\": [\n {\"email\": \"max@n8n.io\"},\n {\"email\": \"{userEmail}\"}\n ]\n}",
|
||||
"sendBody": true,
|
||||
"specifyBody": "json",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"toolDescription": "Call this tool to book an appointment in the calendar. ",
|
||||
"nodeCredentialType": "googleCalendarOAuth2Api",
|
||||
"placeholderDefinitions": {
|
||||
"values": [
|
||||
{
|
||||
"name": "userName",
|
||||
"description": "The full name of the user making the appointment. Like John Doe"
|
||||
},
|
||||
{
|
||||
"name": "startTime",
|
||||
"description": "The start time of the event in Europe/Berlin timezone. For example, 2024-07-24T10:00:00+02:00"
|
||||
},
|
||||
{
|
||||
"name": "endTime",
|
||||
"description": "The end time of the event in Europe/Berlin timezone. It should always be 30 minutes after the startTime. "
|
||||
},
|
||||
{
|
||||
"name": "userEmail",
|
||||
"description": "The email address of the user making the appointment"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7f6e62f2-2d72-4fd2-a6ef-e57028d0055b",
|
||||
"name": "When chat message received",
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"position": [
|
||||
5600,
|
||||
620
|
||||
],
|
||||
"webhookId": "c348693e-9c43-4bf2-90a5-23786273e809",
|
||||
"parameters": {
|
||||
"public": true,
|
||||
"options": {
|
||||
"title": "Book an appointment with Max"
|
||||
},
|
||||
"initialMessages": "Hi there! 👋\nI can help you schedule an appointment with Max Tkacz. On which day would you like to meet?"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "52c65975-479d-4c76-bcd3-23f5c9bb6acf",
|
||||
"name": "Sticky Note11",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
9220,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 411.2946586626259,
|
||||
"height": 80,
|
||||
"content": "### Explore 100+ AI Workflow templates on n8n.io\n[Open Templates Library](https://n8n.io/workflows)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ba0635c0-2ca4-4b27-b960-3a0e0f93a56a",
|
||||
"name": "Sticky Note12",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
9220,
|
||||
560
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 411.2946586626259,
|
||||
"height": 80,
|
||||
"content": "### Ask a question in our community (13k+ members)\n[Explore n8n community](https://community.n8n.io/)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "29227c52-a9cc-4bd1-b1a3-78fb805b659c",
|
||||
"name": "OpenAI Chat Model1",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
3260,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o",
|
||||
"options": {
|
||||
"temperature": 0.5
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "494a2868-9ff5-402c-b83b-6dd2c3ddbcc9",
|
||||
"name": "Add automation label",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
3760,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"labelIds": [
|
||||
"Label_4763053241338138112"
|
||||
],
|
||||
"messageId": "={{ $json.id }}",
|
||||
"operation": "addLabels"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "0f9d834d-ec47-43f5-945b-8c464d371122",
|
||||
"name": "On new email to nathan's inbox",
|
||||
"type": "n8n-nodes-base.gmailTrigger",
|
||||
"disabled": true,
|
||||
"position": [
|
||||
3040,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"simple": false,
|
||||
"filters": {},
|
||||
"options": {},
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyMinute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "142e2a49-40bd-4bf5-9ba3-f14ecd68618e",
|
||||
"name": "Add music label",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
3760,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"labelIds": [
|
||||
"Label_6822395192337188416"
|
||||
],
|
||||
"messageId": "={{ $json.id }}",
|
||||
"operation": "addLabels"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "2eb46753-a0e8-43ec-a460-466b1dd265c9",
|
||||
"name": "Assign label with AI",
|
||||
"type": "@n8n/n8n-nodes-langchain.textClassifier",
|
||||
"position": [
|
||||
3280,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"inputText": "={{ $json.text }}",
|
||||
"categories": {
|
||||
"categories": [
|
||||
{
|
||||
"category": "automation",
|
||||
"description": "email on the topic of automation or workflows and automated processes, includes newsletters on this topic"
|
||||
},
|
||||
{
|
||||
"category": "music",
|
||||
"description": "email on the topic of music, for example from an artist "
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "576d8206-1b1e-4671-ba45-86e9d844a73b",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
1860,
|
||||
460
|
||||
],
|
||||
"webhookId": "74facfd7-0f51-4605-9724-2c300594fcf9",
|
||||
"parameters": {
|
||||
"path": "74facfd7-0f51-4605-9724-2c300594fcf9",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "1e612376-1a3b-4c48-9cd3-97867ba4cad5",
|
||||
"name": "Whether email contains n8n",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
2060,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "a0b16c44-03ea-4e96-9671-7b168697186d",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "contains"
|
||||
},
|
||||
"leftValue": "={{ $json.query.email }}",
|
||||
"rightValue": "@n8n"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Whether email contains n8n",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download PDF": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Insert into Pinecone vector store",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Book appointment": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Appointment booking agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"PDFs to download": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download PDF",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Insert into Pinecone vector store",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Question and Answer Chain",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI2": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Read Pinecone Vector Store",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model1": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Assign label with AI",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Default Data Loader": {
|
||||
"ai_document": [
|
||||
[
|
||||
{
|
||||
"node": "Insert into Pinecone vector store",
|
||||
"type": "ai_document",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Anthropic Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Appointment booking agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Assign label with AI": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Add automation label",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Add music label",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "Appointment booking agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Vector Store Retriever": {
|
||||
"ai_retriever": [
|
||||
[
|
||||
{
|
||||
"node": "Question and Answer Chain",
|
||||
"type": "ai_retriever",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get calendar availability": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Appointment booking agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Read Pinecone Vector Store": {
|
||||
"ai_vectorStore": [
|
||||
[
|
||||
{
|
||||
"node": "Vector Store Retriever",
|
||||
"type": "ai_vectorStore",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When chat message received": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Question and Answer Chain",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Whether email contains n8n": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Execute JavaScript",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Send message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"On new email to nathan's inbox": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Assign label with AI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Recursive Character Text Splitter": {
|
||||
"ai_textSplitter": [
|
||||
[
|
||||
{
|
||||
"node": "Default Data Loader",
|
||||
"type": "ai_textSplitter",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
{
|
||||
"id": "U8EOTtZvmZPMYc6m",
|
||||
"meta": {
|
||||
"instanceId": "fb924c73af8f703905bc09c9ee8076f48c17b596ed05b18c0ff86915ef8a7c4a",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Agentic Telegram AI bot with LangChain nodes and new tools",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "13b3488e-af72-4d89-bef4-e9b895e3bf76",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1640,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o",
|
||||
"options": {
|
||||
"temperature": 0.7,
|
||||
"frequencyPenalty": 0.2
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "rveqdSfp7pCRON1T",
|
||||
"name": "Ted's Tech Talks OpenAi"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "864937a1-43f6-4055-bdea-61ab07db9903",
|
||||
"name": "Window Buffer Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
1760,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"sessionKey": "=chat_with_{{ $('Listen for incoming events').first().json.message.chat.id }}",
|
||||
"contextWindowLength": 10
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4ef838d4-feaa-4bd3-b2c7-ccd938be4373",
|
||||
"name": "Listen for incoming events",
|
||||
"type": "n8n-nodes-base.telegramTrigger",
|
||||
"position": [
|
||||
1580,
|
||||
360
|
||||
],
|
||||
"webhookId": "322dce18-f93e-4f86-b9b1-3305519b7834",
|
||||
"parameters": {
|
||||
"updates": [
|
||||
"*"
|
||||
],
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "9dexJXnlVPA6wt8K",
|
||||
"name": "Chat & Sound"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fed51c41-2846-4a1a-a5f5-ce121ee7fe88",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1460,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 926.3188190787038,
|
||||
"height": 553.452795998601,
|
||||
"content": "## Generate an image with Dall-E-3 and send it via Telegram"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1c7a204b-3ed7-47bd-a434-202b05272d18",
|
||||
"name": "Send final reply",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"onError": "continueErrorOutput",
|
||||
"position": [
|
||||
2140,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.output }}",
|
||||
"chatId": "={{ $('Listen for incoming events').first().json.message.from.id }}",
|
||||
"additionalFields": {
|
||||
"appendAttribution": false
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "9dexJXnlVPA6wt8K",
|
||||
"name": "Chat & Sound"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "bebbe9d4-47ba-4c13-9e1e-d36bfe6e472e",
|
||||
"name": "Send back an image",
|
||||
"type": "n8n-nodes-base.telegramTool",
|
||||
"position": [
|
||||
2020,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"file": "={{ $fromAI(\"url\", \"a valid url of an image\", \"string\", \" \") }}",
|
||||
"chatId": "={{ $('Listen for incoming events').first().json.message.from.id }}",
|
||||
"operation": "sendDocument",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "9dexJXnlVPA6wt8K",
|
||||
"name": "Chat & Sound"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "38f2410d-bd55-4ddf-8aaa-4e28919de78f",
|
||||
"name": "Generate image in Dalle",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
|
||||
"position": [
|
||||
1880,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.openai.com/v1/images/generations",
|
||||
"method": "POST",
|
||||
"sendBody": true,
|
||||
"authentication": "predefinedCredentialType",
|
||||
"parametersBody": {
|
||||
"values": [
|
||||
{
|
||||
"name": "model",
|
||||
"value": "dall-e-3",
|
||||
"valueProvider": "fieldValue"
|
||||
},
|
||||
{
|
||||
"name": "prompt"
|
||||
}
|
||||
]
|
||||
},
|
||||
"toolDescription": "Call this tool to request a Dall-E-3 model, when the user asks to draw something. If you gеt a response from this tool, forward it to the Telegram tool.",
|
||||
"nodeCredentialType": "openAiApi"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "rveqdSfp7pCRON1T",
|
||||
"name": "Ted's Tech Talks OpenAi"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "34265eab-9f37-475a-a2ae-a6c37c69c595",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
1780,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.message.text }}",
|
||||
"options": {
|
||||
"systemMessage": "=You are a helpful assistant. You are communicating with a user named {{ $json.message.from.first_name }}. Address the user by name every time. If the user asks for an image, always send the link to the image in the final reply."
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "b36989c5-295a-4df6-84e9-776815509bc9",
|
||||
"connections": {
|
||||
"AI Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send final reply",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Send back an image": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate image in Dalle": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Listen for incoming events": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,470 @@
|
||||
{
|
||||
"id": "FU3MrLkaTHmfdG4n",
|
||||
"meta": {
|
||||
"instanceId": "3294023dd650d95df294922b9d55d174ef26f4a2e6cce97c8a4ab5f98f5b8c7b",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Hugging Face to Notion",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "32d5bfee-97f1-4e92-b62e-d09bdd9c3821",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-2640,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"field": "weeks",
|
||||
"triggerAtDay": [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5
|
||||
],
|
||||
"triggerAtHour": 8
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "b1f4078e-ac77-47ec-995c-f52fd98fafef",
|
||||
"name": "If",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
-1360,
|
||||
-280
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "7094d6db-1fa7-4b59-91cf-6bbd5b5f067e",
|
||||
"operator": {
|
||||
"type": "object",
|
||||
"operation": "empty",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "afac08e1-b629-4467-86ef-907e4a5e8841",
|
||||
"name": "Loop Over Items",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
-1760,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"reset": false
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "807ba450-9c89-4f88-aa84-91f43e3adfc6",
|
||||
"name": "Split Out",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
-1960,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "url, url"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "08dd3f15-2030-48f2-ab0f-f85f797268e1",
|
||||
"name": "Request Hugging Face Paper",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-2440,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://huggingface.co/papers",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "date",
|
||||
"value": "={{ $now.minus(1,'days').format('yyyy-MM-dd') }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "f37ba769-d881-4aad-927d-ca1f4a68b9a1",
|
||||
"name": "Extract Hugging Face Paper",
|
||||
"type": "n8n-nodes-base.html",
|
||||
"position": [
|
||||
-2200,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"operation": "extractHtmlContent",
|
||||
"extractionValues": {
|
||||
"values": [
|
||||
{
|
||||
"key": "url",
|
||||
"attribute": "href",
|
||||
"cssSelector": ".line-clamp-3",
|
||||
"returnArray": true,
|
||||
"returnValue": "attribute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "94ba99bf-a33b-4311-a4e6-86490e1bb9ad",
|
||||
"name": "Check Paper URL Existed",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"position": [
|
||||
-1540,
|
||||
-280
|
||||
],
|
||||
"parameters": {
|
||||
"filters": {
|
||||
"conditions": [
|
||||
{
|
||||
"key": "URL|url",
|
||||
"urlValue": "={{ 'https://huggingface.co'+$json.url }}",
|
||||
"condition": "equals"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"resource": "databasePage",
|
||||
"operation": "getAll",
|
||||
"databaseId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "17b67aba-1fcc-80ae-baa1-d88ffda7ae83",
|
||||
"cachedResultUrl": "https://www.notion.so/17b67aba1fcc80aebaa1d88ffda7ae83",
|
||||
"cachedResultName": "huggingface-abstract"
|
||||
},
|
||||
"filterType": "manual"
|
||||
},
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "I5KdUzwhWnphQ862",
|
||||
"name": "notion"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "ece8dee2-e444-4557-aad9-5bdcb5ecd756",
|
||||
"name": "Request Hugging Face Paper Detail",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-1080,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ 'https://huggingface.co'+$('Split Out').item.json.url }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "53b266fe-e7c4-4820-92eb-78a6ba7a6430",
|
||||
"name": "OpenAI Analysis Abstract",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
-640,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"modelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-2024-11-20",
|
||||
"cachedResultName": "GPT-4O-2024-11-20"
|
||||
},
|
||||
"options": {},
|
||||
"messages": {
|
||||
"values": [
|
||||
{
|
||||
"role": "system",
|
||||
"content": "Extract the following key details from the paper abstract:\n\nCore Introduction: Summarize the main contributions and objectives of the paper, highlighting its innovations and significance.\nKeyword Extraction: List 2-5 keywords that best represent the research direction and techniques of the paper.\nKey Data and Results: Extract important performance metrics, comparison results, and the paper's advantages over other studies.\nTechnical Details: Provide a brief overview of the methods, optimization techniques, and datasets mentioned in the paper.\nClassification: Assign an appropriate academic classification based on the content of the paper.\n\n\nOutput as json:\n{\n \"Core_Introduction\": \"PaSa is an advanced Paper Search agent powered by large language models that can autonomously perform a series of decisions (including invoking search tools, reading papers, and selecting relevant references) to provide comprehensive and accurate results for complex academic queries.\",\n \"Keywords\": [\n \"Paper Search Agent\",\n \"Large Language Models\",\n \"Reinforcement Learning\",\n \"Academic Queries\",\n \"Performance Benchmarking\"\n ],\n \"Data_and_Results\": \"PaSa outperforms existing baselines (such as Google, GPT-4, chatGPT) in tests using AutoScholarQuery (35k academic queries) and RealScholarQuery (real-world academic queries). For example, PaSa-7B exceeds Google with GPT-4o by 37.78% in recall@20 and 39.90% in recall@50.\",\n \"Technical_Details\": \"PaSa is optimized using reinforcement learning with the AutoScholarQuery synthetic dataset, demonstrating superior performance in multiple benchmarks.\",\n \"Classification\": [\n \"Artificial Intelligence (AI)\",\n \"Academic Search and Information Retrieval\",\n \"Natural Language Processing (NLP)\",\n \"Reinforcement Learning\"\n ]\n}\n```"
|
||||
},
|
||||
{
|
||||
"content": "={{ $json.abstract }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"jsonOutput": true
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "LmLcxHwbzZNWxqY6",
|
||||
"name": "Unnamed credential"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.8
|
||||
},
|
||||
{
|
||||
"id": "f491cd7f-598e-46fd-b80c-04cfa9766dfd",
|
||||
"name": "Store Abstract Notion",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"position": [
|
||||
-300,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"resource": "databasePage",
|
||||
"databaseId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "17b67aba-1fcc-80ae-baa1-d88ffda7ae83",
|
||||
"cachedResultUrl": "https://www.notion.so/17b67aba1fcc80aebaa1d88ffda7ae83",
|
||||
"cachedResultName": "huggingface-abstract"
|
||||
},
|
||||
"propertiesUi": {
|
||||
"propertyValues": [
|
||||
{
|
||||
"key": "URL|url",
|
||||
"urlValue": "={{ 'https://huggingface.co'+$('Split Out').item.json.url }}"
|
||||
},
|
||||
{
|
||||
"key": "title|title",
|
||||
"title": "={{ $('Extract Hugging Face Paper Abstract').item.json.title }}"
|
||||
},
|
||||
{
|
||||
"key": "abstract|rich_text",
|
||||
"textContent": "={{ $('Extract Hugging Face Paper Abstract').item.json.abstract.substring(0,2000) }}"
|
||||
},
|
||||
{
|
||||
"key": "scrap-date|date",
|
||||
"date": "={{ $today.format('yyyy-MM-dd') }}",
|
||||
"includeTime": false
|
||||
},
|
||||
{
|
||||
"key": "Classification|rich_text",
|
||||
"textContent": "={{ $json.message.content.Classification.join(',') }}"
|
||||
},
|
||||
{
|
||||
"key": "Technical_Details|rich_text",
|
||||
"textContent": "={{ $json.message.content.Technical_Details }}"
|
||||
},
|
||||
{
|
||||
"key": "Data_and_Results|rich_text",
|
||||
"textContent": "={{ $json.message.content.Data_and_Results }}"
|
||||
},
|
||||
{
|
||||
"key": "keywords|rich_text",
|
||||
"textContent": "={{ $json.message.content.Keywords.join(',') }}"
|
||||
},
|
||||
{
|
||||
"key": "Core Introduction|rich_text",
|
||||
"textContent": "={{ $json.message.content.Core_Introduction }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "I5KdUzwhWnphQ862",
|
||||
"name": "notion"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "d5816a1c-d1fa-4be2-8088-57fbf68e6b43",
|
||||
"name": "Extract Hugging Face Paper Abstract",
|
||||
"type": "n8n-nodes-base.html",
|
||||
"position": [
|
||||
-840,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"operation": "extractHtmlContent",
|
||||
"extractionValues": {
|
||||
"values": [
|
||||
{
|
||||
"key": "abstract",
|
||||
"cssSelector": ".text-gray-700"
|
||||
},
|
||||
{
|
||||
"key": "title",
|
||||
"cssSelector": ".text-2xl"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
}
|
||||
],
|
||||
"active": true,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "4b0ec2a3-253d-46d5-a4d4-1d9ff21ba4a3",
|
||||
"connections": {
|
||||
"If": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Request Hugging Face Paper Detail",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop Over Items": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "Check Paper URL Existed",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Request Hugging Face Paper",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Store Abstract Notion": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop Over Items",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check Paper URL Existed": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Analysis Abstract": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Store Abstract Notion",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract Hugging Face Paper": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Request Hugging Face Paper": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extract Hugging Face Paper",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Request Hugging Face Paper Detail": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extract Hugging Face Paper Abstract",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract Hugging Face Paper Abstract": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "OpenAI Analysis Abstract",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
828
Analyze & Sort Suspicious Email Contents with ChatGPT.txt
Normal file
828
Analyze & Sort Suspicious Email Contents with ChatGPT.txt
Normal file
@@ -0,0 +1,828 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "03e9d14e9196363fe7191ce21dc0bb17387a6e755dcc9acc4f5904752919dca8"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "94dd7f48-0013-4fb5-89c4-826ecd7f2d66",
|
||||
"name": "Gmail Trigger",
|
||||
"type": "n8n-nodes-base.gmailTrigger",
|
||||
"position": [
|
||||
1460,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"simple": false,
|
||||
"filters": {},
|
||||
"options": {},
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyMinute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "kkhNhqKpZt6IUZd0",
|
||||
"name": "Gmail"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "ca2023fa-ceca-4923-80e4-a3843803536c",
|
||||
"name": "Microsoft Outlook Trigger",
|
||||
"type": "n8n-nodes-base.microsoftOutlookTrigger",
|
||||
"disabled": true,
|
||||
"position": [
|
||||
1480,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"fields": [
|
||||
"body",
|
||||
"toRecipients",
|
||||
"subject",
|
||||
"bodyPreview"
|
||||
],
|
||||
"output": "fields",
|
||||
"filters": {},
|
||||
"options": {},
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyMinute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"microsoftOutlookOAuth2Api": {
|
||||
"id": "vTCK0oVQ0WjFrI5H",
|
||||
"name": " Outlook Credential"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1f011214-91a0-4cfa-9d9e-29864937c0a3",
|
||||
"name": "Screenshot HTML",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2620,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://hcti.io/v1/image",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"sendQuery": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "html",
|
||||
"value": "={{ $('Set Email Variables').item.json.htmlBody }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpBasicAuth",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpBasicAuth": {
|
||||
"id": "8tm8mUWmPvtmPFPk",
|
||||
"name": "hcti.io"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "64f4789f-9de8-414f-af62-ddc339f0d0ac",
|
||||
"name": "Retrieve Screenshot",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2800,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.url }}",
|
||||
"options": {},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpBasicAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpBasicAuth": {
|
||||
"id": "8tm8mUWmPvtmPFPk",
|
||||
"name": "hcti.io"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "db707bd9-6abc-4ab7-8ffa-ad25c5e8adc4",
|
||||
"name": "Set Outlook Variables",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2040,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "38bd3db2-1a8d-4c40-a2dd-336e0cc84224",
|
||||
"name": "htmlBody",
|
||||
"type": "string",
|
||||
"value": "={{ $('Microsoft Outlook Trigger').item.json.body.content }}"
|
||||
},
|
||||
{
|
||||
"id": "13bdd95b-ef02-486e-b38b-d14bd05a4a8a",
|
||||
"name": "headers",
|
||||
"type": "string",
|
||||
"value": "={{ $json}}"
|
||||
},
|
||||
{
|
||||
"id": "20566ad4-7eb7-42b1-8a0d-f8b759610f10",
|
||||
"name": "subject",
|
||||
"type": "string",
|
||||
"value": "={{ $('Microsoft Outlook Trigger').item.json.subject }}"
|
||||
},
|
||||
{
|
||||
"id": "7171998f-a5a2-4e23-946a-9c1ad75710e7",
|
||||
"name": "recipient",
|
||||
"type": "string",
|
||||
"value": "={{ $('Microsoft Outlook Trigger').item.json.toRecipients[0].emailAddress.address }}"
|
||||
},
|
||||
{
|
||||
"id": "cc262634-2470-4524-8319-abe2518a6335",
|
||||
"name": "textBody",
|
||||
"type": "string",
|
||||
"value": "={{ $('Retrieve Headers of Email').item.json.body.content }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "7a3622c0-6949-4ea3-ae13-46a1ee26de7b",
|
||||
"name": "Set Gmail Variables",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2020,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "38bd3db2-1a8d-4c40-a2dd-336e0cc84224",
|
||||
"name": "htmlBody",
|
||||
"type": "string",
|
||||
"value": "={{ $json.html }}"
|
||||
},
|
||||
{
|
||||
"id": "18fbcf78-6d3c-4036-b3a2-fb5adf22176a",
|
||||
"name": "headers",
|
||||
"type": "string",
|
||||
"value": "={{ $json.headers }}"
|
||||
},
|
||||
{
|
||||
"id": "1d690098-be2a-4604-baf8-62f314930929",
|
||||
"name": "subject",
|
||||
"type": "string",
|
||||
"value": "={{ $json.subject }}"
|
||||
},
|
||||
{
|
||||
"id": "8009f00a-547f-4eb1-b52d-2e7305248885",
|
||||
"name": "recipient",
|
||||
"type": "string",
|
||||
"value": "={{ $json.to.text }}"
|
||||
},
|
||||
{
|
||||
"id": "1932e97d-b03b-4964-b8bc-8262aaaa1f7a",
|
||||
"name": "textBody",
|
||||
"type": "string",
|
||||
"value": "={{ $json.text }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "4b4c6b34-f74c-4402-91a1-4d002e02a3bd",
|
||||
"name": "Retrieve Headers of Email",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1700,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://graph.microsoft.com/v1.0/me/messages/{{ $json.id }}?$select=internetMessageHeaders,body",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"authentication": "predefinedCredentialType",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Accept",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"name": "Prefer",
|
||||
"value": "outlook.body-content-type=\"text\""
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "microsoftOutlookOAuth2Api"
|
||||
},
|
||||
"credentials": {
|
||||
"microsoftOutlookOAuth2Api": {
|
||||
"id": "vTCK0oVQ0WjFrI5H",
|
||||
"name": " Outlook Credential"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "0c9883b5-3eb7-45db-9803-d1b30166a3b5",
|
||||
"name": "Format Headers",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1880,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const input = $('Retrieve Headers of Email').item.json.internetMessageHeaders;\n\nconst result = input.reduce((acc, { name, value }) => {\n if (!acc[name]) acc[name] = [];\n acc[name].push(value);\n return acc;\n}, {});\n\nreturn result;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "c21a976c-00e5-4823-bd94-4c95a7d60438",
|
||||
"name": "Analyze Email with ChatGPT",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
3000,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"modelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o",
|
||||
"cachedResultName": "GPT-4O"
|
||||
},
|
||||
"options": {},
|
||||
"messages": {
|
||||
"values": [
|
||||
{
|
||||
"content": "=Describe the following email using the HTML body and headers. Determine if the email could be a phishing email. \n\nHere is the HTML body:\n{{ $('Set Email Variables').item.json.htmlBody }}\n\nThe message headers are as follows:\n{{ $('Set Email Variables').item.json.headers }}\n\n"
|
||||
},
|
||||
{
|
||||
"role": "system",
|
||||
"content": "Please make sure to output all responses using the following structured JSON output:\n{\n \"malicious\": false,\n \"summary\": \"The email appears to be a legitimate communication from a known sender. It contains no suspicious links, attachments, or language that indicates phishing or malicious intent.\"\n}\n\nFormat the response for Jira who uses a wiki-style renderer. Do not include ``` around your response. Make the summary as verbose as possible including a full breakdown of why the email is benign or malicious."
|
||||
}
|
||||
]
|
||||
},
|
||||
"jsonOutput": true
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "76",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
},
|
||||
{
|
||||
"id": "a91f4095-9245-4276-b21f-f415de22df62",
|
||||
"name": "Create Potentially Malicious Ticket",
|
||||
"type": "n8n-nodes-base.jira",
|
||||
"position": [
|
||||
3640,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"project": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "10001",
|
||||
"cachedResultName": "Support"
|
||||
},
|
||||
"summary": "=Potentially Malicious - Phishing Email Reported: \"{{ $('Set Email Variables').item.json.subject }}\"",
|
||||
"issueType": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "10008",
|
||||
"cachedResultName": "Task"
|
||||
},
|
||||
"additionalFields": {
|
||||
"description": "=A phishing email was reported by {{ $('Set Email Variables').item.json.recipient }} with the subject line \"{{ $('Set Email Variables').item.json.subject }}\"\n\\\\\nh2. Here is ChatGPT's analysis of the email:\n{{ $json.message.content.summary }}"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"jiraSoftwareCloudApi": {
|
||||
"id": "BZmmGUrNIsgM9fDj",
|
||||
"name": "New Jira Cloud"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a5a66a0e-9d8a-45a9-b1ae-aec78ddfec27",
|
||||
"name": "Create Potentially Benign Ticket",
|
||||
"type": "n8n-nodes-base.jira",
|
||||
"position": [
|
||||
3640,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"project": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "10001",
|
||||
"cachedResultName": "Support"
|
||||
},
|
||||
"summary": "=Potentially Benign - Phishing Email Reported: \"{{ $('Set Email Variables').item.json.subject }}\"",
|
||||
"issueType": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "10008",
|
||||
"cachedResultName": "Task"
|
||||
},
|
||||
"additionalFields": {
|
||||
"description": "=A phishing email was reported by {{ $('Set Email Variables').item.json.recipient }} with the subject line \"{{ $('Set Email Variables').item.json.subject }}\"\n\\\\\nh2. Here is ChatGPT's analysis of the email:\n{{ $json.message.content.summary }}"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"jiraSoftwareCloudApi": {
|
||||
"id": "BZmmGUrNIsgM9fDj",
|
||||
"name": "New Jira Cloud"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5af0d60b-d021-4dd9-98f7-b2842800764a",
|
||||
"name": "Rename Screenshot",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
4020,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "runOnceForEachItem",
|
||||
"jsCode": "$('Retrieve Screenshot').item.binary.data.fileName = 'emailScreenshot.png'\n\nreturn $('Retrieve Screenshot').item;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "441c4cbb-bd93-4213-bd34-e18f2a49389f",
|
||||
"name": "Set Jira ID",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
3860,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"includeOtherFields": true
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "4c71188c-011d-4f8e-a36c-87900bfab59a",
|
||||
"name": "Upload Screenshot of Email to Jira",
|
||||
"type": "n8n-nodes-base.jira",
|
||||
"position": [
|
||||
4220,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"issueKey": "={{ $('Set Jira ID').item.json.key }}",
|
||||
"resource": "issueAttachment"
|
||||
},
|
||||
"credentials": {
|
||||
"jiraSoftwareCloudApi": {
|
||||
"id": "BZmmGUrNIsgM9fDj",
|
||||
"name": "New Jira Cloud"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3c031c34-8306-44e1-8e0e-a584c5323112",
|
||||
"name": "Upload Email Body to Jira",
|
||||
"type": "n8n-nodes-base.jira",
|
||||
"position": [
|
||||
4620,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"issueKey": "={{ $('Set Jira ID').item.json.key }}",
|
||||
"resource": "issueAttachment"
|
||||
},
|
||||
"credentials": {
|
||||
"jiraSoftwareCloudApi": {
|
||||
"id": "BZmmGUrNIsgM9fDj",
|
||||
"name": "New Jira Cloud"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d033dcbd-7ccb-451f-ab81-cc6d32d2e01f",
|
||||
"name": "Convert Email Body to File",
|
||||
"type": "n8n-nodes-base.convertToFile",
|
||||
"position": [
|
||||
2420,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"fileName": "emailBody.txt"
|
||||
},
|
||||
"operation": "toText",
|
||||
"sourceProperty": "textBody"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "bda5e2fe-d8c0-456b-975a-35e82ff02816",
|
||||
"name": "Set Email Variables",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2240,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"includeOtherFields": true
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "54ecd8ab-ac4a-4b6b-bd1b-bf8c70082a33",
|
||||
"name": "Rename Email Body Screenshot",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
4420,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "runOnceForEachItem",
|
||||
"jsCode": "$('Convert Email Body to File').item.binary.data.fileName = 'emailBody.txt'\n\nreturn $('Convert Email Body to File').item;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "fe5b82cc-b4bb-4c97-9477-075d5a280e9f",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2574.536755825029,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 376.8280004374956,
|
||||
"height": 595.590013880477,
|
||||
"content": "\n## Email Body Screenshot Creation\n\nThe **Screenshot HTML** node sends the email's HTML body to the **hcti.io** API, generating a screenshot that visually represents the email's layout. The **Retrieve Screenshot** node then fetches this image, making it available for attachment or review in subsequent steps. This dual-format processing ensures both clarity and flexibility in email analysis workflows."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "86b21049-f65e-4c6a-a854-c4376f870da9",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1380,
|
||||
-149.99110983560342
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 814.4556539379754,
|
||||
"height": 444.5525554815556,
|
||||
"content": "\n## Gmail Integration and Data Extraction\n\nThis section of the workflow connects to a Gmail account using the **Gmail Trigger** node, capturing incoming emails in real-time, with checks performed every minute. Once an email is detected, its key components—such as the subject, recipient, body, and headers—are extracted and assigned to variables using the **Set Gmail Variables** node. These variables are structured for subsequent analysis and processing in later steps."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b1a786cf-7a8d-49e1-90ed-31f3d0e65b13",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1380,
|
||||
308
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 809.7918597571277,
|
||||
"height": 602.9002284617277,
|
||||
"content": "\n## Microsoft Outlook Integration and Email Header Processing\n\nThis section enables the integration of Microsoft Outlook to monitor and capture incoming emails. The Microsoft Outlook Trigger node checks for new messages every minute. Once an email is detected, the Retrieve Headers of Email node fetches detailed header and body content via the Microsoft Graph API. The Format Headers node organizes the email headers into a structured format using a JavaScript function, ensuring clarity and readiness for further processing. Finally, the Set Outlook Variables node extracts and assigns key details—such as the email subject, recipient, body, and formatted headers—to variables for use in subsequent workflow steps. This section is essential for processing Outlook emails and preparing them for analysis and reporting.\n\n\n\n\n\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e7ace035-b5f5-4ef3-a117-22c7c938868d",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2958.4325220284563,
|
||||
24.744924120002338
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 593.0990401534098,
|
||||
"height": 573.1750519720028,
|
||||
"content": "\n## AI-Powered Email Analysis and Threat Detection\n\nThis section leverages ChatGPT for advanced email content and header analysis to determine potential phishing threats. The **Analyze Email with ChatGPT** node processes the email's HTML body and headers, generating a detailed JSON response that categorizes the email as malicious or benign. The response includes a verbose explanation, formatted for Jira, outlining the reasons for the classification. The **Check if Malicious** node evaluates the AI output to determine the next steps based on the email's threat status. If flagged as malicious, subsequent actions like reporting and ticket creation are triggered. This section ensures precise, AI-driven analysis to enhance email security workflows."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "02c1ad8e-f952-42d2-ae9f-cf3a77e49e52",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3562.4948140707697,
|
||||
-125.79607719303533
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1251.7025543502837,
|
||||
"height": 891.579206098173,
|
||||
"content": "\n## Automated Jira Ticket Creation and Email Attachment\n\nThis section streamlines the process of logging phishing email reports in Jira, complete with detailed analysis and attachments. The workflow creates two distinct Jira tickets depending on the AI classification of the email:\n\n1. **Potentially Malicious**: The **Create Potentially Malicious Ticket** node generates a ticket if the email is flagged as a phishing attempt, including a summary of ChatGPT's analysis and the email’s details.\n2. **Potentially Benign**: If the email is classified as safe, the **Create Potentially Benign Ticket** node logs a ticket with similar details but under a non-malicious category.\n\n\nThe **Set Jira ID** node ensures the generated ticket's ID is tracked for subsequent operations. Attachments are handled efficiently:\n\n- **Rename Screenshot** prepares the email screenshot for upload.\n- **Upload Screenshot of Email to Jira** adds the screenshot to the Jira ticket for visual context.\n- **Rename Email Body Screenshot** and **Upload Email Body to Jira** manage the attachment of the email's text body as a `.txt` file.\n\n\nThis section enhances reporting by automating ticket creation, ensuring all relevant email data is readily available for review by security teams."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "597ef23e-c61c-4e27-8c14-74ec20079c96",
|
||||
"name": "Check if Malicious",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
3400,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "493f412c-5f11-4173-8940-90f5bc7f5fab",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.message.content.malicious }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "af512af9-924b-4019-bdf9-62aac9cd0dac",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2200,
|
||||
39.041733604283195
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 365.6458805720866,
|
||||
"height": 559.8072303111675,
|
||||
"content": "\n## Email Body Conversion\n\nThis section processes the email body into both text and visual formats for detailed analysis and reporting. The **Set Email Variables** node organizes the email's data, including its HTML body and text content, to prepare it for further steps. The **Convert Email Body to File** node creates a `.txt` file containing the plain text version of the email body, useful for documentation or further analysis."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Set Jira ID": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Rename Screenshot",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Gmail Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Gmail Variables",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Format Headers": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Outlook Variables",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Screenshot HTML": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Retrieve Screenshot",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Rename Screenshot": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Upload Screenshot of Email to Jira",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check if Malicious": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Potentially Malicious Ticket",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Create Potentially Benign Ticket",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Retrieve Screenshot": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Analyze Email with ChatGPT",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Email Variables": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Convert Email Body to File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Gmail Variables": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Email Variables",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Outlook Variables": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Email Variables",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Microsoft Outlook Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Retrieve Headers of Email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Retrieve Headers of Email": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format Headers",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Analyze Email with ChatGPT": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check if Malicious",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Convert Email Body to File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Screenshot HTML",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Rename Email Body Screenshot": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Upload Email Body to Jira",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Potentially Benign Ticket": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Jira ID",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Upload Screenshot of Email to Jira": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Rename Email Body Screenshot",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Potentially Malicious Ticket": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Jira ID",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
600
Analyze Suspicious Email Contents with ChatGPT Vision.txt
Normal file
600
Analyze Suspicious Email Contents with ChatGPT Vision.txt
Normal file
@@ -0,0 +1,600 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "03e9d14e9196363fe7191ce21dc0bb17387a6e755dcc9acc4f5904752919dca8"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "1bad6bfc-9ec9-48a5-b8f7-73c4de3d08cf",
|
||||
"name": "Gmail Trigger",
|
||||
"type": "n8n-nodes-base.gmailTrigger",
|
||||
"position": [
|
||||
1480,
|
||||
160
|
||||
],
|
||||
"parameters": {
|
||||
"simple": false,
|
||||
"filters": {},
|
||||
"options": {},
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyMinute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "kkhNhqKpZt6IUZd0",
|
||||
"name": " Gmail"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "9ac747a1-4fd8-46ba-b4c1-75fd17aab2ed",
|
||||
"name": "Microsoft Outlook Trigger",
|
||||
"type": "n8n-nodes-base.microsoftOutlookTrigger",
|
||||
"disabled": true,
|
||||
"position": [
|
||||
1480,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"fields": [
|
||||
"body",
|
||||
"toRecipients",
|
||||
"subject",
|
||||
"bodyPreview"
|
||||
],
|
||||
"output": "fields",
|
||||
"filters": {},
|
||||
"options": {},
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyMinute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"microsoftOutlookOAuth2Api": {
|
||||
"id": "vTCK0oVQ0WjFrI5H",
|
||||
"name": " Outlook Credential"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "5bf9b0e8-b84e-44a2-aad2-45dde3e4ab1b",
|
||||
"name": "Screenshot HTML",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2520,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://hcti.io/v1/image",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"sendQuery": true,
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "html",
|
||||
"value": "={{ $json.htmlBody }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpBasicAuth",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpBasicAuth": {
|
||||
"id": "8tm8mUWmPvtmPFPk",
|
||||
"name": "hcti.io"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "fc770d1d-6c18-4d14-8344-1dc042464df6",
|
||||
"name": "Retrieve Screenshot",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2700,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.url }}",
|
||||
"options": {},
|
||||
"authentication": "genericCredentialType",
|
||||
"genericAuthType": "httpBasicAuth"
|
||||
},
|
||||
"credentials": {
|
||||
"httpBasicAuth": {
|
||||
"id": "8tm8mUWmPvtmPFPk",
|
||||
"name": "hcti.io"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "2f3e5cc0-24e8-450a-898b-71e2d6f7bb58",
|
||||
"name": "Set Outlook Variables",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2020,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "38bd3db2-1a8d-4c40-a2dd-336e0cc84224",
|
||||
"name": "htmlBody",
|
||||
"type": "string",
|
||||
"value": "={{ $('Microsoft Outlook Trigger').item.json.body.content }}"
|
||||
},
|
||||
{
|
||||
"id": "13bdd95b-ef02-486e-b38b-d14bd05a4a8a",
|
||||
"name": "headers",
|
||||
"type": "string",
|
||||
"value": "={{ $json}}"
|
||||
},
|
||||
{
|
||||
"id": "20566ad4-7eb7-42b1-8a0d-f8b759610f10",
|
||||
"name": "subject",
|
||||
"type": "string",
|
||||
"value": "={{ $('Microsoft Outlook Trigger').item.json.subject }}"
|
||||
},
|
||||
{
|
||||
"id": "7171998f-a5a2-4e23-946a-9c1ad75710e7",
|
||||
"name": "recipient",
|
||||
"type": "string",
|
||||
"value": "={{ $('Microsoft Outlook Trigger').item.json.toRecipients[0].emailAddress.address }}"
|
||||
},
|
||||
{
|
||||
"id": "cc262634-2470-4524-8319-abe2518a6335",
|
||||
"name": "textBody",
|
||||
"type": "string",
|
||||
"value": "={{ $('Retrieve Headers of Email').item.json.body.content }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "374e5b16-a666-4706-9fd2-762b2927012d",
|
||||
"name": "Set Gmail Variables",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2040,
|
||||
160
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "38bd3db2-1a8d-4c40-a2dd-336e0cc84224",
|
||||
"name": "htmlBody",
|
||||
"type": "string",
|
||||
"value": "={{ $json.html }}"
|
||||
},
|
||||
{
|
||||
"id": "18fbcf78-6d3c-4036-b3a2-fb5adf22176a",
|
||||
"name": "headers",
|
||||
"type": "string",
|
||||
"value": "={{ $json.headers }}"
|
||||
},
|
||||
{
|
||||
"id": "1d690098-be2a-4604-baf8-62f314930929",
|
||||
"name": "subject",
|
||||
"type": "string",
|
||||
"value": "={{ $json.subject }}"
|
||||
},
|
||||
{
|
||||
"id": "8009f00a-547f-4eb1-b52d-2e7305248885",
|
||||
"name": "recipient",
|
||||
"type": "string",
|
||||
"value": "={{ $json.to.text }}"
|
||||
},
|
||||
{
|
||||
"id": "1932e97d-b03b-4964-b8bc-8262aaaa1f7a",
|
||||
"name": "textBody",
|
||||
"type": "string",
|
||||
"value": "={{ $json.text }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "3166738e-d0a3-475b-8b19-51afd519ee3a",
|
||||
"name": "Retrieve Headers of Email",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1680,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://graph.microsoft.com/v1.0/me/messages/{{ $json.id }}?$select=internetMessageHeaders,body",
|
||||
"options": {},
|
||||
"sendHeaders": true,
|
||||
"authentication": "predefinedCredentialType",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Accept",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"name": "Prefer",
|
||||
"value": "outlook.body-content-type=\"text\""
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "microsoftOutlookOAuth2Api"
|
||||
},
|
||||
"credentials": {
|
||||
"microsoftOutlookOAuth2Api": {
|
||||
"id": "vTCK0oVQ0WjFrI5H",
|
||||
"name": " Outlook Credential"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "25ae222c-088f-4565-98d6-803c8c1b0826",
|
||||
"name": "Format Headers",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1860,
|
||||
720
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const input = $('Retrieve Headers of Email').item.json.internetMessageHeaders;\n\nconst result = input.reduce((acc, { name, value }) => {\n if (!acc[name]) acc[name] = [];\n acc[name].push(value);\n return acc;\n}, {});\n\nreturn result;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "8f14f267-1074-43ea-968d-26a6ab36fd7b",
|
||||
"name": "Set Email Variables",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2360,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"includeOtherFields": true
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "45d156aa-91f4-483c-91d4-c9de4a4f595d",
|
||||
"name": "ChatGPT Analysis",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
3100,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Describe this image. Determine if the email could be a phishing email. The message headers are as follows:\n{{ $('Set Email Variables').item.json.headers }}\n\nFormat the response for Jira who uses a wiki-style renderer. Do not include ``` around your response.",
|
||||
"modelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "chatgpt-4o-latest",
|
||||
"cachedResultName": "CHATGPT-4O-LATEST"
|
||||
},
|
||||
"options": {
|
||||
"maxTokens": 1500
|
||||
},
|
||||
"resource": "image",
|
||||
"inputType": "base64",
|
||||
"operation": "analyze"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "76",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
},
|
||||
{
|
||||
"id": "62ca591b-6627-496c-96a7-95cb0081480d",
|
||||
"name": "Create Jira Ticket",
|
||||
"type": "n8n-nodes-base.jira",
|
||||
"position": [
|
||||
3500,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"project": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "10001",
|
||||
"cachedResultName": "Support"
|
||||
},
|
||||
"summary": "=Phishing Email Reported: \"{{ $('Set Email Variables').item.json.subject }}\"",
|
||||
"issueType": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "10008",
|
||||
"cachedResultName": "Task"
|
||||
},
|
||||
"additionalFields": {
|
||||
"description": "=A phishing email was reported by {{ $('Set Email Variables').item.json.recipient }} with the subject line \"{{ $('Set Email Variables').item.json.subject }}\" and body:\n{{ $('Set Email Variables').item.json.textBody }}\n\\\\\n\\\\\n\\\\\nh2. Here is ChatGPT's analysis of the email:\n{{ $json.content }}"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"jiraSoftwareCloudApi": {
|
||||
"id": "BZmmGUrNIsgM9fDj",
|
||||
"name": "New Jira Cloud"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "071380c8-8070-4f8f-86c6-87c4ee3bc261",
|
||||
"name": "Rename Screenshot",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
3680,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "runOnceForEachItem",
|
||||
"jsCode": "$('Retrieve Screenshot').item.binary.data.fileName = 'emailScreenshot.png'\n\nreturn $('Retrieve Screenshot').item;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "05c57490-c1ee-48f0-9e38-244c9a995e22",
|
||||
"name": "Upload Screenshot of Email to Jira",
|
||||
"type": "n8n-nodes-base.jira",
|
||||
"position": [
|
||||
3860,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"issueKey": "={{ $('Create Jira Ticket').item.json.key }}",
|
||||
"resource": "issueAttachment"
|
||||
},
|
||||
"credentials": {
|
||||
"jiraSoftwareCloudApi": {
|
||||
"id": "BZmmGUrNIsgM9fDj",
|
||||
"name": "New Jira Cloud"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "be02770d-a943-41f5-98a9-5c433a6a3dbf",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1420,
|
||||
-107.36679523834897
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 792.3026315789474,
|
||||
"height": 426.314163659402,
|
||||
"content": "\n## Gmail Integration and Data Extraction\n\nThis section of the workflow connects to a Gmail account using the **Gmail Trigger** node, capturing incoming emails in real-time, with checks performed every minute. Once an email is detected, its key components—such as the subject, recipient, body, and headers—are extracted and assigned to variables using the **Set Gmail Variables** node. These variables are structured for subsequent analysis and processing in later steps."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c1d2f691-669a-46de-9ef8-59ce4e6980c5",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1420,
|
||||
380.6918768014301
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 792.3026315789474,
|
||||
"height": 532.3344389880435,
|
||||
"content": "\n## Microsoft Outlook Integration and Email Header Processing\n\nThis section connects to a Microsoft Outlook account to monitor incoming emails using the **Microsoft Outlook Trigger** node, which checks for new messages every minute. Emails are then processed to retrieve detailed headers and body content via the **Retrieve Headers of Email** node. The headers are structured into a user-friendly format using the **Format Headers** code node, ensuring clarity for further analysis. Key details, including the email's subject, recipient, and body content, are assigned to variables with the **Set Outlook Variables** node for streamlined integration into subsequent workflow steps."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c189e2e0-9f51-4bc0-a483-8b7f0528be70",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2287.3684210526317,
|
||||
46.18421052631584
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 580.4605263157906,
|
||||
"height": 615.460526315789,
|
||||
"content": "\n## HTML Screenshot Generation and Email Visualization\n\nThis section processes an email’s HTML content to create a visual representation, useful for documentation or phishing detection workflows. The **Set Email Variables** node organizes the email's HTML body into a format ready for processing. The **Screenshot HTML** node sends this HTML content to the **hcti.io** API, which generates a screenshot of the email's layout. The **Retrieve Screenshot** node then fetches the image URL for further use in the workflow. This setup ensures that the email's appearance is preserved in a visually accessible format, simplifying review and reporting. Keep in mind however that this exposes the email content to a third party. If you self host n8n, you can deploy a cli tool to rasterize locally instead."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9076f9e9-f4fb-409a-9580-1ae459094c31",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2880,
|
||||
123.72476075009968
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 507.82894736842223,
|
||||
"height": 537.9199760920052,
|
||||
"content": "\n## AI-Powered Email Analysis with ChatGPT\n\nThis section leverages AI to analyze email content and headers for phishing indicators. The **ChatGPT Analysis** node utilizes the ChatGPT-4 model to review the email screenshot and associated metadata, including message headers. It generates a detailed report indicating whether the email might be a phishing attempt. The output is formatted specifically for Jira’s wiki-style renderer, making it ready for seamless integration into ticketing workflows. This ensures thorough and automated email threat assessments."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ca2488af-e787-4675-802a-8b4f2d845376",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3400,
|
||||
122.88662032580646
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 692.434210526317,
|
||||
"height": 529.5475902005091,
|
||||
"content": "\n## Automated Jira Ticket Creation for Phishing Reports\n\nThis section streamlines the process of reporting phishing emails by automatically creating detailed Jira tickets. The **Create Jira Ticket** node compiles email information, including the subject, recipient, body text, and ChatGPT's phishing analysis, into a structured ticket. The **Rename Screenshot** node ensures that the email screenshot file is appropriately labeled for attachment. Finally, the **Upload Screenshot of Email to Jira** node attaches the email’s visual representation to the ticket, providing additional context for the security team. This integration ensures that phishing reports are logged with all necessary details, enabling efficient tracking and resolution."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Gmail Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Gmail Variables",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Format Headers": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Outlook Variables",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Screenshot HTML": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Retrieve Screenshot",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"ChatGPT Analysis": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Jira Ticket",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Rename Screenshot": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Upload Screenshot of Email to Jira",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create Jira Ticket": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Rename Screenshot",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Retrieve Screenshot": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "ChatGPT Analysis",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Email Variables": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Screenshot HTML",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Gmail Variables": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Email Variables",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Outlook Variables": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Email Variables",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Microsoft Outlook Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Retrieve Headers of Email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Retrieve Headers of Email": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Format Headers",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
128
Analyze feedback and send a message on Mattermost.txt
Normal file
128
Analyze feedback and send a message on Mattermost.txt
Normal file
@@ -0,0 +1,128 @@
|
||||
{
|
||||
"id": "133",
|
||||
"name": "Analyze the sentiment of feedback and send a message on Mattermost",
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Typeform Trigger",
|
||||
"type": "n8n-nodes-base.typeformTrigger",
|
||||
"position": [
|
||||
510,
|
||||
260
|
||||
],
|
||||
"webhookId": "ad8a87ef-d293-4e48-8d36-838d69ebce0f",
|
||||
"parameters": {
|
||||
"formId": ""
|
||||
},
|
||||
"credentials": {
|
||||
"typeformApi": "typeform"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Google Cloud Natural Language",
|
||||
"type": "n8n-nodes-base.googleCloudNaturalLanguage",
|
||||
"position": [
|
||||
710,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"content": "={{$node[\"Typeform Trigger\"].json[\"What did you think about the event?\"]}}",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"googleCloudNaturalLanguageOAuth2Api": "cloud"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "IF",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
910,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"number": [
|
||||
{
|
||||
"value1": "={{$node[\"Google Cloud Natural Language\"].json[\"documentSentiment\"][\"score\"]}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Mattermost",
|
||||
"type": "n8n-nodes-base.mattermost",
|
||||
"position": [
|
||||
1110,
|
||||
160
|
||||
],
|
||||
"parameters": {
|
||||
"message": "=You got a new feedback with a score of {{$node[\"Google Cloud Natural Language\"].json[\"documentSentiment\"][\"score\"]}}. Here is what it says:{{$node[\"Typeform Trigger\"].json[\"What did you think about the event?\"]}}",
|
||||
"channelId": "4h1bz64cyifwxnzojkzh8hxh4a",
|
||||
"attachments": [],
|
||||
"otherOptions": {}
|
||||
},
|
||||
"credentials": {
|
||||
"mattermostApi": "mattermost"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "NoOp",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
1110,
|
||||
360
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"settings": {},
|
||||
"connections": {
|
||||
"IF": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Mattermost",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "NoOp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Typeform Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Cloud Natural Language",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Cloud Natural Language": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "IF",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"name": "Mattermost",
|
||||
"type": "n8n-nodes-base.mattermost",
|
||||
"position": [
|
||||
810,
|
||||
300
|
||||
],
|
||||
"parameters": {
|
||||
"message": "=You got new feedback with a score of {{$json[\"SentimentScore\"][\"Negative\"]}}. Here is what it says:{{$node[\"Typeform Trigger\"].json[\"What did you think about the event?\"]}}",
|
||||
"channelId": "h7cxrd1cefr13x689enzyw7xhc",
|
||||
"attachments": [],
|
||||
"otherOptions": {}
|
||||
},
|
||||
"credentials": {
|
||||
"mattermostApi": "Mattermost Credentials"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "NoOp",
|
||||
"type": "n8n-nodes-base.noOp",
|
||||
"position": [
|
||||
800,
|
||||
500
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "IF",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
600,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"conditions": {
|
||||
"number": [],
|
||||
"string": [
|
||||
{
|
||||
"value1": "={{$json[\"Sentiment\"]}}",
|
||||
"value2": "NEGATIVE"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "AWS Comprehend",
|
||||
"type": "n8n-nodes-base.awsComprehend",
|
||||
"position": [
|
||||
400,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{$json[\"What did you think about the event?\"]}}",
|
||||
"operation": "detectSentiment"
|
||||
},
|
||||
"credentials": {
|
||||
"aws": "AWS Comprehend Credentials"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"name": "Typeform Trigger",
|
||||
"type": "n8n-nodes-base.typeformTrigger",
|
||||
"position": [
|
||||
200,
|
||||
400
|
||||
],
|
||||
"webhookId": "ad8a87ef-d293-4e48-8d36-838d69ebce0f",
|
||||
"parameters": {
|
||||
"formId": "DuJHEGW5"
|
||||
},
|
||||
"credentials": {
|
||||
"typeformApi": "typeform"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"connections": {
|
||||
"IF": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Mattermost",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "NoOp",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AWS Comprehend": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "IF",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Typeform Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AWS Comprehend",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
{
|
||||
"id": "Q8On8rR6BkmPzDUd",
|
||||
"meta": {
|
||||
"instanceId": "f57770b08f6a574802832e927ed1b0063c627ffc5b95965abf0d4a7396150138"
|
||||
},
|
||||
"name": "chrome extension backend with AI",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "0f38fe62-36d9-43da-a992-a3981377e89e",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
-220,
|
||||
-20
|
||||
],
|
||||
"webhookId": "e9a97dd5-f1e7-4d5b-a6f1-be5f0c9eb96c",
|
||||
"parameters": {
|
||||
"path": "e9a97dd5-f1e7-4d5b-a6f1-be5f0c9eb96c",
|
||||
"options": {},
|
||||
"httpMethod": "POST",
|
||||
"responseMode": "responseNode"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "83959562-edf5-4d37-bd11-47186c6a31c7",
|
||||
"name": "OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
-40,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"text": "You are an expert financial analyst tasked with providing an advanced technical analyses of a stock or crypto currency chart provided. Your analysis will be based on various technical indicators and will provide simple insights for novice traders. Just explain to traders were you expect the market is moving. Also warn them this is not a binding advice. Make sure to explain everything in infant language.",
|
||||
"modelId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini",
|
||||
"cachedResultName": "GPT-4O-MINI"
|
||||
},
|
||||
"options": {},
|
||||
"resource": "image",
|
||||
"inputType": "base64",
|
||||
"operation": "analyze"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8MS1muoK4z86fxUs",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "c6f1f833-7ba3-49c5-86df-f586e6bb5975",
|
||||
"name": "Respond to Webhook",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"position": [
|
||||
140,
|
||||
-20
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"respondWith": "text",
|
||||
"responseBody": "={{ $json.content }}"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "e3a38a76-283b-4567-a8da-315ef1e2bc4f",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-260,
|
||||
-140
|
||||
],
|
||||
"parameters": {
|
||||
"width": 620,
|
||||
"height": 300,
|
||||
"content": "## N8N en OpenAI image analyser"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8e7e26db-8767-4727-ab0c-900b50a73411",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-80,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"height": 340,
|
||||
"content": "## AI prompt\nYou are an expert financial analyst tasked with providing an advanced technical analyses of a stock or crypto currency chart provided. Your analysis will be based on various technical indicators and will provide simple insights for novice traders. Just explain to traders were you expect the market is moving. Also warn them this is not a binding advice. Make sure to explain everything in infant language."
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": true,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "caf32442-e9c5-466a-8888-9abd2c1b3449",
|
||||
"connections": {
|
||||
"OpenAI": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "OpenAI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
476
Angie, Personal AI Assistant with Telegram Voice and Text.txt
Normal file
476
Angie, Personal AI Assistant with Telegram Voice and Text.txt
Normal file
@@ -0,0 +1,476 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "2723a3a635131edfcb16103f3d4dbaadf3658e386b4762989cbf49528dccbdbd"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "c70236ea-91ab-4e47-b6f6-63a70ede5d3c",
|
||||
"name": "Google Calendar",
|
||||
"type": "n8n-nodes-base.googleCalendarTool",
|
||||
"position": [
|
||||
1000,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"fields": "=items(summary, start(dateTime))",
|
||||
"timeMin": "={{$fromAI(\"date\",\"the date after which to fetch the messages in format YYYY-MM-DDTHH:MM:SS\")}}"
|
||||
},
|
||||
"calendar": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "derekcheungsa@gmail.com",
|
||||
"cachedResultName": "derekcheungsa@gmail.com"
|
||||
},
|
||||
"operation": "getAll"
|
||||
},
|
||||
"credentials": {
|
||||
"googleCalendarOAuth2Api": {
|
||||
"id": "qx8JdPX4I5Xk9c46",
|
||||
"name": "Google Calendar account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "d2287bea-de47-4180-8ee6-55d4ab1a89da",
|
||||
"name": "Window Buffer Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
760,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"sessionKey": "={{ $('Listen for incoming events').first().json.message.from.id }}",
|
||||
"sessionIdType": "customKey"
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "fa955731-86f6-4e4d-8604-dab5f52dee87",
|
||||
"name": "Get Email",
|
||||
"type": "n8n-nodes-base.gmailTool",
|
||||
"position": [
|
||||
880,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"filters": {
|
||||
"labelIds": [
|
||||
"INBOX",
|
||||
"UNREAD"
|
||||
],
|
||||
"readStatus": "unread",
|
||||
"receivedAfter": "={{$fromAI(\"date\",\"the date after which to fetch the messages in format YYYY-MM-DDTHH:MM:SS\")}}"
|
||||
},
|
||||
"operation": "getAll"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "tojOpzEqFprdxS46",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "46511f47-1687-4cbe-ae41-ceb205ed1f11",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
640,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4o-mini",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "5oYe8Cxj7liOPAKk",
|
||||
"name": "Derek T"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "64fe44db-af19-43eb-9ff1-de0a72a9e645",
|
||||
"name": "Listen for incoming events",
|
||||
"type": "n8n-nodes-base.telegramTrigger",
|
||||
"position": [
|
||||
-160,
|
||||
360
|
||||
],
|
||||
"webhookId": "322dce18-f93e-4f86-b9b1-3305519b7834",
|
||||
"parameters": {
|
||||
"updates": [
|
||||
"message"
|
||||
],
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "Ov00cT0t4h4AFtZ0",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e35c04ff-a050-4564-8c1b-5b22b556872f",
|
||||
"name": "Telegram",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"onError": "continueErrorOutput",
|
||||
"position": [
|
||||
1280,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.output }}",
|
||||
"chatId": "={{ $('Listen for incoming events').first().json.message.from.id }}",
|
||||
"additionalFields": {
|
||||
"parse_mode": "Markdown",
|
||||
"appendAttribution": false
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "Ov00cT0t4h4AFtZ0",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "e791d4f8-2c19-4c14-a71e-39a04f22e944",
|
||||
"name": "If",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
200,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "a0bf9719-4272-46f6-ab3b-eda6f7b44fd8",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "empty",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.message.text }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "5bd1788a-3d08-4eb3-8e03-3ce82f44d2a7",
|
||||
"name": "Speech to Text",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
620,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"resource": "audio",
|
||||
"operation": "transcribe"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "5oYe8Cxj7liOPAKk",
|
||||
"name": "Derek T"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "b67a2a93-517b-469e-aaa4-32c422710743",
|
||||
"name": "Voice or Text",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
40,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "text",
|
||||
"stringValue": "={{ $json?.message?.text || \"\" }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "8105c39f-9e87-44c4-9215-b3777f0b4164",
|
||||
"name": "Get Voice File",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
380,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"fileId": "={{ $('Listen for incoming events').item.json.message.voice.file_id }}",
|
||||
"resource": "file"
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "Ov00cT0t4h4AFtZ0",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "759b975f-d17c-4386-a5b3-12413f0361f4",
|
||||
"name": "Angie, AI Assistant 👩🏻🏫",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
780,
|
||||
360
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.text }}",
|
||||
"options": {
|
||||
"systemMessage": "=You are a helpful assistant.\n\nToday's date is {{ $now }}.\n\nGuidelines:\n- When fetching emails, filter out any promotional emails. \n- When summarizing emails, include Sender, Message date, subject, and brief summary of email.\n- if the user did not specify a date in the request assume they are asking for today\n- Use baserow tool to answer questions about tasks\n- When answering questions about calendar events, filter out events that don't apply to the question. For example, the question is about events for today, only reply with events for today. Don't mention future events if it's more than 1 week away"
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.6
|
||||
},
|
||||
{
|
||||
"id": "5537c777-f003-4673-b48a-4993a0c10520",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
20,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 496.25,
|
||||
"height": 278.75,
|
||||
"content": "## Process Telegram Request\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "40e92679-b47a-4213-bb23-3f8d086459f2",
|
||||
"name": "Tasks",
|
||||
"type": "n8n-nodes-base.baserowTool",
|
||||
"position": [
|
||||
1120,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"tableId": 372174,
|
||||
"databaseId": 146496,
|
||||
"additionalOptions": {}
|
||||
},
|
||||
"credentials": {
|
||||
"baserowApi": {
|
||||
"id": "jsgACn0VxAPoD0E2",
|
||||
"name": "Baserow account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "570a0647-b571-4ebc-9dfe-40244b5a0b2a",
|
||||
"name": "Contacts",
|
||||
"type": "n8n-nodes-base.baserowTool",
|
||||
"position": [
|
||||
1240,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"tableId": 372177,
|
||||
"databaseId": 146496,
|
||||
"descriptionType": "manual",
|
||||
"toolDescription": "Useful for getting contact information. For example emails or phone numbers.",
|
||||
"additionalOptions": {}
|
||||
},
|
||||
"credentials": {
|
||||
"baserowApi": {
|
||||
"id": "jsgACn0VxAPoD0E2",
|
||||
"name": "Baserow account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7fb1d95a-a8d6-4040-9271-5197296be7da",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-620,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 386.9292441979969,
|
||||
"height": 389.78268107403096,
|
||||
"content": "## Start here: Step-by Step Youtube Tutorial :star:\n\n[](https://youtu.be/pXjowPc6V2s)\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"If": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Voice File",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Angie, AI Assistant 👩🏻🏫",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Tasks": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Angie, AI Assistant 👩🏻🏫",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Contacts": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Angie, AI Assistant 👩🏻🏫",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Email": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Angie, AI Assistant 👩🏻🏫",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Voice or Text": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Voice File": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Speech to Text",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Speech to Text": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Angie, AI Assistant 👩🏻🏫",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Calendar": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Angie, AI Assistant 👩🏻🏫",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Angie, AI Assistant 👩🏻🏫",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "Angie, AI Assistant 👩🏻🏫",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Listen for incoming events": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Voice or Text",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Angie, AI Assistant 👩🏻🏫": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Telegram",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
368
Ask a human for help when the AI doesn_t know the answer.txt
Normal file
368
Ask a human for help when the AI doesn_t know the answer.txt
Normal file
@@ -0,0 +1,368 @@
|
||||
{
|
||||
"name": "Ask a human",
|
||||
"nodes": [
|
||||
{
|
||||
"id": "a60c8572-56c1-4bf3-8352-a6419a475887",
|
||||
"name": "Window Buffer Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
900,
|
||||
760
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "b4f2e26c-903b-46b8-bd8b-110fd64de9e4",
|
||||
"name": "Not sure?",
|
||||
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
|
||||
"position": [
|
||||
1120,
|
||||
760
|
||||
],
|
||||
"parameters": {
|
||||
"name": "dont_know_tool",
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "chatInput",
|
||||
"stringValue": "={{ $('Chat Trigger').item.json.chatInput }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"workflowId": "={{ $workflow.id}}",
|
||||
"description": "Use this tool if you don't know the answer to the user's question, or if you're not very confident about your answer."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "951cc691-b422-4ce6-901f-b7feb3afd1ad",
|
||||
"name": "Execute Workflow Trigger",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
540,
|
||||
1360
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "194ba9c0-e256-449a-8da7-ac5339123a99",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
500,
|
||||
1020
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1118.3459011229047,
|
||||
"height": 775.3931210698682,
|
||||
"content": "### Sub-workflow: Custom tool\nThe agent above can call this workflow. It checks if the user has supplied an email address. If they haven't it prompts them to provide one. If they have, it messages a customer support channel for help."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "38c6b363-45a7-4e72-9e40-8c0df3cc480f",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
500,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 927.5,
|
||||
"height": 486.5625,
|
||||
"content": "### Main workflow: AI agent using custom tool"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0389315b-e48d-4b00-b9a1-899302b1b094",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1060,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 197.45572294791873,
|
||||
"height": 179.21380662202682,
|
||||
"content": "**This tool calls the sub-workflow below**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fb11064a-4cf5-4110-9e39-af24a3225164",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
700,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"color": 2,
|
||||
"width": 150,
|
||||
"height": 213.44323866265472,
|
||||
"content": "**Set your credentials**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d689021d-0a46-4dff-a01a-0b01ecdd198b",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1020,
|
||||
1180
|
||||
],
|
||||
"parameters": {
|
||||
"color": 2,
|
||||
"width": 178.0499248677781,
|
||||
"height": 250.57252651663197,
|
||||
"content": "**Set your credentials and Slack details**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0926cd61-c0b8-4bae-ae65-9afd130d17cd",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
340,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 185.9375,
|
||||
"height": 214.8397420554627,
|
||||
"content": "## Try it out\n\nSelect **Chat** at the bottom and enter:\n\n_Hi! Please respond to this as if you don't know the answer to my query._"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cde69dfe-252e-4a05-8d56-fa79431df5d8",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1580,
|
||||
1600
|
||||
],
|
||||
"parameters": {
|
||||
"height": 144.50520156238127,
|
||||
"content": "## Next steps\n\nLearn more about [Advanced AI in n8n](https://docs.n8n.io/advanced-ai/)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "927b775a-47f6-4067-a1a5-5f13dea28e45",
|
||||
"name": "Chat Trigger",
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"position": [
|
||||
600,
|
||||
520
|
||||
],
|
||||
"webhookId": "785e0c0c-12e5-4249-9abe-47bb131975cb",
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "971e7b90-c2d8-4292-9da8-732d7d399f04",
|
||||
"name": "Prompt the user to provide an email",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1060,
|
||||
1520
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "response = {\"response\":\"I'm sorry I don't know the answer. Please repeat your question and include your email address so I can request help.\"};\nreturn response;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "6f5a21b3-c145-46c8-8e69-660100c4a6fc",
|
||||
"name": "Confirm that we've messaged a human",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
1300,
|
||||
1260
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "response = {\"response\": \"Thank you for getting in touch. I've messaged a human to help.\"}\nreturn response;"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "8b17da5e-e392-4028-91b0-bc02d34e46ed",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
820,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"systemMessage": "Try to answer the user's question. When you can't answer, or you're not confident of the answer, use the appropriate tool. When you use the dont_know_tool, respond with the message from the tool."
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "990ecd3b-6aa0-4b17-8d01-d606b9164fa8",
|
||||
"name": "Check if user has provided email",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
760,
|
||||
1360
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "5e21e7c5-db60-4111-bb17-c289ae0fc159",
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"operation": "regex"
|
||||
},
|
||||
"leftValue": "={{ $('Execute Workflow Trigger').item.json.chatInput }}",
|
||||
"rightValue": "/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9_-]+)/gi"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "d14da0ae-06ca-422b-b5b6-e7759e74c787",
|
||||
"name": "Message Slack for help",
|
||||
"type": "n8n-nodes-base.slack",
|
||||
"position": [
|
||||
1060,
|
||||
1260
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ \"A user had a question the bot couldn't answer. Here's their message: \" + $('Execute Workflow Trigger').item.json.chatInput }}",
|
||||
"select": "channel",
|
||||
"channelId": {
|
||||
"__rl": true,
|
||||
"mode": "name",
|
||||
"value": ""
|
||||
},
|
||||
"otherOptions": {}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "278391c7-6945-495e-a4f1-74fb8fcc3549",
|
||||
"name": "GPT4",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
740,
|
||||
740
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4",
|
||||
"options": {
|
||||
"temperature": 0.2
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"GPT4": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Not sure?": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Chat Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Message Slack for help": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Confirm that we've messaged a human",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute Workflow Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Check if user has provided email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Check if user has provided email": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Message Slack for help",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Prompt the user to provide an email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
408
Ask questions about a PDF using AI.txt
Normal file
408
Ask questions about a PDF using AI.txt
Normal file
@@ -0,0 +1,408 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "62b3b6db4f4d3641a1fa1da6dfb9699a19380a1f60cbc18fc75d6d145f35552b"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "40bb5497-d1d2-4eb7-b683-78b88c8d9230",
|
||||
"name": "Google Drive",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
496.83478320435574,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"fileId": {
|
||||
"__rl": true,
|
||||
"mode": "url",
|
||||
"value": "https://drive.google.com/file/d/11Koq9q53nkk0F5Y8eZgaWJUVR03I4-MM/view"
|
||||
},
|
||||
"options": {},
|
||||
"operation": "download"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "20",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "1323d520-1528-4a5a-9806-8f4f45306098",
|
||||
"name": "Recursive Character Text Splitter",
|
||||
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
|
||||
"position": [
|
||||
996.8347832043557,
|
||||
920
|
||||
],
|
||||
"parameters": {
|
||||
"chunkSize": 3000,
|
||||
"chunkOverlap": 200
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "796b155a-64e6-4a52-9168-a37c68077d99",
|
||||
"name": "Embeddings OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"position": [
|
||||
836.8347832043557,
|
||||
740
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "JCgD7807AQpe8Xge",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "dbe42c28-6f0b-4999-8372-0b42f6fb5916",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
260,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 978.0454109366399,
|
||||
"height": 806.6556079800943,
|
||||
"content": "### Load data into database\nFetch file from Google Drive, split it into chunks and insert into Pinecone index"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "43dc3736-834d-4322-8fd2-7826b0208c4b",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1520,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 654.1028019808174,
|
||||
"height": 806.8716167324012,
|
||||
"content": "### Chat with database\nEmbed the incoming chat message and use it retrieve relevant chunks from the vector store. These are passed to the model to formulate an answer "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "53b18460-8ad6-425a-a01f-c2295cfddde8",
|
||||
"name": "Default Data Loader",
|
||||
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
|
||||
"position": [
|
||||
996.8347832043557,
|
||||
740
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"dataType": "binary"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e729a021-eab3-48fa-a818-457efcaeebb2",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-20,
|
||||
740
|
||||
],
|
||||
"parameters": {
|
||||
"height": 264.61498034081166,
|
||||
"content": "## Try me out\n1. In Pinecone, create an index with 1536 dimensions and select it in *both* Pinecone nodes\n2. Click 'test workflow' at the bottom of the canvas to load data into the vector store\n3. Click 'chat' at the bottom of the canvas to ask questions about the data"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3e17c89c-620d-4892-b944-d792e48e3772",
|
||||
"name": "Question and Answer Chain",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainRetrievalQa",
|
||||
"position": [
|
||||
1560,
|
||||
521
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "516507f9-d0d9-4975-85d0-a7852ee41518",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1560,
|
||||
741
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "JCgD7807AQpe8Xge",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8b0a5d26-a60a-40ab-8200-72f542532096",
|
||||
"name": "Embeddings OpenAI2",
|
||||
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
|
||||
"position": [
|
||||
1700,
|
||||
1081
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "JCgD7807AQpe8Xge",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "07f61d20-cf50-48e8-9d34-92244af436cb",
|
||||
"name": "Vector Store Retriever",
|
||||
"type": "@n8n/n8n-nodes-langchain.retrieverVectorStore",
|
||||
"position": [
|
||||
1760,
|
||||
741
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0777de17-99a0-499a-b71f-245d5f76642e",
|
||||
"name": "Read Pinecone Vector Store",
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
|
||||
"position": [
|
||||
1700,
|
||||
921
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"pineconeIndex": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "test-index",
|
||||
"cachedResultName": "test-index"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"pineconeApi": {
|
||||
"id": "Pp5aPt4JWBkDOGqZ",
|
||||
"name": "PineconeApi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cc5e6897-9d0b-4352-a882-5dc23104bf97",
|
||||
"name": "Insert into Pinecone vector store",
|
||||
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
|
||||
"position": [
|
||||
856.8347832043557,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "insert",
|
||||
"options": {
|
||||
"clearNamespace": true
|
||||
},
|
||||
"pineconeIndex": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "test-index",
|
||||
"cachedResultName": "test-index"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"pineconeApi": {
|
||||
"id": "Pp5aPt4JWBkDOGqZ",
|
||||
"name": "PineconeApi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c358aa73-b60f-453f-a3ef-539faa98c9b5",
|
||||
"name": "When clicking 'Chat' button below",
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"position": [
|
||||
1360,
|
||||
521
|
||||
],
|
||||
"webhookId": "e259b6fe-b2a9-4dbc-98a4-9a160e7ac10c",
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d35db9e1-4efc-4980-9814-55fbe65e08fd",
|
||||
"name": "When clicking 'Test Workflow' button",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
76.83478320435574,
|
||||
520
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4c04f576-e834-467d-98b4-38a2d501d82f",
|
||||
"name": "Set Google Drive file URL",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
296,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "50025ff5-1b53-475f-b150-2aafef1c4c21",
|
||||
"name": "file_url",
|
||||
"type": "string",
|
||||
"value": "https://drive.google.com/file/d/11Koq9q53nkk0F5Y8eZgaWJUVR03I4-MM/view"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Google Drive": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Insert into Pinecone vector store",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Insert into Pinecone vector store",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Question and Answer Chain",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Embeddings OpenAI2": {
|
||||
"ai_embedding": [
|
||||
[
|
||||
{
|
||||
"node": "Read Pinecone Vector Store",
|
||||
"type": "ai_embedding",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Default Data Loader": {
|
||||
"ai_document": [
|
||||
[
|
||||
{
|
||||
"node": "Insert into Pinecone vector store",
|
||||
"type": "ai_document",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Vector Store Retriever": {
|
||||
"ai_retriever": [
|
||||
[
|
||||
{
|
||||
"node": "Question and Answer Chain",
|
||||
"type": "ai_retriever",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Google Drive file URL": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Google Drive",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Read Pinecone Vector Store": {
|
||||
"ai_vectorStore": [
|
||||
[
|
||||
{
|
||||
"node": "Vector Store Retriever",
|
||||
"type": "ai_vectorStore",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Recursive Character Text Splitter": {
|
||||
"ai_textSplitter": [
|
||||
[
|
||||
{
|
||||
"node": "Default Data Loader",
|
||||
"type": "ai_textSplitter",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking 'Chat' button below": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Question and Answer Chain",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking 'Test Workflow' button": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Google Drive file URL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1622
Author and Publish Blog Posts From Google Sheets.txt
Normal file
1622
Author and Publish Blog Posts From Google Sheets.txt
Normal file
File diff suppressed because it is too large
Load Diff
1271
Auto Categorise Outlook Emails with AI.txt
Normal file
1271
Auto Categorise Outlook Emails with AI.txt
Normal file
File diff suppressed because it is too large
Load Diff
214
Auto-Categorize blog posts in wordpress using A.I..txt
Normal file
214
Auto-Categorize blog posts in wordpress using A.I..txt
Normal file
@@ -0,0 +1,214 @@
|
||||
{
|
||||
"id": "caaf1WFANPKAikiH",
|
||||
"meta": {
|
||||
"instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Auto categorize wordpress template",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "2017403c-7496-48f8-a487-8a017c7adfe3",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
680,
|
||||
320
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "82ff288f-4234-4192-9046-33e5ffee5264",
|
||||
"name": "Wordpress",
|
||||
"type": "n8n-nodes-base.wordpress",
|
||||
"position": [
|
||||
1500,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"postId": "={{ $('Get All Wordpress Posts').item.json.id }}",
|
||||
"operation": "update",
|
||||
"updateFields": {
|
||||
"categories": "={{ $json.output }}"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"wordpressApi": {
|
||||
"id": "lGWPwxTdfPDDbFjj",
|
||||
"name": "Rumjahn.com wordpress"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "521deb22-62dd-4b5f-8b9a-aab9777821da",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
620,
|
||||
-100
|
||||
],
|
||||
"parameters": {
|
||||
"width": 504.88636363636317,
|
||||
"content": "## How to Auto-Categorize 82 Blog Posts in 2 Minutes using A.I. (No Coding Required)\n\n💡 Read the [case study here](https://rumjahn.com/how-to-use-a-i-to-categorize-wordpress-posts-and-streamline-your-content-organization-process/).\n\n📺 Watch the [youtube tutorial here](https://www.youtube.com/watch?v=IvQioioVqhw)\n\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4090d827-f8cd-47ef-ad4f-654ee58216f6",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
860,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 188.14814814814804,
|
||||
"height": 327.3400673400663,
|
||||
"content": "### Get wordpress posts\n\nTurn off return all if you're running into issues.\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "71585d54-fdcc-42a5-8a0e-0fac3adc1809",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1080,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 315.1464152082392,
|
||||
"height": 416.90235690235625,
|
||||
"content": "### A.I. Categorization\n\n1. you need to set up the categories first in wordpress\n\n2. Edit the message prompt and change the categories and category numbers"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "29354054-8600-4e45-99d0-6f30f779a505",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1480,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 171.64983164983155,
|
||||
"height": 269.59595959595947,
|
||||
"content": "### Update category"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d9fe6289-6b97-4830-80aa-754ac4d4b3e0",
|
||||
"name": "Get All Wordpress Posts",
|
||||
"type": "n8n-nodes-base.wordpress",
|
||||
"position": [
|
||||
900,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"operation": "getAll",
|
||||
"returnAll": true
|
||||
},
|
||||
"credentials": {
|
||||
"wordpressApi": {
|
||||
"id": "lGWPwxTdfPDDbFjj",
|
||||
"name": "Rumjahn.com wordpress"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ed40bf13-8294-4b4e-a8b6-5749989d3420",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
1080,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "XO3iT1iYT5Vod56X",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "dafeb935-532e-4067-9dfb-7e9a6bbc4e5a",
|
||||
"name": "AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
1100,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=You are an expert content strategist and taxonomy specialist with extensive experience in blog categorization and content organization.\n\nI will provide you with a blog post's title. Your task is to assign ONE primary category ID from this fixed list:\n\n13 = Content Creation\n14 = Digital Marketing\n15 = AI Tools\n17 = Automation & Integration\n18 = Productivity Tools\n19 = Analytics & Strategy\n\nAnalyze the title and return only the single most relevant category ID number that best represents the main focus of the post. While a post might touch on multiple topics, select the dominant theme that would be most useful for navigation purposes.\n\n{{ $json.title.rendered }}\n\nOutput only the category number",
|
||||
"options": {},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "2a753171-425f-4b5a-bd1b-8591ad2d142c",
|
||||
"connections": {
|
||||
"AI Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wordpress",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get All Wordpress Posts": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get All Wordpress Posts",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
326
⚡AI-Powered YouTube Video Summarization & Analysis.txt
Normal file
326
⚡AI-Powered YouTube Video Summarization & Analysis.txt
Normal file
@@ -0,0 +1,326 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "9320d08a-4868-4103-abdf-3f8f54a7a0a0",
|
||||
"name": "Webhook",
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"position": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"webhookId": "9024e29e-9080-4cf5-9a6b-0d918468f195",
|
||||
"parameters": {
|
||||
"path": "ytube",
|
||||
"options": {},
|
||||
"httpMethod": "POST",
|
||||
"responseMode": "responseNode"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "a5cc8922-8124-4269-9cfd-e891b29cc2b7",
|
||||
"name": "YouTube Transcript",
|
||||
"type": "n8n-nodes-youtube-transcription.youtubeTranscripter",
|
||||
"position": [
|
||||
800,
|
||||
0
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ff3c0fd1-36d8-4d64-b405-0600efd4d93b",
|
||||
"name": "Split Out",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
200,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "transcript"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "423276e0-81bf-487a-bbdd-26e9b84fa755",
|
||||
"name": "Respond to Webhook",
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"position": [
|
||||
1200,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "27344649-8029-48ae-867b-7363d904fc59",
|
||||
"name": "Telegram",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
1200,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.title }}\n{{ $json.youtubeUrl }}",
|
||||
"additionalFields": {
|
||||
"parse_mode": "HTML",
|
||||
"appendAttribution": false
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "230c0325-d22a-4070-9460-748a6fef48d5",
|
||||
"name": "Get YouTube URL",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
200,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "3ee42e4c-3cee-4934-97e7-64c96b5691ed",
|
||||
"name": "youtubeUrl",
|
||||
"type": "string",
|
||||
"value": "={{ $json.body.youtubeUrl }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "420e90c3-9dfa-4f41-825a-9874b5ebe43a",
|
||||
"name": "YouTube Video ID",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
400,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const extractYoutubeId = (url) => {\n // Regex pattern that matches both youtu.be and youtube.com URLs\n const pattern = /(?:youtube\\.com\\/(?:[^\\/]+\\/.+\\/|(?:v|e(?:mbed)?)\\/|.*[?&]v=)|youtu\\.be\\/)([^\"&?\\/\\s]{11})/;\n const match = url.match(pattern);\n return match ? match[1] : null;\n};\n\n// Input URL from previous node\nconst youtubeUrl = items[0].json.youtubeUrl; // Adjust this based on your workflow\n\n// Process the URL and return the video ID\nreturn [{\n json: {\n videoId: extractYoutubeId(youtubeUrl)\n }\n}];\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "a4171c3e-1ff2-40de-af7f-b3971a1ebe79",
|
||||
"name": "Get YouTube Video",
|
||||
"type": "n8n-nodes-base.youTube",
|
||||
"position": [
|
||||
600,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"videoId": "={{ $json.videoId }}",
|
||||
"resource": "video",
|
||||
"operation": "get"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "73e6bfc5-8b62-4880-acd4-292f2f692540",
|
||||
"name": "gpt-4o-mini",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
620,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ea14e296-b30c-46f7-b283-746822ae1af4",
|
||||
"name": "Summarize & Analyze Transcript",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
600,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Please analyze the given text and create a structured summary following these guidelines:\n\n1. Break down the content into main topics using Level 2 headers (##)\n2. Under each header:\n - List only the most essential concepts and key points\n - Use bullet points for clarity\n - Keep explanations concise\n - Preserve technical accuracy\n - Highlight key terms in bold\n3. Organize the information in this sequence:\n - Definition/Background\n - Main characteristics\n - Implementation details\n - Advantages/Disadvantages\n4. Format requirements:\n - Use markdown formatting\n - Keep bullet points simple (no nesting)\n - Bold important terms using **term**\n - Use tables for comparisons\n - Include relevant technical details\n\nPlease provide a clear, structured summary that captures the core concepts while maintaining technical accuracy.\n\nHere is the text: {{ $json.concatenated_text\n }}",
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.4
|
||||
},
|
||||
{
|
||||
"id": "90e3488f-f854-483e-9106-a5760d0c0457",
|
||||
"name": "Concatenate",
|
||||
"type": "n8n-nodes-base.summarize",
|
||||
"position": [
|
||||
400,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToSummarize": {
|
||||
"values": [
|
||||
{
|
||||
"field": "text",
|
||||
"separateBy": " ",
|
||||
"aggregation": "concatenate"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9c5c249c-5eeb-4433-ba93-ace4611f4858",
|
||||
"name": "Response Object",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
960,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "bf132004-6636-411f-9d85-0c696fda84c4",
|
||||
"name": "summary",
|
||||
"type": "string",
|
||||
"value": "={{ $json.text }}"
|
||||
},
|
||||
{
|
||||
"id": "63c8d0e3-685c-488a-9b45-363cf52479ea",
|
||||
"name": "topics",
|
||||
"type": "array",
|
||||
"value": "=[]"
|
||||
},
|
||||
{
|
||||
"id": "171f30cf-34e9-42f3-8735-814024bfde0b",
|
||||
"name": "title",
|
||||
"type": "string",
|
||||
"value": "={{ $('Get YouTube Video').item.json.snippet.title }}"
|
||||
},
|
||||
{
|
||||
"id": "7f26f5a3-e695-49d1-b1e8-9260c31f1b3d",
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"value": "={{ $('Get YouTube Video').item.json.snippet.description }}"
|
||||
},
|
||||
{
|
||||
"id": "d0594232-cb39-453c-b015-3b039c098e1f",
|
||||
"name": "id",
|
||||
"type": "string",
|
||||
"value": "={{ $('Get YouTube Video').item.json.id }}"
|
||||
},
|
||||
{
|
||||
"id": "17b6ca08-ce89-4467-bd25-0d2d182f7a8b",
|
||||
"name": "youtubeUrl",
|
||||
"type": "string",
|
||||
"value": "={{ $('Webhook').item.json.body.youtubeUrl }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get YouTube URL",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Concatenate",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Concatenate": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Summarize & Analyze Transcript",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"gpt-4o-mini": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Summarize & Analyze Transcript",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get YouTube URL": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "YouTube Video ID",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Response Object": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Telegram",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"YouTube Video ID": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get YouTube Video",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Summarize & Analyze Transcript": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Response Object",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
1301
🤖🧑_💻 AI Agent for Top n8n Creators Leaderboard Reporting.txt
Normal file
1301
🤖🧑_💻 AI Agent for Top n8n Creators Leaderboard Reporting.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,538 @@
|
||||
{
|
||||
"id": "QJZLBn9L6NbmjmLK",
|
||||
"meta": {
|
||||
"instanceId": "31e69f7f4a77bf465b805824e303232f0227212ae922d12133a0f96ffeab4fef"
|
||||
},
|
||||
"name": "🤖🧠 AI Agent Chatbot + LONG TERM Memory + Note Storage + Telegram",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "20a2d959-5412-447b-a2c4-7736b6b758b3",
|
||||
"name": "When chat message received",
|
||||
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
|
||||
"position": [
|
||||
-320,
|
||||
1600
|
||||
],
|
||||
"webhookId": "8ba8fa53-2c24-47a8-b4dd-67b88c106e3d",
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "de79c268-bac5-48ff-be4d-18f522861c22",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-100,
|
||||
1280
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 340,
|
||||
"height": 380,
|
||||
"content": "## Retrieve Long Term Memories\nGoogle Docs"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "000a94d1-57ce-4eec-a021-9123685d22bf",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1040,
|
||||
1840
|
||||
],
|
||||
"parameters": {
|
||||
"width": 280,
|
||||
"height": 380,
|
||||
"content": "## Save To Current Chat Memory (Optional)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1bf1cade-bb3e-450a-a531-9add259069df",
|
||||
"name": "Sticky Note9",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1360,
|
||||
1840
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 280,
|
||||
"height": 380,
|
||||
"content": "## Save Long Term Memories\nGoogle Docs"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8b30f207-8204-4548-8f51-38c387d98ae9",
|
||||
"name": "gpt-4o-mini",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
820,
|
||||
1900
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "jEMSvKmtYfzAkhe6",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "50271e59-6dd2-4f54-9b28-dd4a9f33ddc5",
|
||||
"name": "Chat Response",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
1440,
|
||||
1600
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "d6f68b1c-a6a6-44d4-8686-dc4dcdde4767",
|
||||
"name": "output",
|
||||
"type": "string",
|
||||
"value": "={{ $json.output }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "1064a2bf-bf74-44cd-ba8a-48f93700e887",
|
||||
"name": "Window Buffer Memory",
|
||||
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
|
||||
"position": [
|
||||
1140,
|
||||
2000
|
||||
],
|
||||
"parameters": {
|
||||
"sessionKey": "={{ $('When chat message received').item.json.sessionId }}",
|
||||
"sessionIdType": "customKey",
|
||||
"contextWindowLength": 50
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "280fe3b1-faca-41b6-be0e-2ab906cd1662",
|
||||
"name": "Save Long Term Memories",
|
||||
"type": "n8n-nodes-base.googleDocsTool",
|
||||
"position": [
|
||||
1460,
|
||||
2000
|
||||
],
|
||||
"parameters": {
|
||||
"actionsUi": {
|
||||
"actionFields": [
|
||||
{
|
||||
"text": "={ \n \"memory\": \"{{ $fromAI('memory') }}\",\n \"date\": \"{{ $now }}\"\n}",
|
||||
"action": "insert"
|
||||
}
|
||||
]
|
||||
},
|
||||
"operation": "update",
|
||||
"documentURL": "[Google Doc ID]",
|
||||
"descriptionType": "manual",
|
||||
"toolDescription": "Save Memory"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDocsOAuth2Api": {
|
||||
"id": "YWEHuG28zOt532MQ",
|
||||
"name": "Google Docs account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "37baa147-120a-40a8-b92f-df319fc4bc46",
|
||||
"name": "Retrieve Long Term Memories",
|
||||
"type": "n8n-nodes-base.googleDocs",
|
||||
"position": [
|
||||
20,
|
||||
1420
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "get",
|
||||
"documentURL": "[Google Doc ID]"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDocsOAuth2Api": {
|
||||
"id": "YWEHuG28zOt532MQ",
|
||||
"name": "Google Docs account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "b047a271-d2aa-4a26-b663-6a76d249824a",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
720,
|
||||
1840
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 280,
|
||||
"height": 380,
|
||||
"content": "## LLM"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "15bb5fd5-7dfe-4da9-830c-e1d905831640",
|
||||
"name": "Telegram Response",
|
||||
"type": "n8n-nodes-base.telegram",
|
||||
"position": [
|
||||
1440,
|
||||
1260
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.output }}",
|
||||
"chatId": "=1234567891",
|
||||
"additionalFields": {
|
||||
"parse_mode": "HTML",
|
||||
"appendAttribution": false
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"telegramApi": {
|
||||
"id": "pAIFhguJlkO3c7aQ",
|
||||
"name": "Telegram account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "8cc38a87-e214-4193-9fe6-ba4adc3d5530",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1360,
|
||||
1160
|
||||
],
|
||||
"parameters": {
|
||||
"width": 260,
|
||||
"height": 300,
|
||||
"content": "## Telegram \n(Optional)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "38121a81-d768-4bb0-a9e6-39de0906e026",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
680,
|
||||
1500
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 1320,
|
||||
"height": 780,
|
||||
"content": "## AI AGENT with Long Term Memory & Note Storage"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7d5d1466-b4c9-4055-a634-ea7025dc370a",
|
||||
"name": "DeepSeek-V3 Chat",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
820,
|
||||
2060
|
||||
],
|
||||
"parameters": {
|
||||
"model": "=deepseek-chat",
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "MSl7SdcvZe0SqCYI",
|
||||
"name": "deepseek"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "68303b67-2203-41e8-b370-220d884d2945",
|
||||
"name": "AI Tools Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
1060,
|
||||
1600
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $('When chat message received').item.json.chatInput }}",
|
||||
"options": {
|
||||
"systemMessage": "=## ROLE \nYou are a friendly, attentive, and helpful AI assistant. Your primary goal is to assist the user while maintaining a personalized and engaging interaction. \n\n---\n\n## RULES \n\n1. **Memory Management**: \n - When the user sends a new message, evaluate whether it contains noteworthy or personal information (e.g., preferences, habits, goals, or important events). \n - If such information is identified, use the **Save Memory** tool to store this data in memory. \n - Always send a meaningful response back to the user, even if your primary action was saving information. This response should not reveal that information was stored but should acknowledge or engage with the user’s input naturally. \n\n2. **Note Management**: \n - If the user provides information that is intended to be stored as a note (e.g., specific instructions, reminders, or standalone pieces of information), use the **Save Note** tool. \n - Notes should not be stored in memory using the **Save Memory** tool. \n - Ensure that notes are clear, concise, and accurately reflect the user’s input. \n\n3. **Context Awareness**: \n - Use stored memories and notes to provide contextually relevant and personalized responses. \n - Always consider the **date and time** when a memory or note was collected to ensure your responses are up-to-date and accurate.\n\n4. **User-Centric Responses**: \n - Tailor your responses based on the user's preferences and past interactions. \n - Be proactive in recalling relevant details from memory or notes when appropriate but avoid overwhelming the user with unnecessary information.\n\n5. **Privacy and Sensitivity**: \n - Handle all user data with care and sensitivity. Avoid making assumptions or sharing stored information unless it directly enhances the conversation or task at hand.\n - Never store passwords or usernames.\n\n6. **Fallback Responses**: \n - **IMPORTANT** If no specific task or question arises from the user’s message (e.g., when only saving information), respond in a way that keeps the conversation flowing naturally. For example: \n - Acknowledge their input: “Thanks for sharing that!” \n - Provide a friendly follow-up: “Is there anything else I can help you with today?” \n - DO NOT tell jokes as a fallback response.\n\n---\n\n## TOOLS \n\n### Save Memory \n- Use this tool to store summarized, concise, and meaningful information about the user. \n- Extract key details from user messages that could enhance future interactions (e.g., likes/dislikes, important dates, hobbies). \n- Ensure that the summary is clear and devoid of unnecessary details.\n\n### Save Note \n- Use this tool to store specific instructions, reminders, or standalone pieces of information provided by the user. \n- Notes should not include general personal preferences or habits meant for long-term memory storage. \n- Ensure that notes are concise and accurately reflect what the user wants to store.\n\n---\n\n## MEMORIES \n\n### Recent Noteworthy Memories \nHere are the most recent memories collected from the user, including their date and time of collection: \n\n**{{ $json.data[0].content }}**\n\n### Guidelines for Using Memories: \n- Prioritize recent memories but do not disregard older ones if they remain relevant. \n- Cross-reference memories to maintain consistency in your responses. For example, if a user shares conflicting preferences over time, clarify or adapt accordingly.\n\n---\n\n## NOTES \n\n### Recent Notes Collected from User: \nHere are the most recent notes collected from the user: \n\n**{{ $json.data[1].content }}**\n\n### Guidelines for Using Notes: \n- Use notes for tasks requiring specific instructions or reminders.\n- Do not mix note content with general memory content; keep them distinct.\n\n---\n\n## ADDITIONAL INSTRUCTIONS \n\n- Think critically before responding to ensure your answers are thoughtful and accurate. \n- Strive to build trust with the user by being consistent, reliable, and personable in your interactions. \n- Avoid robotic or overly formal language; aim for a conversational tone that aligns with being \"friendly and helpful.\" \n"
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.7,
|
||||
"alwaysOutputData": false
|
||||
},
|
||||
{
|
||||
"id": "a6741133-93a1-42f8-83b4-bc29b9f49ae2",
|
||||
"name": "Sticky Note10",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1680,
|
||||
1840
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 280,
|
||||
"height": 380,
|
||||
"content": "## Save Notes\nGoogle Docs"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "87c88d31-811d-4265-b44e-ab30a45ff88b",
|
||||
"name": "Save Notes",
|
||||
"type": "n8n-nodes-base.googleDocsTool",
|
||||
"position": [
|
||||
1780,
|
||||
2000
|
||||
],
|
||||
"parameters": {
|
||||
"actionsUi": {
|
||||
"actionFields": [
|
||||
{
|
||||
"text": "={ \n \"note\": \"{{ $fromAI('memory') }}\",\n \"date\": \"{{ $now }}\"\n}",
|
||||
"action": "insert"
|
||||
}
|
||||
]
|
||||
},
|
||||
"operation": "update",
|
||||
"documentURL": "[Google Doc ID]",
|
||||
"descriptionType": "manual",
|
||||
"toolDescription": "Save Notes"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDocsOAuth2Api": {
|
||||
"id": "YWEHuG28zOt532MQ",
|
||||
"name": "Google Docs account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "b9b97837-d6f2-4cef-89c4-9301973015df",
|
||||
"name": "Sticky Note11",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-100,
|
||||
1680
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 340,
|
||||
"height": 380,
|
||||
"content": "## Retrieve Notes\nGoogle Docs"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "0002a227-4240-4d3c-9a45-fc6e23fdc7f5",
|
||||
"name": "Retrieve Notes",
|
||||
"type": "n8n-nodes-base.googleDocs",
|
||||
"onError": "continueRegularOutput",
|
||||
"position": [
|
||||
20,
|
||||
1820
|
||||
],
|
||||
"parameters": {
|
||||
"operation": "get",
|
||||
"documentURL": "[Google Doc ID]"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDocsOAuth2Api": {
|
||||
"id": "YWEHuG28zOt532MQ",
|
||||
"name": "Google Docs account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "88f7024c-87d4-48b4-b6bb-f68c88202f56",
|
||||
"name": "Aggregate",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
520,
|
||||
1600
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"aggregate": "aggregateAllItemData"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "48d576fc-870a-441e-a7be-3056ef7e1d7a",
|
||||
"name": "Merge",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
340,
|
||||
1600
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 3
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"timezone": "America/Vancouver",
|
||||
"callerPolicy": "workflowsFromSameOwner",
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "8130e77c-ecbd-470e-afec-ec8728643e00",
|
||||
"connections": {
|
||||
"Merge": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "AI Tools Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Save Notes": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Tools Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"gpt-4o-mini": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "AI Tools Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"AI Tools Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Telegram Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Chat Response",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Retrieve Notes": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"DeepSeek-V3 Chat": {
|
||||
"ai_languageModel": [
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Telegram Response": {
|
||||
"main": [
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Window Buffer Memory": {
|
||||
"ai_memory": [
|
||||
[
|
||||
{
|
||||
"node": "AI Tools Agent",
|
||||
"type": "ai_memory",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Save Long Term Memories": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "AI Tools Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When chat message received": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Retrieve Long Term Memories",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Retrieve Notes",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Retrieve Long Term Memories": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user