Describe the problem/error/question
When I run my travel agent workflow using a standard Chat Trigger, everything works as expected — the inputs are processed correctly and the conversation flows smoothly. However, when I change the trigger type to “Execute workflow from another workflow”, I encounter a formatting issue with the input parameters. It seems like the incoming data is either not properly parsed or not matched with the expected structure of the first node. As a result, the execution fails or returns broken output, even though the structure looks similar. I’ve attached a screenshot to show how the parameters appear when the workflow is executed this way.
What is the error message (if any)?
Bad request - please check your parameters
Missing arrival_id
parameter.
Please share your workflow
{
“nodes”: [
{
“parameters”: {
“text”: “=Message : {{ $json.chatInput }}\n\nHeure du message : {{ DateTime.utc().format(‘yyyy-MM-dd’) }}”,
“schemaType”: “fromJson”,
“jsonSchemaExample”: “{\n"origin": "LYS",\n"destination": "BER",\n"departure": "2025-02-20",\n"return": "2025-02-23",\n"flight_type": "1",\n"accommodation": true,\n"nights": 3\n}”,
“options”: {
“systemPromptTemplate”: “=# Role\nYou are an expert in natural language understanding, specialized in extracting travel-related information from user messages.\n\n# Objective & Instructions\nYour task is to extract the following information from a user’s message:\n- The user’s origin (city or airport)\n- The user’s destination (city or airport)\n- Departure date\n- Return date (if applicable)\n- Whether the user needs a one-way, round-trip, or multi-city flight\n- Whether the user needs accommodation\n- Number of nights needed for the accommodation\n\n## Rules\n- Dates must be returned in ISO 8601 format: YYYY-MM-DD
\n- Origin and destination must be returned as valid IATA airport codes (e.g., CDG
for Paris, JFK
for New York, LYS
for Lyon).\n- Flight type must be returned using one of these values only:\n- \"1\"
= Round trip (default)\n- \"2\"
= One-way\n- \"3\"
= Multi-city\nIf the message does not explicitly mention one of these, assume \"1\"
(Round trip) by default.\n\n# Example\n## Input\nMessage:\n_I’m in Lyon and need a flight to Berlin as soon as possible. I’ll stay in Berlin for 3 nights. I need a return flight too._\nMessage timestamp: \"2025-02-20\"
”
}
},
“type”: “@n8n/n8n-nodes-langchain.informationExtractor”,
“typeVersion”: 1,
“position”: [
340,
0
],
“id”: “aa893001-2592-48fc-84b6-9aa8a78c62fb”,
“name”: “Information Extractor”
},
{
“parameters”: {
“model”: {
“__rl”: true,
“value”: “gpt-4o”,
“mode”: “list”,
“cachedResultName”: “gpt-4o”
},
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatOpenAi”,
“typeVersion”: 1.2,
“position”: [
320,
220
],
“id”: “08198e88-ce93-49ff-9b76-6ceef43c37e4”,
“name”: “OpenAI Chat Model”,
“credentials”: {
“openAiApi”: {
“id”: “AWcD66cCsqQ0xnEc”,
“name”: “OpenAi account”
}
}
},
{
“parameters”: {
“url”: “https://serpapi.com/search”,
“authentication”: “predefinedCredentialType”,
“nodeCredentialType”: “serpApi”,
“sendQuery”: true,
“queryParameters”: {
“parameters”: [
{
“name”: “engine”,
“value”: “google_flights”
},
{
“name”: “=arrial_id”,
“value”: “={{ $json.output.destination }}”
},
{
“name”: “outbound_date”,
“value”: “={{ $json.output[‘departure’] }}”
},
{
“name”: “return_date”,
“value”: “={{ $json.output.return }}”
},
{
“name”: “type”,
“value”: “1”
},
{
“name”: “adults”,
“value”: “1”
},
{
“name”: “stops”,
“value”: “1”
},
{
“name”: “hl”,
“value”: “fr”
},
{
“name”: “currency”,
“value”: “CHF”
},
{
“name”: “departure_id”,
“value”: “/m 1”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
700,
0
],
“id”: “a0a4d505-a950-442c-974c-1ff7b18cf19c”,
“name”: “Search Flights”,
“credentials”: {
“httpQueryAuth”: {
“id”: “9ouDEXq0QU55zv5L”,
“name”: “Query Auth account 2”
},
“httpBasicAuth”: {
“id”: “btJKyVlF9fl7W71v”,
“name”: “Unnamed credential”
},
“serpApi”: {
“id”: “MZwWLpg5aYnIHpv0”,
“name”: “SerpAPI account”
}
}
},
{
“parameters”: {
“url”: “https://serpapi.com/search”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “httpQueryAuth”,
“sendQuery”: true,
“queryParameters”: {
“parameters”: [
{
“name”: “engine”,
“value”: “google_hotels”
},
{
“name”: “q”,
“value”: “={{ $(‘Information Extractor’).item.json.output.destination }}”
},
{
“name”: “check_in_date”,
“value”: “={{ $(‘Information Extractor’).item.json.output[‘departure’] }}”
},
{
“name”: “check_out_date”,
“value”: “={{ (() => {\nconst dateStr = $(‘Information Extractor’).item.json.output[‘departure’];\nconst date = new Date(dateStr);\ndate.setDate(date.getDate() + $(‘Information Extractor’).item.json.output[‘nights’]);\nreturn date.toISOString().split(‘T’)[0];\n})() }}”
},
{
“name”: “adults”,
“value”: “1”
},
{
“name”: “hl”,
“value”: “fr”
},
{
“name”: “currency”,
“value”: “CHF”
},
{
“name”: “api_key”,
“value”: “e660c0686298c831feb3de236f2ab0d7e988a7b06636556b703da520cb7e7ae5”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
920,
0
],
“id”: “a6d63db0-f839-4104-81c1-7b967cf198ba”,
“name”: “Search Hotels”,
“credentials”: {
“httpQueryAuth”: {
“id”: “9ouDEXq0QU55zv5L”,
“name”: “Query Auth account 2”
}
}
},
{
“parameters”: {
“sessionIdType”: “customKey”,
“sessionKey”: “123”
},
“type”: “@n8n/n8n-nodes-langchain.memoryBufferWindow”,
“typeVersion”: 1.3,
“position”: [
680,
540
],
“id”: “0f8c367b-87e5-4b94-8596-b524a45f7a20”,
“name”: “Window Buffer Memory”
},
{
“parameters”: {
“promptType”: “define”,
“text”: “# Flights from {{ $(‘Set Fields’).item.json.origin }} to {{ $(‘Set Fields’).item.json.destination }} on {{ $(‘Set Fields’).item.json.departure_date }} to {{ $(‘Set Fields’).item.json.return_date }}\n\n1) {{ $json.best_flights[0].flights[0].airline }}, {{ $json.best_flights[0].flights[0].departure_airport.time }}, {{ $json.best_flights[0].flights[0].duration }} minutes\n\nFeatures:\n{{ $json.best_flights[0].flights[0].extensions }}\n\nPrice: ${{ $json.best_flights[0].price }}, {{ $json.best_flights[0].type }}\n\n2) {{ $json.best_flights[1].flights[0].airline }}, {{ $json.best_flights[1].flights[0].departure_airport.time }}, {{ $json.best_flights[1].flights[0].duration }} minutes\n\nFeatures: \n{{ $json.best_flights[1].flights[0].extensions }}\n\nPrice: ${{ $json.best_flights[1].price }}, {{ $json.best_flights[1].type }}\n\n\n\n# Resorts\n\n1) {{ $(‘Resorts’).item.json.properties[0].name }}\nLink: {{ $(‘Resorts’).item.json.properties[0].link }}\n\nImage: {{ $(‘Resorts’).item.json.properties[0].images[0].original_image }}\n\nRate per night: {{ $(‘Resorts’).item.json.properties[0].rate_per_night.lowest }}\nTotal Rate: {{ $(‘Resorts’).item.json.properties[0].total_rate.lowest }}\n\nNearby Places: \n{{ $(‘Resorts’).item.json.properties[0].nearby_places[0].name }}, {{ $(‘Resorts’).item.json.properties[0].nearby_places[0].transportations[0].duration }} {{ $(‘Resorts’).item.json.properties[0].nearby_places[0].transportations[0].type }}\n{{ $(‘Resorts’).item.json.properties[0].nearby_places[1].name }},{{ $(‘Resorts’).item.json.properties[0].nearby_places[1].transportations[0].duration }} {{ $(‘Resorts’).item.json.properties[0].nearby_places[1].transportations[0].type }}\n\nAmentities: \n{{ $(‘Resorts’).item.json.properties[0].amenities }}\n\n2) {{ $(‘Resorts’).item.json.properties[1].name }}\nLink: {{ $(‘Resorts’).item.json.properties[1].link }}\n\nImage: {{ $(‘Resorts’).item.json.properties[1].images[0].original_image }}\n\nRate per night: {{ $(‘Resorts’).item.json.properties[1].rate_per_night.lowest }}\nTotal Rate: {{ $(‘Resorts’).item.json.properties[1].total_rate.lowest }}\n\nNearbly Places:\n{{ $(‘Resorts’).item.json.properties[1].nearby_places[0].name }}, {{ $(‘Resorts’).item.json.properties[1].nearby_places[0].transportations[0].duration }} {{ $(‘Resorts’).item.json.properties[1].nearby_places[0].transportations[0].type }}\n{{ $(‘Resorts’).item.json.properties[1].nearby_places[1].name }}, {{ $(‘Resorts’).item.json.properties[1].nearby_places[1].transportations[0].duration }} {{ $(‘Resorts’).item.json.properties[1].nearby_places[1].transportations[0].type }}\n\nAmenities:\n{{ $(‘Resorts’).item.json.properties[1].amenities }}\n\n3) {{ $(‘Resorts’).item.json.properties[2].name }}\nLink: {{ $(‘Resorts’).item.json.properties[2].link }}\n\nImage: {{ $(‘Resorts’).item.json.properties[2].images[1].original_image }}\n\nRate per night:{{ $(‘Resorts’).item.json.properties[2].rate_per_night.lowest }}\nTotal Rate: {{ $(‘Resorts’).item.json.properties[2].total_rate.lowest }}\n\nNearby Places: \n{{ $(‘Resorts’).item.json.properties[2].nearby_places[0].name }}, {{ $(‘Resorts’).item.json.properties[2].nearby_places[0].transportations[0].duration }} {{ $(‘Resorts’).item.json.properties[2].nearby_places[0].transportations[0].type }}\n{{ $(‘Resorts’).item.json.properties[2].nearby_places[1].name }}, {{ $(‘Resorts’).item.json.properties[2].nearby_places[1].transportations[0].duration }} {{ $(‘Resorts’).item.json.properties[2].nearby_places[1].transportations[0].type }}\n\nAmenities: \n{{ $(‘Resorts’).item.json.properties[2].amenities }}\n\n# Activities\n\n1) {{ $(‘Activities’).item.json.results[0].title }}\nLink: {{ $(‘Activities’).item.json.results[0].url }}\nDescription: {{ $(‘Activities’).item.json.results[0].content }}\n\n2) {{ $(‘Activities’).item.json.results[1].title }}\nLink: {{ $(‘Activities’).item.json.results[1].url }}\nDescription: {{ $(‘Activities’).item.json.results[1].content }}”,
“options”: {
“systemMessage”: “=# Overview \nYou are an expert email writer specializing in creating travel plans. Your job is to output an HTML email with clickable links. You must output a subject and an emailBody in separate parameters.\n\n## Objective \nYou will receive information about a vacation plan. Break the email into 3 sections: Flights, Resorts, and Activities\n\n## Output Format \n- The email should be structured as HTML that will be sent through email. Use headers to separate the sections \n- Add a horizontal line to end each section\n\n### Subject \n- Should contain the travel dates and the arrival location\n\n### Introduction \n- The goal of this section is to get the traveler excited about their upcoming trip \n- You must add a horizontal line after this section, before the ‘Flights’ section\n\n### Flights \n- List the departure and return dates and locations \n- List the flights and details about each one\n\n### Resorts \n- List each resort with a clickable link as the name of the resort \n- Number the list of resorts \n- Output images in HTML format like this: \n <img src=\"{image url here}\" style=\"max-width:20%; height:auto;\">
\n- Leave a new line between the resort name and its image and after the image\n\n### Activities \n- List the activities with clickable links as the name of the activity \n- Provide a brief description of each activity\n\n### Signoff \n- Sign the email off in a friendly way \n- Sign off as SwissAgents.ai Travel Team\n\n## Language Rule \n- If the user request is written in French, you must write the subject and the entire emailBody in French.\n”
}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 1.7,
“position”: [
620,
320
],
“id”: “a42393ef-0734-4447-b1c0-d4176b2ddd00”,
“name”: “Business Travel Agent”
},
{
“parameters”: {
“model”: {
“__rl”: true,
“mode”: “list”,
“value”: “gpt-4o-mini”
},
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatOpenAi”,
“typeVersion”: 1.2,
“position”: [
560,
580
],
“id”: “f6c1c349-def5-4c98-aa0a-f9f17384cfa4”,
“name”: “OpenAI Chat Model1”,
“credentials”: {
“openAiApi”: {
“id”: “AWcD66cCsqQ0xnEc”,
“name”: “OpenAi account”
}
}
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “7ab380a2-a8d3-421c-ab4e-748ea8fb7904”,
“name”: “response”,
“value”: “Unable to perform task. Please try again.”,
“type”: “string”
}
]
},
“options”: {}
},
“id”: “0c4b3b0b-7c32-4b66-b4c9-f5302e9a4cfe”,
“name”: “Try Again”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
1020,
440
]
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “39c2f302-03be-4464-a17a-d7cc481d6d44”,
“name”: “=response”,
“value”: “={{$json.output}}”,
“type”: “string”
}
]
},
“options”: {}
},
“id”: “179dac73-c898-4dc2-ae57-b31b7a7cb651”,
“name”: “Success”,
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
1040,
280
]
},
{
“parameters”: {
“inputSource”: “passthrough”
},
“type”: “n8n-nodes-base.executeWorkflowTrigger”,
“typeVersion”: 1.1,
“position”: [
100,
0
],
“id”: “b39e9d54-0b0e-44de-ba75-6be765b0fd52”,
“name”: “When Executed by Another Workflow”
}
],
“connections”: {
“Information Extractor”: {
“main”: [
[
{
“node”: “Search Flights”,
“type”: “main”,
“index”: 0
}
]
]
},
“OpenAI Chat Model”: {
“ai_languageModel”: [
[
{
“node”: “Information Extractor”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“Search Flights”: {
“main”: [
[
{
“node”: “Search Hotels”,
“type”: “main”,
“index”: 0
}
]
]
},
“Search Hotels”: {
“main”: [
[
{
“node”: “Business Travel Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“Window Buffer Memory”: {
“ai_memory”: [
[
{
“node”: “Business Travel Agent”,
“type”: “ai_memory”,
“index”: 0
}
]
]
},
“Business Travel Agent”: {
“main”: [
[
{
“node”: “Success”,
“type”: “main”,
“index”: 0
},
{
“node”: “Try Again”,
“type”: “main”,
“index”: 0
}
]
]
},
“OpenAI Chat Model1”: {
“ai_languageModel”: [
[
{
“node”: “Business Travel Agent”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“When Executed by Another Workflow”: {
“main”: [
[
{
“node”: “Information Extractor”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “389d7930e1a300d170df5bf5c88ef8ecf65f0e602314e4bdcebcb06d029257cb”
}
}
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Error code
400
Full message
400 - "{\n \"error\": \"Missing `arrival_id` parameter.\"\n}"
Request
{ "headers": { "accept": "application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, image/*;q=0.8, */*;q=0.7" }, "method": "GET", "uri": "https://serpapi.com/search", "gzip": true, "rejectUnauthorized": true, "followRedirect": true, "resolveWithFullResponse": true, "followAllRedirects": true, "timeout": 300000, "qs": { "engine": "google_flights", "arrial_id": "", "outbound_date": "", "return_date": "", "type": "1", "adults": "1", "stops": "1", "hl": "fr", "currency": "CHF", "departure_id": "/m 1", "api_key": "**hidden**" }, "encoding": null, "json": false, "useStream": true }
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): aws
- Operating system: ubunto
Thanks for helping <3