Need help with this error

Hello fellow N8N users

I’m running into an error with a transfer of data between my AI agent and “execute an another workflow” All I need it is for the data to transfer over and have the next workflow start seamlessly. I’ve attached some photos for reference. This is a workflow for a LinkedIn lead scraper.

What can I correct here?

Thanks!

In the Lead Scraper subworkflow, add the necessary parameters :

Then in your agent tool will appear some fields as parameters that you need to fill (either expression or let AI define) :

Thanks for the response, I’m still running into the same problem. Lmk what I should change next

Without more context is impossible to guess … share your workflow, or at last an image with all the workflow , agent node settings , system prompt… etc.

If you wouldn’t mind I can share the workflow with you. That would be a lot faster then going back & forth over forum & screenshots. Dm me w a good email for you, I’d appreciate your time!

Best’

You can share it here as well ,open the workflow, press CTRL+A (select) then CTRL+C(copy), then here in a new post press the button </> , and in the black field CTRL+V(paste) , and here the workflow will be represented visually, and maybe some other users can give a try to help you.

1 Like

I appreciate that, I posted it here for further review & I made a new post for it as well. Thanks for the help!

{
“nodes”: [
{
“parameters”: {
“updates”: [
“message”
],
“additionalFields”: {}
},
“type”: “n8n-nodes-base.telegramTrigger”,
“typeVersion”: 1.2,
“position”: [
336,
-96
],
“id”: “72cc8729-a7ef-4398-a932-464e13f2bd08”,
“name”: “Telegram Trigger”,
“webhookId”: “b4d57b1f-3ff3-4086-af2b-5a7b59490da7”,
“credentials”: {
“telegramApi”: {
“id”: “IfRPyuE1hZw8sW7s”,
“name”: “Telegram account”
}
}
},
{
“parameters”: {
“rules”: {
“values”: [
{
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 2
},
“conditions”: [
{
“leftValue”: “={{ $json.message.voice.file_id }}”,
“rightValue”: “”,
“operator”: {
“type”: “string”,
“operation”: “exists”,
“singleValue”: true
},
“id”: “2990da8e-3ae6-4d60-a691-6cf132acac8e”
}
],
“combinator”: “and”
},
“renameOutput”: true,
“outputKey”: “Voice”
},
{
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 2
},
“conditions”: [
{
“id”: “0ad2cb04-84fd-4aa0-ac43-bca235e087f7”,
“leftValue”: “={{ $json.message.text }}”,
“rightValue”: “”,
“operator”: {
“type”: “string”,
“operation”: “exists”,
“singleValue”: true
}
}
],
“combinator”: “and”
},
“renameOutput”: true,
“outputKey”: “Text”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.switch”,
“typeVersion”: 3.3,
“position”: [
528,
-96
],
“id”: “ad6c9d58-ed4e-4b56-914b-645aa75339cc”,
“name”: “Switch”
},
{
“parameters”: {
“resource”: “file”,
“fileId”: “={{ $json.message.voice.file_id }}”,
“additionalFields”: {}
},
“type”: “n8n-nodes-base.telegram”,
“typeVersion”: 1.2,
“position”: [
736,
-192
],
“id”: “14d62a27-8825-42e5-86b5-6fae34e70fef”,
“name”: “Get a file”,
“webhookId”: “683f1e4a-8d24-428b-870d-7c1f82c3cc0a”,
“credentials”: {
“telegramApi”: {
“id”: “IfRPyuE1hZw8sW7s”,
“name”: “Telegram account”
}
}
},
{
“parameters”: {
“resource”: “audio”,
“operation”: “transcribe”,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.openAi”,
“typeVersion”: 2,
“position”: [
944,
-192
],
“id”: “05147c5e-ea8a-4aea-872e-a53c800440ee”,
“name”: “Transcribe a recording”,
“credentials”: {
“openAiApi”: {
“id”: “rVpQFSqzdL4d0nfB”,
“name”: “OpenAi account”
}
}
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “94fdd0ef-a5b5-4e22-ac43-385305407fe6”,
“name”: “text”,
“value”: “={{ $json.message.text }}”,
“type”: “string”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
800,
0
],
“id”: “66a36e21-4906-4b90-a9de-8fe353b333c7”,
“name”: “Edit Fields”
},
{
“parameters”: {
“promptType”: “define”,
“text”: “={{ $json.text }}”,
“options”: {
“systemMessage”: “# Overview\nYou are a lead generation agent, responsible for scraping and researching leads.\n\n# Tools\nleadScraping:\nUse this tool to scrape leads into a Google Sheet. Call this tool and transfer data even if you don’t have enough information to complete the desired JSON search query.\n\nLeadResearch:\nUse this tool to research a lead by their Linkedin URL.\n\nRules\n- Ask clarifying questions if you’re unsure about something.\n- Ask questions to gather enough information to satisfy the query for each of the tools.\n- You should introduce yourself as “Dorado Labs AI” and ask the user what leads they want to scrape today.\n- Always replace spaces with “+” in your search queries. For example, instead of “los angeles united states”, your query should be “los+angeles+united+states”.\n- You always need a LinkedIn URL to research a lead.\n- You can only research one person at a time.\n- Make sure you always call the tools “lead scraper” with correct JSON formatting, but don’t wrap the query in ‘’’’JSON’’’’.\n\nExample \n- Input: “Hi”\n- Output; "Hi, I’m Dorado Labs AI, which leads can I help you scrape today? Just tell me the locations, business and job titles and let me handle the rest!”\n• Input: "Let’s do \n Locations: \n - Chicago\nUnited States \n - Sydney Australia \n\n Business: \n - Financial Planners \n]\n- Output: “Awesome. I think you forgot the job titles. Which job titles should I search for?”\n- Input: “Only CEO’s please”\n- Call lead scraper tool with query: \n[\n {\n “location”: [\n “chicago+united+states”,\n “sydney+australia”\n ],\n “business”: [\n “financial+planners”,\n “mortgage+brokers”,\n “real+estate+agents”\n ],\n “job_Titles”: [\n “ceo”,\n “founder”,\n “owner”,\n “principal”\n ],\n \n “filters”: {\n “Company_Size”: “10-200”, \n “Industry_Keywords”: [\n “residential+real+estate”,\n “investment+properties”,\n “home+loans”,\n “wealth+management”\n ],\n “activity_Level”: “active”\n }\n }\n]”
}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 3,
“position”: [
1184,
-80
],
“id”: “4e1b15ee-3e18-4a08-8c06-49315d8ab263”,
“name”: “AI Agent”
},
{
“parameters”: {
“sessionIdType”: “customKey”,
“sessionKey”: “={{ $(‘Telegram Trigger’).item.json.message.chat.id }}”,
“contextWindowLength”: 10
},
“type”: “@n8n/n8n-nodes-langchain.memoryBufferWindow”,
“typeVersion”: 1.3,
“position”: [
1136,
208
],
“id”: “352a86be-b7a8-4151-b457-5ebe2fcdd46c”,
“name”: “Simple Memory”
},
{
“parameters”: {
“chatId”: “={{ $(‘Telegram Trigger’).item.json.message.chat.id }}”,
“text”: “={{$json.output}}”,
“additionalFields”: {
“appendAttribution”: false
}
},
“type”: “n8n-nodes-base.telegram”,
“typeVersion”: 1.2,
“position”: [
1536,
-80
],
“id”: “97c4a1c7-af90-4f0c-84ac-0ab1bca7b8ae”,
“name”: “Send a text message”,
“webhookId”: “851bffd6-cdb7-4214-9ee1-37e5d4a3e093”,
“credentials”: {
“telegramApi”: {
“id”: “IfRPyuE1hZw8sW7s”,
“name”: “Telegram account”
}
}
},
{
“parameters”: {
“model”: {
“__rl”: true,
“value”: “gpt-4.1-mini”,
“mode”: “list”,
“cachedResultName”: “gpt-4.1-mini”
},
“builtInTools”: {},
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatOpenAi”,
“typeVersion”: 1.3,
“position”: [
1008,
96
],
“id”: “e85e65fa-5766-4bba-b317-abf9ea24be56”,
“name”: “OpenAI Chat Model”,
“credentials”: {
“openAiApi”: {
“id”: “rVpQFSqzdL4d0nfB”,
“name”: “OpenAi account”
}
}
},
{
“parameters”: {
“description”: “=Call this tool to scrape leads once you have enough details about the search query.\n\nYour input must be in JSON Like this:\n\n[\n {\n “location”: [\n “location1+here”,\n “location2+here”,\n ],\n •••\n “business”: [\n “business1+here”,\n “business2+here”,\n ],\n •••\n “job_title”: [\n “title1+here”,\n “title2+here”,\n ]\n }\n]”,
“workflowId”: {
“__rl”: true,
“value”: “Vwp4R8NOYojieBLv”,
“mode”: “list”,
“cachedResultUrl”: “/workflow/Vwp4R8NOYojieBLv”,
“cachedResultName”: “Lead Scraper”
},
“workflowInputs”: {
“mappingMode”: “defineBelow”,
“value”: {
“Job titles”: “={{ /n8n-auto-generated-fromAI-override/ $fromAI(‘Job_titles’, , 'string') }}", "Locations": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Locations', , ‘string’) }}”
},
“matchingColumns”: ,
“schema”: [
{
“id”: “Job titles”,
“displayName”: “Job titles”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“canBeUsedToMatch”: true,
“type”: “string”,
“removed”: false
},
{
“id”: “Locations”,
“displayName”: “Locations”,
“required”: false,
“defaultMatch”: false,
“display”: true,
“canBeUsedToMatch”: true,
“type”: “string”,
“removed”: false
}
],
“attemptToConvertTypes”: false,
“convertFieldsToString”: false
}
},
“type”: “@n8n/n8n-nodes-langchain.toolWorkflow”,
“typeVersion”: 2.2,
“position”: [
1280,
208
],
“id”: “20bae4b0-864e-49ad-90d8-7b53bccd7eda”,
“name”: “Lead Scraper”
},
{
“parameters”: {
“description”: “{\n“LinkedinURL”: “[URL-HERE]”\n}”,
“workflowId”: {
“__rl”: true,
“value”: “3vY5hdZw5Agb8YmF”,
“mode”: “list”,
“cachedResultUrl”: “/workflow/3vY5hdZw5Agb8YmF”,
“cachedResultName”: “Lead Research”
},
“workflowInputs”: {
“mappingMode”: “defineBelow”,
“value”: {},
“matchingColumns”: ,
“schema”: ,
“attemptToConvertTypes”: false,
“convertFieldsToString”: false
}
},
“type”: “@n8n/n8n-nodes-langchain.toolWorkflow”,
“typeVersion”: 2.2,
“position”: [
1424,
208
],
“id”: “9cde3bf6-ec36-4cfb-9d91-877d9d4868ba”,
“name”: “Lead Research”
},
{
“parameters”: {
“workflowInputs”: {
“values”: [
{
“name”: “Job Titles”
},
{
“name”: “Location”
}
]
}
},
“type”: “n8n-nodes-base.executeWorkflowTrigger”,
“typeVersion”: 1.1,
“position”: [
320,
384
],
“id”: “633e5ed5-a65e-4aa3-84e3-4fcefcf3d889”,
“name”: “When Executed by Another Workflow”
}
],
“connections”: {
“Telegram Trigger”: {
“main”: [
[
{
“node”: “Switch”,
“type”: “main”,
“index”: 0
}
]
]
},
“Switch”: {
“main”: [
[
{
“node”: “Get a file”,
“type”: “main”,
“index”: 0
}
],
[
{
“node”: “Edit Fields”,
“type”: “main”,
“index”: 0
}
]
]
},
“Get a file”: {
“main”: [
[
{
“node”: “Transcribe a recording”,
“type”: “main”,
“index”: 0
}
]
]
},
“Transcribe a recording”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“Edit Fields”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“AI Agent”: {
“main”: [
[
{
“node”: “Send a text message”,
“type”: “main”,
“index”: 0
}
]
]
},
“Simple Memory”: {
“ai_memory”: [
[
{
“node”: “AI Agent”,
“type”: “ai_memory”,
“index”: 0
}
]
]
},
“OpenAI Chat Model”: {
“ai_languageModel”: [
[
{
“node”: “AI Agent”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“Lead Scraper”: {
“ai_tool”: [
[
{
“node”: “AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
]
},
“Lead Research”: {
“ai_tool”: [
[
{
“node”: “AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “589c1dea4c1d3a8cc66a0df96bc08f24acff19e298393a525ab49b9faea2c5b7”
}
}