Base de conocimientos de Outlook y Notion
Este es unautomatización que contiene 32 nodos.Utiliza principalmente nodos como If, Merge, Notion, SplitOut, NotionTrigger. Construir una base de conocimientos lista para IA desde Outlook y Notion usando Pinecone y GPT-4
- •Clave de API de Notion
- •Clave de API de OpenAI
- •Clave de API de Pinecone
Nodos utilizados (32)
Categoría
{
"id": "xA9J9DImm49HURF3",
"meta": {
"instanceId": "6f81894254c2852bfe28b07fc1f6652b03481706dd714d6609cc88e8521956d2",
"templateCredsSetupCompleted": true
},
"name": "Outlook and Notion knowledge base",
"tags": [],
"nodes": [
{
"id": "72f3f684-2c5f-4660-8adb-19174e82ef32",
"name": "Activador de Microsoft Outlook",
"type": "n8n-nodes-base.microsoftOutlookTrigger",
"position": [
544,
208
],
"parameters": {
"output": "raw",
"filters": {
"foldersToInclude": [
"AQMkADAwATMwMAItMmYwYS01YjkyLTAwAi0wMAoALgAAAxOU_onpis9NmFJuGkXBI8UBAGQVofbxt59GpSnWTziHe9kABPqpFlEAAAA="
]
},
"options": {
"downloadAttachments": true
},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
}
},
"credentials": {
"microsoftOutlookOAuth2Api": {
"id": "Xszt4lrcCVADugZs",
"name": "Microsoft Outlook account"
}
},
"typeVersion": 1
},
{
"id": "82792010-19d2-491d-927e-610ab1cccb28",
"name": "Obtener múltiples mensajes",
"type": "n8n-nodes-base.microsoftOutlook",
"position": [
752,
208
],
"webhookId": "62988410-1616-4217-8ef2-0107e7677407",
"parameters": {
"output": "raw",
"options": {},
"filtersUI": {
"values": {
"filters": {
"custom": "=conversationId eq '{{ $json.conversationId }}'"
}
}
},
"operation": "getAll",
"returnAll": true
},
"credentials": {
"microsoftOutlookOAuth2Api": {
"id": "Xszt4lrcCVADugZs",
"name": "Microsoft Outlook account"
}
},
"typeVersion": 2
},
{
"id": "256a55fc-6625-4388-9389-94184848c544",
"name": "Pinecone Vector Store",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
1216,
208
],
"parameters": {
"mode": "insert",
"options": {
"pineconeNamespace": "emails"
},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "n8n",
"cachedResultName": "n8n"
},
"embeddingBatchSize": 50
},
"credentials": {
"pineconeApi": {
"id": "4rb1dBTjp60vz23a",
"name": "PineconeApi account"
}
},
"typeVersion": 1.3
},
{
"id": "3c1cfd55-b6e1-4adf-8ee1-c25b5202018b",
"name": "Embeddings Cohere",
"type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
"position": [
1168,
384
],
"parameters": {
"modelName": "embed-multilingual-v3.0"
},
"credentials": {
"cohereApi": {
"id": "Mfs4k8hXGehRHvHh",
"name": "CohereApi account"
}
},
"typeVersion": 1
},
{
"id": "d8a46692-2af5-477c-acb1-1b6390c0c359",
"name": "Default Data Loader",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
1312,
400
],
"parameters": {
"options": {},
"jsonData": "={{ $json.body.content }}",
"jsonMode": "expressionData",
"textSplittingMode": "custom"
},
"typeVersion": 1.1
},
{
"id": "bda4ca91-117f-4527-b25d-c85908e50892",
"name": "Recursive Character Text Splitter",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
1392,
544
],
"parameters": {
"options": {},
"chunkOverlap": 100
},
"typeVersion": 1
},
{
"id": "ba74aea5-ec1c-4f63-92d8-98d6bb65805b",
"name": "Notion Trigger",
"type": "n8n-nodes-base.notionTrigger",
"position": [
160,
-16
],
"parameters": {
"simple": false,
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"databaseId": {
"__rl": true,
"mode": "list",
"value": "6ec8b622-d5bf-4c6a-80d9-7d668494f82b",
"cachedResultUrl": "https://www.notion.so/6ec8b622d5bf4c6a80d97d668494f82b",
"cachedResultName": "test database"
}
},
"credentials": {
"notionApi": {
"id": "6dqyQ9MMtK9ou9ab",
"name": "Notion account"
}
},
"typeVersion": 1
},
{
"id": "7dcc8513-8db2-4f86-828f-35d02df20276",
"name": "Pinecone Vector Store1",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
160,
192
],
"parameters": {
"mode": "insert",
"options": {
"pineconeNamespace": "knkowledgebase"
},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "n8n",
"cachedResultName": "n8n"
},
"embeddingBatchSize": 50
},
"credentials": {
"pineconeApi": {
"id": "4rb1dBTjp60vz23a",
"name": "PineconeApi account"
}
},
"typeVersion": 1.3
},
{
"id": "fb314465-be01-4153-ae6b-21c20b24bff2",
"name": "Embeddings Cohere1",
"type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
"position": [
112,
368
],
"parameters": {
"modelName": "embed-multilingual-v3.0"
},
"credentials": {
"cohereApi": {
"id": "Mfs4k8hXGehRHvHh",
"name": "CohereApi account"
}
},
"typeVersion": 1
},
{
"id": "8eb8639d-ef28-46e9-ab53-a1f80439e7d0",
"name": "Default Data Loader1",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
256,
384
],
"parameters": {
"options": {},
"jsonData": "={{ $json.plain_text }}",
"jsonMode": "expressionData",
"textSplittingMode": "custom"
},
"typeVersion": 1.1
},
{
"id": "11de6d57-20fc-4992-91e5-86bdb33ce145",
"name": "Recursive Character Text Splitter1",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
352,
544
],
"parameters": {
"options": {},
"chunkOverlap": 100
},
"typeVersion": 1
},
{
"id": "8ac03efa-6af8-4139-837d-05adc99f1c79",
"name": "Eliminar Duplicados",
"type": "n8n-nodes-base.removeDuplicates",
"position": [
960,
208
],
"parameters": {
"compare": "selectedFields",
"options": {},
"fieldsToCompare": "body.content"
},
"typeVersion": 2
},
{
"id": "8a1a6569-f578-4037-8464-728a52ea0d3e",
"name": "Separar Salida",
"type": "n8n-nodes-base.splitOut",
"position": [
1312,
-16
],
"parameters": {
"options": {},
"fieldToSplitOut": "paragraph.text"
},
"typeVersion": 1
},
{
"id": "36e5c0f6-7c24-442c-95c2-f88d23c1c83f",
"name": "Obtener múltiples bloques secundarios",
"type": "n8n-nodes-base.notion",
"position": [
368,
-16
],
"parameters": {
"blockId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"resource": "block",
"operation": "getAll",
"returnAll": true,
"simplifyOutput": false,
"fetchNestedBlocks": true
},
"credentials": {
"notionApi": {
"id": "6dqyQ9MMtK9ou9ab",
"name": "Notion account"
}
},
"typeVersion": 2.2
},
{
"id": "8015c6e9-7cd8-4e09-86ee-206cae5e2ab6",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
576,
-16
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "79a2b3f0-09f8-42b5-911d-85a27d04f121",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.type }}",
"rightValue": "synced_block"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "d4780200-8ee0-4fe4-bbaf-defac32f558f",
"name": "Obtener múltiples bloques secundarios1",
"type": "n8n-nodes-base.notion",
"position": [
848,
-144
],
"parameters": {
"blockId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.synced_block.synced_from.block_id }}"
},
"resource": "block",
"operation": "getAll",
"returnAll": true,
"simplifyOutput": false,
"fetchNestedBlocks": true
},
"credentials": {
"notionApi": {
"id": "6dqyQ9MMtK9ou9ab",
"name": "Notion account"
}
},
"typeVersion": 2.2
},
{
"id": "d81a6b16-36dd-4b3a-b1f8-937bf0a6f67a",
"name": "Eliminar Duplicados1",
"type": "n8n-nodes-base.removeDuplicates",
"position": [
1520,
-16
],
"parameters": {
"compare": "selectedFields",
"options": {},
"fieldsToCompare": "plain_text"
},
"typeVersion": 2
},
{
"id": "c66e5310-f1b7-4591-9f62-a3c10b12d494",
"name": "Combinar",
"type": "n8n-nodes-base.merge",
"position": [
1104,
-16
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "437d367e-b497-4a47-974a-ca2e992723b7",
"name": "Nota Adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
192
],
"parameters": {
"width": 1056,
"height": 496,
"content": ""
},
"typeVersion": 1
},
{
"id": "284ec18f-19dc-4168-b209-19b9f4869ad6",
"name": "Nota Adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
560,
448
],
"parameters": {
"color": 5,
"width": 496,
"height": 208,
"content": "## Outlook knowledge base\n\nthis workflow triggers when you put an email or thread into a specific folder (e.g knoledgebase). It captures the content of the thread, remove duplicates if any and store it in Pinecone vector store in a namespace called \"emails\" so your agent can look at those emails and understand the tone, looking for information and draft answers based on it's knowledge base and previous emails."
},
"typeVersion": 1
},
{
"id": "8e739795-7835-4739-ba22-b55aa7cdb646",
"name": "Agente de IA",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1744,
432
],
"parameters": {
"options": {
"systemMessage": "You are a helpful assistant. Your role is to answer the customer questions based on the knowledge base you have access to through the tools you have. If you don't find the answer in the knowledge base or previous emails don't come up with answer just tell the customer that you don't have this information."
}
},
"typeVersion": 2.2
},
{
"id": "6d9a6b4c-6ba1-4c2f-9dbd-a7ee2c7ae881",
"name": "Cuando se recibe mensaje de chat",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
1696,
208
],
"webhookId": "97cff992-376f-49c6-8b57-34236a096e5d",
"parameters": {
"options": {}
},
"typeVersion": 1.3
},
{
"id": "85c8d7d3-e978-49f1-b4c5-ed0fcd9922af",
"name": "Pinecone Vector Store2",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
2000,
640
],
"parameters": {
"mode": "retrieve-as-tool",
"options": {
"pineconeNamespace": "knowledgebase"
},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "n8n",
"cachedResultName": "n8n"
},
"toolDescription": "use this tool to look at your knowledge base."
},
"credentials": {
"pineconeApi": {
"id": "4rb1dBTjp60vz23a",
"name": "PineconeApi account"
}
},
"typeVersion": 1.3
},
{
"id": "2e1dad6b-adc1-43df-ab9a-af763fdb6021",
"name": "Embeddings Cohere2",
"type": "@n8n/n8n-nodes-langchain.embeddingsCohere",
"position": [
1936,
784
],
"parameters": {
"modelName": "embed-multilingual-v3.0"
},
"credentials": {
"cohereApi": {
"id": "Mfs4k8hXGehRHvHh",
"name": "CohereApi account"
}
},
"typeVersion": 1
},
{
"id": "ce453bb0-fdb7-4170-9a15-2a3a154e12cb",
"name": "Pinecone Vector Store3",
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"position": [
1744,
640
],
"parameters": {
"mode": "retrieve-as-tool",
"options": {
"pineconeNamespace": "emails"
},
"pineconeIndex": {
"__rl": true,
"mode": "list",
"value": "n8n",
"cachedResultName": "n8n"
},
"toolDescription": "use this tool to look at similar emails."
},
"credentials": {
"pineconeApi": {
"id": "4rb1dBTjp60vz23a",
"name": "PineconeApi account"
}
},
"typeVersion": 1.3
},
{
"id": "7329af25-ba0d-445d-9318-fb63991a19e9",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1632,
640
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "6ljetIXS9Oig1w9v",
"name": "OpenAi cred"
}
},
"typeVersion": 1.2
},
{
"id": "e0aee61b-469e-40cb-b609-8e4f641cecc8",
"name": "Nota Adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1584,
192
],
"parameters": {
"color": 4,
"width": 688,
"height": 736,
"content": ""
},
"typeVersion": 1
},
{
"id": "39399055-a8e4-4dd7-8ac2-e46868d9aa6a",
"name": "Nota Adhesiva3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1936,
208
],
"parameters": {
"color": 5,
"width": 272,
"height": 208,
"content": "## Customer Support Agent\n\nit uses the knowledge base and emails you put into Pinecone vector store as it's reference to answer questions."
},
"typeVersion": 1
},
{
"id": "17553913-1e31-4bbd-8acb-3d8586761814",
"name": "Nota Adhesiva4",
"type": "n8n-nodes-base.stickyNote",
"position": [
160,
-240
],
"parameters": {
"color": 5,
"width": 496,
"height": 192,
"content": "## Notion knowledge base\n\nthis workflow triggers when you add a page to your Notion database, it captures the content of the page and store it in Pinecone vector store in a namespace called knowledgebase. The agent can access this data as it's knowledge base, get information from it and answers the question based on the information it has."
},
"typeVersion": 1
},
{
"id": "31ff5834-459d-4081-a20f-3c3965469c4d",
"name": "Nota Adhesiva5",
"type": "n8n-nodes-base.stickyNote",
"position": [
64,
-256
],
"parameters": {
"color": 3,
"width": 816,
"height": 960,
"content": ""
},
"typeVersion": 1
},
{
"id": "044d57f3-cb61-4f1c-a584-fc1b2aed3c59",
"name": "Nota Adhesiva6",
"type": "n8n-nodes-base.stickyNote",
"position": [
880,
-256
],
"parameters": {
"color": 3,
"width": 800,
"height": 432,
"content": ""
},
"typeVersion": 1
},
{
"id": "a7a7243c-19b4-4006-a8a0-3c28e542e66f",
"name": "Memoria Simple",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1712,
784
],
"parameters": {},
"typeVersion": 1.3
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "0f6bfeb3-c551-41ef-9cce-351a0ce86f09",
"connections": {
"8015c6e9-7cd8-4e09-86ee-206cae5e2ab6": {
"main": [
[
{
"node": "d4780200-8ee0-4fe4-bbaf-defac32f558f",
"type": "main",
"index": 0
}
],
[
{
"node": "c66e5310-f1b7-4591-9f62-a3c10b12d494",
"type": "main",
"index": 1
}
]
]
},
"c66e5310-f1b7-4591-9f62-a3c10b12d494": {
"main": [
[
{
"node": "8a1a6569-f578-4037-8464-728a52ea0d3e",
"type": "main",
"index": 0
}
]
]
},
"8a1a6569-f578-4037-8464-728a52ea0d3e": {
"main": [
[
{
"node": "d81a6b16-36dd-4b3a-b1f8-937bf0a6f67a",
"type": "main",
"index": 0
}
]
]
},
"a7a7243c-19b4-4006-a8a0-3c28e542e66f": {
"ai_memory": [
[
{
"node": "8e739795-7835-4739-ba22-b55aa7cdb646",
"type": "ai_memory",
"index": 0
}
]
]
},
"ba74aea5-ec1c-4f63-92d8-98d6bb65805b": {
"main": [
[
{
"node": "36e5c0f6-7c24-442c-95c2-f88d23c1c83f",
"type": "main",
"index": 0
}
]
]
},
"3c1cfd55-b6e1-4adf-8ee1-c25b5202018b": {
"ai_embedding": [
[
{
"node": "256a55fc-6625-4388-9389-94184848c544",
"type": "ai_embedding",
"index": 0
}
]
]
},
"82792010-19d2-491d-927e-610ab1cccb28": {
"main": [
[
{
"node": "8ac03efa-6af8-4139-837d-05adc99f1c79",
"type": "main",
"index": 0
}
]
]
},
"7329af25-ba0d-445d-9318-fb63991a19e9": {
"ai_languageModel": [
[
{
"node": "8e739795-7835-4739-ba22-b55aa7cdb646",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"8ac03efa-6af8-4139-837d-05adc99f1c79": {
"main": [
[
{
"node": "256a55fc-6625-4388-9389-94184848c544",
"type": "main",
"index": 0
}
]
]
},
"fb314465-be01-4153-ae6b-21c20b24bff2": {
"ai_embedding": [
[
{
"node": "7dcc8513-8db2-4f86-828f-35d02df20276",
"type": "ai_embedding",
"index": 0
}
]
]
},
"2e1dad6b-adc1-43df-ab9a-af763fdb6021": {
"ai_embedding": [
[
{
"node": "85c8d7d3-e978-49f1-b4c5-ed0fcd9922af",
"type": "ai_embedding",
"index": 0
},
{
"node": "ce453bb0-fdb7-4170-9a15-2a3a154e12cb",
"type": "ai_embedding",
"index": 0
}
]
]
},
"d81a6b16-36dd-4b3a-b1f8-937bf0a6f67a": {
"main": [
[
{
"node": "7dcc8513-8db2-4f86-828f-35d02df20276",
"type": "main",
"index": 0
}
]
]
},
"d8a46692-2af5-477c-acb1-1b6390c0c359": {
"ai_document": [
[
{
"node": "256a55fc-6625-4388-9389-94184848c544",
"type": "ai_document",
"index": 0
}
]
]
},
"8eb8639d-ef28-46e9-ab53-a1f80439e7d0": {
"ai_document": [
[
{
"node": "7dcc8513-8db2-4f86-828f-35d02df20276",
"type": "ai_document",
"index": 0
}
]
]
},
"36e5c0f6-7c24-442c-95c2-f88d23c1c83f": {
"main": [
[
{
"node": "8015c6e9-7cd8-4e09-86ee-206cae5e2ab6",
"type": "main",
"index": 0
}
]
]
},
"d4780200-8ee0-4fe4-bbaf-defac32f558f": {
"main": [
[
{
"node": "c66e5310-f1b7-4591-9f62-a3c10b12d494",
"type": "main",
"index": 0
}
]
]
},
"85c8d7d3-e978-49f1-b4c5-ed0fcd9922af": {
"ai_tool": [
[
{
"node": "8e739795-7835-4739-ba22-b55aa7cdb646",
"type": "ai_tool",
"index": 0
}
]
]
},
"ce453bb0-fdb7-4170-9a15-2a3a154e12cb": {
"ai_tool": [
[
{
"node": "8e739795-7835-4739-ba22-b55aa7cdb646",
"type": "ai_tool",
"index": 0
}
]
]
},
"72f3f684-2c5f-4660-8adb-19174e82ef32": {
"main": [
[
{
"node": "82792010-19d2-491d-927e-610ab1cccb28",
"type": "main",
"index": 0
}
]
]
},
"6d9a6b4c-6ba1-4c2f-9dbd-a7ee2c7ae881": {
"main": [
[
{
"node": "8e739795-7835-4739-ba22-b55aa7cdb646",
"type": "main",
"index": 0
}
]
]
},
"bda4ca91-117f-4527-b25d-c85908e50892": {
"ai_textSplitter": [
[
{
"node": "d8a46692-2af5-477c-acb1-1b6390c0c359",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"11de6d57-20fc-4992-91e5-86bdb33ce145": {
"ai_textSplitter": [
[
{
"node": "8eb8639d-ef28-46e9-ab53-a1f80439e7d0",
"type": "ai_textSplitter",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Avanzado
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Yasser Sami
@yassersamiAI Automation Architect building smart workflows with n8n. I help businesses save time by automating processes, connecting apps, and integrating AI. My focus is on creating efficient, reliable systems that streamline operations and reduce manual work.
Compartir este flujo de trabajo