Skip to content
AI Agent subworkflo...
 
Notifications
Clear all

AI Agent subworkflow data not being received

7 Posts
4 Users
0 Reactions
4 Views
MoritzSchoelderle
(@moritzschoelderle)
Posts: 7
Active Member
Topic starter
 

I have a workflow with an AI Agent that calls a subworkflow, passing information from a previous subworkflow. When I initiate an execution, the information is provided in the request to the subworkflow, but the subworkflow does not seem to receive it.

My agent workflow:
json
{
"nodes": [
{
"parameters": {
"promptType": "define",
"text": "=You are a helpful assistant for Lead Generation in a company specialized in AI Automation. nn## __Your Task:__ nProcess the following request: n n{{ $json.message.text }} nn—nn## __Action Required:__ nn1. __Scrape Leads Tool__ n - Always call the __Scrape Leads__ tool first. n - __Run it only once__ and __wait__ until it has finished before proceeding. n - Capture the `Sheet_ID` from the tool’s output – this is required for the following steps. nn2. __Decision Process:__ n - If the prompt requires, proceed with the following: nn __a) Search LinkedIn Profiles Tool__ n - __Only call this tool if necessary.__ n - Use the `Sheet_ID` from the __Scrape Leads__ tool. n - __Wait__ until it is finished before moving to the next step. nn __b) Cold Outreach Message Tool__ n - __Only call this tool if necessary.__ n - Use the `Sheet_ID` from the __Scrape Leads__ tool in your request.n - __Wait__ until it is finished before moving to the next step. nn3. __Telegram Notification:__ n - Always send a Telegram notification when the request is processed—__successful or failed__. n - Provide the __user’s first name__: `{{ $json.message.from.first_name }}` n - Include the __chat_id__: `{{ $json.message.chat.id }}` n - This step is __mandatory__ and should __only__ be performed __once__. nn—nn## __Execution Order (Strictly Follow This Sequence):__ nn1. __Scrape Leads Tool__ (Always required) n2. __Search LinkedIn Profiles Tool__ (If applicable) n3. __Cold Outreach Message Tool__ (If applicable) n4. __Telegram Response__ (Always required) nn—nn## __Execution Rules (Non-Negotiable):__ nn- __Call each tool exactly once.__ n- __Wait__ for each tool to __fully complete__ before calling the next one. n- __Never__ run two tools at the same time. n- Always call __Scrape Leads__ and __Telegram Response__ – they are __mandatory__. nn—nn## __Telegram Response Format (VERY IMPORTANT!):__ nn✅ __Successful Request:__ nn
jsonn{n "message": "The request was generated successfully. First name: {{ $json.message.from.firstname }}, chatid: {{ $json.message.chat.id }}"n}n❌ Failed Request:nnjsonnKopierennBearbeitenn{n "message": "The request failed. Please try again. First name: {{ $json.message.from.firstname }}, chatid: {{ $json.message.chat.id }}"n}nError Handling:nIf any tool fails:nStop the process immediately.nNotify the user via the Telegram Response tool.nIf Scrape Leads fails, do not proceed to other tools.nAlways provide clear, user-friendly error messages.nnThe number one most important thing you have to keep in mind is, that you wait until a tool responds with "done", before you take any further action.”,
"options": {}
},
"type": "@callin.io/callin.io-nodes-langchain.agent",
"typeVersion": 1.7,
"position": [
440,
0
],
"id": "dd2311bb-4cd4-4851-8772-b44b22f3523b",
"name": "AI Agent"
},
{
"parameters": {
"model": {
"rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {
"maxTokens": 500
}
},
"type": "@callin.io/callin.io-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
300,
240
],
"id": "bdceee87-5cdf-4c2e-aafa-ff05db1c2dbf",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"id": "0X52sLLNhTOwyF3Y",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $json.message.text }}"
},
"type": "@callin.io/callin.io-nodes-langchain.memoryBufferWindow",
"typeVersion": 1.3,
"position": [
460,
240
],
"id": "800179e0-d14d-48ed-8b31-eaac7fbac080",
"name": "Window Buffer Memory"
},
{
"parameters": {
"name": "ScrapeLeads",
"description": "Use this tool to find the leads and put them into a google sheet. Execute it only once, wait until it has finished before taking further action.",
"workflowId": {
"
rl": true,
"value": "jNzhhmmrBdTkGdPM",
"mode": "list",
"cachedResultName": "Scrape Leads"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"query": "={{ $fromAI('query', , 'string') }}" },
"matchingColumns": [],
"schema": [
{
"id": "query",
"displayName": "query",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"type": "@callin.io/callin.io-nodes-langchain.toolWorkflow",
"typeVersion": 2,
"position": [
600,
240
],
"id": "6d869b02-7246-4afb-b548-63584b91aa8c",
"name": "Call callin.io Workflow Tool"
},
{
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"type": "callin.io-nodes-base.telegramTrigger",
"typeVersion": 1.1,
"position": [
180,
0
],
"id": "b96bcf91-7b3b-4cf6-bc5b-ead6976acdb0",
"name": "Telegram Trigger",
"webhookId": "77a7f566-2d8d-4e54-81d6-1f9208860bdb",
"credentials": {
"telegramApi": {
"id": "icpYMfUB7VD3Ieuo",
"name": "Telegram account"
}
}
},
{
"parameters": {
"name": "Telegram_response_tool",
"description": "Call this tool to let the user know wether their request was successfull. ",
"workflowId": {
"__rl": true,
"value": "CkEHeca37bANBM0Q",
"mode": "list",
"cachedResultName": "Telegram Response Tool"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"query": "={{ $fromAI('query',
, ‘string’) }}nchat
ID: {{ $json.message.chat.id }}nfirstname: {{ $json.message.from.firstname }}"
},
"matchingColumns": [
"query"
],
"schema": [
{
"id": "query",
"displayName": "query",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"type": "@callin.io/callin.io-nodes-langchain.toolWorkflow",
"typeVersion": 2,
"position": [
760,
240
],
"id": "95e9d617-1b63-456f-a33b-208377b01356",
"name": "Call callin.io Workflow Tool1"
},
{
"parameters": {
"name": "SearchLinkedInProfiles",
"description": "Call this tool to search the LinkedIn Profiles for key information on the lead.",
"workflowId": {
"rl": true,
"value": "ONZpigKtSfpYJRs4",
"mode": "list",
"cachedResultName": "Search LinkedIn Profiles"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {},
"matchingColumns": [
"query"
],
"schema": [
{
"id": "query",
"displayName": "query",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"type": "@callin.io/callin.io-nodes-langchain.toolWorkflow",
"typeVersion": 2,
"position": [
920,
240
],
"id": "f5ec8b72-a2a0-4bcd-86c4-1520b8895d01",
"name": "Call callin.io Workflow Tool2"
},
{
"parameters": {
"name": "Coldoutreachmessage",
"description": "Call this tool to write cold outreach messages for each lead.",
"workflowId": {
"
rl": true,
"value": "XOyBxLLfgKcegnhe",
"mode": "list",
"cachedResultName": "Personalized Outreach message"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"query": "="
},
"matchingColumns": [
"query"
],
"schema": [
{
"id": "query",
"displayName": "query",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"type": "@callin.io/callin.io-nodes-langchain.toolWorkflow",
"typeVersion": 2,
"position": [
1080,
240
],
"id": "70a95c4b-6a34-4061-8f3b-69ff92d2a644",
"name": "Call callin.io Workflow Tool3"
}
],
"connections": {
"OpenAI Chat Model": {
"ailanguageModel": [
[
{
"node": "AI Agent",
"type": "ai
languageModel",
"index": 0
}
]
]
},
"Window Buffer Memory": {
"aimemory": [
[
{
"node": "AI Agent",
"type": "ai
memory",
"index": 0
}
]
]
},
"Call callin.io Workflow Tool": {
"aitool": [
[
{
"node": "AI Agent",
"type": "ai
tool",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Call callin.io Workflow Tool1": {
"aitool": [
[
{
"node": "AI Agent",
"type": "ai
tool",
"index": 0
}
]
]
},
"Call callin.io Workflow Tool2": {
"aitool": [
[
{
"node": "AI Agent",
"type": "ai
tool",
"index": 0
}
]
]
},
"Call callin.io Workflow Tool3": {
"aitool": [
[
{
"node": "AI Agent",
"type": "ai
tool",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "7cc94d9d5a5a99feab1d7267c120a791ba9d6ff1a180bcd3c7bdf253d1018966"
}
}
```

My subworkflow:
json
{
"nodes": [
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "43fe0561-67eb-40b1-9f6e-6fb626bd6ee1",
"name": "response",
"value": "done",
"type": "string"
}
]
},
"options": {}
},
"type": "callin.io-nodes-base.set",
"typeVersion": 3.4,
"position": [
1800,
-80
],
"id": "cf62f656-db73-4690-9c3a-12231d1c0230",
"name": "Edit Fields"
},
{
"parameters": {
"options": {}
},
"type": "callin.io-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
600,
0
],
"id": "77772621-fc33-4b25-b218-eca76c4b1aa2",
"name": "Loop Over Items"
},
{
"parameters": {
"modelId": {
"__rl": true,
"value": "gpt-4",
"mode": "list",
"cachedResultName": "GPT-4"
},
"messages": {
"values": [
{
"content": "Task:nWrite a short, natural-sounding, and effective cold outreach message based on:nnThe recipient’s LinkedIn profile URL ({{linkedInUrl}}).nA few key sentences with relevant details about them ({{keyInformation}}).nImportant Rules:nExtract the recipient’s first name from either {{linkedInUrl}} or {{keyInformation}}.n✅ Use the first name only if it appears to be real (not a username or handle).n❌ If no real first name is found, start the message with a general friendly opening.nAvoid robotic or awkward phrasing—make it sound natural.nKeep it under 80 words—concise and engaging.nMake the opening relevant by referencing something from {{keyInformation}} (e.g., their role, achievements, or interests).nClearly state how Automation Intelligence can add value based on the provided details.nEnd with a simple, low-pressure call to action, like requesting a quick chat. This call to action should not be a question, but instead a polite request.nMessage Structure:nnIf first name is found:nHi [FirstName],
nIf no first name is found:nHi there,nnI came across your LinkedIn profile and was really impressed by your work in [mention relevant field from key info]. At Automation Intelligence, we specialize in helping professionals like you streamline workflows and boost productivity.nnLet's have a quick chat next week to explore how our solutions could fit your needs [This part should not be formulated as a question, but instead as a demand, still friendly though, don´t use any weird formulations, keep it simple and normal language]. Let me know when you’re available!nnBest,nNicolasnAssistant, Automation Intelligencen[stay as close to this message at possible, while still personalizing it]nnBe aware that this message is for LinkedIn direct messages, so do not include a subject line, just the message itself.nnAlso make sure that your sound is casual but still professional.n",
"role": "system"
},
{
"content": "=LinkedIn url: {{ $json[‘LinkedIn URLs’] }}nKey information: {{ $json[‘key information’] }}"
}
]
},
"options": {}
},
"type": "@callin.io/callin.io-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
820,
100
],
"id": "3fa90dbb-485b-43c7-b9fb-c2f9d24f9b29",
"name": "OpenAI",
"credentials": {
"openAiApi": {
"id": "0X52sLLNhTOwyF3Y",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"operation": "update",
"documentId": {
"__rl": true,
"value": "15mvxI614stCy0ipBd0mT1lHawVS8k0TRhTIfbAhn_8E",
"mode": "list",
"cachedResultName": "Lead Generation",
"cachedResultUrl": "<a href="https://docs.google.com/spreadsheets/d/15mvxI614stCy0ipBd0mT1lHawVS8k0TRhTIfbAhn_8E/edit?usp=drivesdk" rel="noopener nofollow ugc"> https://docs.google.com/spreadsheets/d/15mvxI614stCy0ipBd0mT1lHawVS8k0TRhTIfbAhn_8E/edit?usp=drivesdk</a> ;"
},
"sheetName": {
"__rl": true,
"value": "={{ $(‘Code’).item.json.number }}",
"mode": "id"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"LinkedIn_url": "={{ $(‘Loop Over Items’).item.json.LinkedIn_url }}",
"Cold_outreach": "={{ $json.content }}"
},
"matchingColumns": [
"LinkedIn_url"
],
"schema": [
{
"id": "LinkedIn_url",
"displayName": "LinkedIn_url",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Key_information",
"displayName": "Key_information",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "Cold_outreach",
"displayName": "Cold_outreach",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "row_number",
"displayName": "row_number",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"readOnly": true,
"removed": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "callin.io-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
1420,
100
],
"id": "d4fbcf44-8d33-4e8e-8e7e-eaa8e8350a43",
"name": "Google Sheets1",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Tiuc7BAomIakw1eJ",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "247c0f80-4fdd-4167-8fad-916c0ceaf8b8",
"name": "content",
"value": "={{ $json.message.content }}",
"type": "string"
}
]
},
"options": {}
},
"type": "callin.io-nodes-base.set",
"typeVersion": 3.4,
"position": [
1180,
100
],
"id": "bb065090-bf3c-4ee5-b5f1-30d159cc5b86",
"name": "Edit Fields1"
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "15mvxI614stCy0ipBd0mT1lHawVS8k0TRhTIfbAhn_8E",
"mode": "list",
"cachedResultName": "Lead Generation",
"cachedResultUrl": "<a href="https://docs.google.com/spreadsheets/d/15mvxI614stCy0ipBd0mT1lHawVS8k0TRhTIfbAhn_8E/edit?usp=drivesdk" rel="noopener nofollow ugc"> https://docs.google.com/spreadsheets/d/15mvxI614stCy0ipBd0mT1lHawVS8k0TRhTIfbAhn_8E/edit?usp=drivesdk</a> ;"
},
"sheetName": {
"__rl": true,
"value": "={{ $json.number }}",
"mode": "id"
},
"options": {}
},
"type": "callin.io-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
280,
0
],
"id": "f90b7289-86cf-4c61-a0bc-f77350c4d45d",
"name": "Google Sheets",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Tiuc7BAomIakw1eJ",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"inputSource": "jsonExample",
"jsonExample": "{n "query": "Ecommerce from France, Sheet_ID: 345223553"n}"
},
"type": "callin.io-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
-180,
0
],
"id": "de4bf6ca-d004-4e7d-ad3d-073e5967a707",
"name": "When Executed by Another Workflow"
},
{
"parameters": {
"jsCode": "// Input data from previous nodenconst input = $input.first().json.query; // e.g., "Sheet_ID: 440618878"nn// Extract number using regular expressionnconst extractedNumber = input.match(/d+/) [0];nn// Return the extracted numbernreturn [
{n number: extractedNumber
}
];n"
},
"type": "callin.io-nodes-base.code",
"typeVersion": 2,
"position": [
60,
0
],
"id": "cd6edb6d-24af-49d3-9e7e-ccdf845566c2",
"name": "Code"
}
],
"connections": {
"Edit Fields": {
"main": [
[
<span class="chcklst-box fa fa-square-o fa-fw"></span>
]
]
},
"Loop Over Items": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
],
[
{
"node": "OpenAI",
"type": "main",
"index": 0
}
]
]
},
"OpenAI": {
"main": [
[
{
"node": "Edit Fields1",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets1": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields1": {
"main": [
[
{
"node": "Google Sheets1",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Code": {
"main": [
[
{
"node": "Google Sheets",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "7cc94d9d5a5a99feab1d7267c120a791ba9d6ff1a180bcd3c7bdf253d1018966"
}
}

The subworkflow that consistently fails is the last tool, named cold_outreach_message.

Information on your callin.io setup

  • callin.io version: 1.78.0
  • Database (default: SQLite): SQLite
  • callin.io EXECUTIONS_PROCESS setting (default: own, main): main
  • Running callin.io via (Docker, npm, callin.io cloud, desktop app): docker
  • Operating system: AWS Lightsail with Easypanel
 
Posted : 24/02/2025 5:26 pm
solomon
(@solomon)
Posts: 78
Trusted Member
 

Hi there,

Could you please share your workflow within a code block?

like this

This will help preserve the characters, making it easier for me to copy and paste your workflow for testing.

 
Posted : 24/02/2025 6:53 pm
Yo_its_prakash
(@yo_its_prakash)
Posts: 9
Active Member
 

You can also paste the JSON file, which will allow us to view the workflow correctly.

 
Posted : 24/02/2025 7:07 pm
MoritzSchoelderle
(@moritzschoelderle)
Posts: 7
Active Member
Topic starter
 

Ok, thanks! I'll repost this with the correction. I haven't found a way to edit my previous submission yet.

 
Posted : 24/02/2025 7:20 pm
solomon
(@solomon)
Posts: 78
Trusted Member
 

Kindly share your code in a reply.

 
Posted : 24/02/2025 7:25 pm
Yo_its_prakash
(@yo_its_prakash)
Posts: 9
Active Member
 
  1. Please share the link once you post it.
  2. You have the ability to edit it; look to the right side of this post, near the timestamp, and you should see the option.
 
Posted : 25/02/2025 4:01 pm
system
(@system)
Posts: 332
Reputable Member
 

This discussion was automatically closed 7 days following the last response. New replies are no longer permitted.

 
Posted : 05/03/2025 8:16 am
Share: