Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "name": "deadpool",
- "nodes": [
- {
- "parameters": {
- "documentId": {
- "__rl": true,
- "value": "1oOdLgughloINf_YaHR9HMJhKjLnj3hJCI-xnkU-lTO0",
- "mode": "list",
- "cachedResultName": "deadpool",
- "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oOdLgughloINf_YaHR9HMJhKjLnj3hJCI-xnkU-lTO0/edit?usp=drivesdk"
- },
- "sheetName": {
- "__rl": true,
- "value": "gid=0",
- "mode": "list",
- "cachedResultName": "pool",
- "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oOdLgughloINf_YaHR9HMJhKjLnj3hJCI-xnkU-lTO0/edit#gid=0"
- },
- "options": {}
- },
- "type": "n8n-nodes-base.googleSheets",
- "typeVersion": 4.6,
- "position": [
- 20,
- -200
- ],
- "id": "16b486a2-6eb5-46ec-828f-92e66688db11",
- "name": "Google Sheets",
- "credentials": {
- "googleSheetsOAuth2Api": {
- "id": "URSghmjsrQrN812J",
- "name": "n8n sheets"
- }
- }
- },
- {
- "parameters": {
- "promptType": "define",
- "text": "=you are tasked with updating some data on a google sheet you will be given a list of famous people your job is to search the web using the tools provided and to return this data in the same format with the empty fields populated ,\n\nhere is how you should populate each field \n\nage:\ncurrent age of the famous person\ndead:\ntrue/false if the person is deceased\npoints:\nleave blank \nmodifier:\nif the person has or had a critical illness \ndepending on the severity you can choose to assign a score between 1 - 10 ,\n1 for something like the flu\n10 would be something like late stage cancer\nthis should be a number only, no additional text\n\nscore:\nleave blank\n{{ $json.data.toJsonString() }}\n",
- "hasOutputParser": true,
- "options": {}
- },
- "type": "@n8n/n8n-nodes-langchain.agent",
- "typeVersion": 2,
- "position": [
- 440,
- 100
- ],
- "id": "ea309361-7f01-466c-8b59-3da8b41566ab",
- "name": "AI Agent",
- "alwaysOutputData": true
- },
- {
- "parameters": {
- "model": {
- "__rl": true,
- "mode": "list",
- "value": "gpt-4o-mini"
- },
- "options": {}
- },
- "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
- "typeVersion": 1.2,
- "position": [
- 340,
- 320
- ],
- "id": "704a55d1-5888-470a-b08a-c3986e70eadb",
- "name": "OpenAI Chat Model",
- "credentials": {
- "openAiApi": {
- "id": "suKA95KSHigE4YhI",
- "name": "n8n openai"
- }
- }
- },
- {
- "parameters": {
- "options": {
- "prompt": "Instructions:\n--------------\n{instructions}\n--------------\nCompletion:\n--------------\n{completion}\n--------------\n\nAbove, the Completion did not satisfy the constraints given in the Instructions.\nError:\n--------------\n{error}\n--------------\n\nPlease try again. Please only respond with an answer that satisfies the constraints laid out in the Instructions:"
- }
- },
- "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
- "typeVersion": 1,
- "position": [
- 700,
- 320
- ],
- "id": "e0c1b83f-2817-4378-bd6d-c824898e41c5",
- "name": "Auto-fixing Output Parser"
- },
- {
- "parameters": {
- "model": {
- "__rl": true,
- "mode": "list",
- "value": "gpt-4o-mini"
- },
- "options": {}
- },
- "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
- "typeVersion": 1.2,
- "position": [
- 720,
- 520
- ],
- "id": "0a93e20f-22af-40cb-866d-94ce7147b0bb",
- "name": "OpenAI Chat Model1",
- "credentials": {
- "openAiApi": {
- "id": "suKA95KSHigE4YhI",
- "name": "n8n openai"
- }
- }
- },
- {
- "parameters": {
- "jsonSchemaExample": "[\n {\n \"row_number\": 2,\n \"player\": \"nick\",\n \"choice\": \"Clint Eastwood\",\n \"age\": \"\",\n \"dead\": \"\",\n \"points\": \"\",\n \"modifier\": \"\",\n \"score\": \"\"\n }\n]"
- },
- "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
- "typeVersion": 1.2,
- "position": [
- 840,
- 520
- ],
- "id": "898c8437-7c5a-4dd9-85d0-d11b0e193bad",
- "name": "Structured Output Parser"
- },
- {
- "parameters": {
- "aggregate": "aggregateAllItemData",
- "options": {}
- },
- "type": "n8n-nodes-base.aggregate",
- "typeVersion": 1,
- "position": [
- 240,
- -200
- ],
- "id": "ba169a52-d2ea-4dc5-8be9-07b2271d63b7",
- "name": "Aggregate"
- },
- {
- "parameters": {
- "fieldToSplitOut": "output",
- "options": {}
- },
- "type": "n8n-nodes-base.splitOut",
- "typeVersion": 1,
- "position": [
- 740,
- -140
- ],
- "id": "39f39bdd-6006-43aa-a8a6-0451101aff99",
- "name": "Split Out"
- },
- {
- "parameters": {},
- "type": "@n8n/n8n-nodes-langchain.toolWikipedia",
- "typeVersion": 1,
- "position": [
- 580,
- 320
- ],
- "id": "a3488a8a-0d46-4eec-a17f-60e9cfb282ac",
- "name": "Wikipedia1"
- },
- {
- "parameters": {
- "operation": "update",
- "documentId": {
- "__rl": true,
- "value": "1oOdLgughloINf_YaHR9HMJhKjLnj3hJCI-xnkU-lTO0",
- "mode": "list",
- "cachedResultName": "deadpool",
- "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oOdLgughloINf_YaHR9HMJhKjLnj3hJCI-xnkU-lTO0/edit?usp=drivesdk"
- },
- "sheetName": {
- "__rl": true,
- "value": "gid=0",
- "mode": "list",
- "cachedResultName": "pool",
- "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oOdLgughloINf_YaHR9HMJhKjLnj3hJCI-xnkU-lTO0/edit#gid=0"
- },
- "columns": {
- "mappingMode": "defineBelow",
- "value": {
- "player": "={{ $json.player }}",
- "age": "={{ $json.age }}",
- "dead": "={{ $json.dead }}",
- "points": "={{ $json.points }}",
- "modifier": "={{ $json.modifier }}",
- "choice": "={{ $json.choice }}",
- "row_number": "={{ $json.row_number }}"
- },
- "matchingColumns": [
- "row_number"
- ],
- "schema": [
- {
- "id": "player",
- "displayName": "player",
- "required": false,
- "defaultMatch": false,
- "display": true,
- "type": "string",
- "canBeUsedToMatch": true
- },
- {
- "id": "choice",
- "displayName": "choice",
- "required": false,
- "defaultMatch": false,
- "display": true,
- "type": "string",
- "canBeUsedToMatch": true
- },
- {
- "id": "age",
- "displayName": "age",
- "required": false,
- "defaultMatch": false,
- "display": true,
- "type": "string",
- "canBeUsedToMatch": true
- },
- {
- "id": "dead",
- "displayName": "dead",
- "required": false,
- "defaultMatch": false,
- "display": true,
- "type": "string",
- "canBeUsedToMatch": true
- },
- {
- "id": "points",
- "displayName": "points",
- "required": false,
- "defaultMatch": false,
- "display": true,
- "type": "string",
- "canBeUsedToMatch": true
- },
- {
- "id": "modifier",
- "displayName": "modifier",
- "required": false,
- "defaultMatch": false,
- "display": true,
- "type": "string",
- "canBeUsedToMatch": true
- },
- {
- "id": "score",
- "displayName": "score",
- "required": false,
- "defaultMatch": false,
- "display": true,
- "type": "string",
- "canBeUsedToMatch": true,
- "removed": true
- },
- {
- "id": "row_number",
- "displayName": "row_number",
- "required": false,
- "defaultMatch": false,
- "display": true,
- "type": "string",
- "canBeUsedToMatch": true,
- "readOnly": true,
- "removed": false
- }
- ],
- "attemptToConvertTypes": false,
- "convertFieldsToString": false
- },
- "options": {}
- },
- "type": "n8n-nodes-base.googleSheets",
- "typeVersion": 4.6,
- "position": [
- 900,
- -140
- ],
- "id": "4e959b5c-5849-4aee-9a47-d2c2d3a40936",
- "name": "Google Sheets1",
- "credentials": {
- "googleSheetsOAuth2Api": {
- "id": "URSghmjsrQrN812J",
- "name": "n8n sheets"
- }
- }
- },
- {
- "parameters": {
- "rule": {
- "interval": [
- {
- "triggerAtHour": 9
- }
- ]
- }
- },
- "type": "n8n-nodes-base.scheduleTrigger",
- "typeVersion": 1.2,
- "position": [
- -200,
- -200
- ],
- "id": "e066f676-afa8-452d-ac39-3b8015464644",
- "name": "Schedule Trigger"
- },
- {
- "parameters": {
- "pollTimes": {
- "item": [
- {
- "mode": "everyHour"
- }
- ]
- },
- "documentId": {
- "__rl": true,
- "value": "1oOdLgughloINf_YaHR9HMJhKjLnj3hJCI-xnkU-lTO0",
- "mode": "list",
- "cachedResultName": "deadpool",
- "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oOdLgughloINf_YaHR9HMJhKjLnj3hJCI-xnkU-lTO0/edit?usp=drivesdk"
- },
- "sheetName": {
- "__rl": true,
- "value": "gid=0",
- "mode": "list",
- "cachedResultName": "pool",
- "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1oOdLgughloINf_YaHR9HMJhKjLnj3hJCI-xnkU-lTO0/edit#gid=0"
- },
- "options": {}
- },
- "type": "n8n-nodes-base.googleSheetsTrigger",
- "typeVersion": 1,
- "position": [
- -200,
- 0
- ],
- "id": "b3c3d36d-24fa-4932-9336-9c39aa45c667",
- "name": "Google Sheets Trigger",
- "credentials": {
- "googleSheetsTriggerOAuth2Api": {
- "id": "B0cQOmnQ0GEIIwC1",
- "name": "Google Sheets Trigger account"
- }
- }
- },
- {
- "parameters": {
- "sessionIdType": "customKey",
- "sessionKey": "deadpool",
- "databaseName": "deadpoolchat"
- },
- "type": "@n8n/n8n-nodes-langchain.memoryMongoDbChat",
- "typeVersion": 1,
- "position": [
- 460,
- 320
- ],
- "id": "b2cdc507-f942-4f46-95d6-10224cda190d",
- "name": "MongoDB Chat Memory",
- "credentials": {
- "mongoDb": {
- "id": "WWhQi5jdjFDvNas0",
- "name": "MongoDB account"
- }
- }
- }
- ],
- "pinData": {},
- "connections": {
- "Google Sheets": {
- "main": [
- [
- {
- "node": "Aggregate",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "OpenAI Chat Model": {
- "ai_languageModel": [
- [
- {
- "node": "AI Agent",
- "type": "ai_languageModel",
- "index": 0
- }
- ]
- ]
- },
- "Auto-fixing Output Parser": {
- "ai_outputParser": [
- [
- {
- "node": "AI Agent",
- "type": "ai_outputParser",
- "index": 0
- }
- ]
- ]
- },
- "OpenAI Chat Model1": {
- "ai_languageModel": [
- [
- {
- "node": "Auto-fixing Output Parser",
- "type": "ai_languageModel",
- "index": 0
- }
- ]
- ]
- },
- "Structured Output Parser": {
- "ai_outputParser": [
- [
- {
- "node": "Auto-fixing Output Parser",
- "type": "ai_outputParser",
- "index": 0
- }
- ]
- ]
- },
- "Aggregate": {
- "main": [
- [
- {
- "node": "AI Agent",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "AI Agent": {
- "main": [
- [
- {
- "node": "Split Out",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Wikipedia1": {
- "ai_tool": [
- [
- {
- "node": "AI Agent",
- "type": "ai_tool",
- "index": 0
- }
- ]
- ]
- },
- "Split Out": {
- "main": [
- [
- {
- "node": "Google Sheets1",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Schedule Trigger": {
- "main": [
- [
- {
- "node": "Google Sheets",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "Google Sheets Trigger": {
- "main": [
- [
- {
- "node": "Aggregate",
- "type": "main",
- "index": 0
- }
- ]
- ]
- },
- "MongoDB Chat Memory": {
- "ai_memory": [
- [
- {
- "node": "AI Agent",
- "type": "ai_memory",
- "index": 0
- }
- ]
- ]
- }
- },
- "active": false,
- "settings": {
- "executionOrder": "v1"
- },
- "versionId": "5162ed6d-2abe-4bc5-adbb-931c48b303b8",
- "meta": {
- "templateCredsSetupCompleted": true,
- "instanceId": "9034845b6bdc6c0c4308f692312da9ec6921b2d28e50fa5f7c73b559a07dcac5"
- },
- "id": "SgYDspB2J1b1aJih",
- "tags": []
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement