API node not passing call id
# support
a
API Request node is just passing the properties i set in the body of the request, that means that i do not have the call id info
@Vapi Support Bot
v
To access the call id from a Vapi server event, extract it from the nested
call
object in the incoming JSON payload. For example, in JavaScript/Node.js:
Copy code
js
const callId = req.body.message.call.id;
Make sure your API node or workflow is set up to parse the payload and map
message.call.id
to your desired variable. Tip: All Vapi server events include the call id in this structure by default, so check your payload mapping if you don't see it. Sources: - [Vapi Docs: Server Events](https://docs.vapi.ai/server-url/events) - [Vapi Docs: Setting Server URLs](https://docs.vapi.ai/server-url/setting-server-urls)
a
i recive this [ { "headers": { "host": "n8n-aibaze.onrender.com", "user-agent": "node", "content-length": "77", "accept": "*/*", "accept-encoding": "gzip, br", "accept-language": "*", "authorization": "ddsdsd", "baggage": "sentry-environment=production,sentry-public_key=a0021577936aec367b16615ad816c078,sentry-trace_id=949fb076a1174bc0af69e7dd91c08010", "cdn-loop": "cloudflare; loops=1", "cf-connecting-ip": "44.247.30.108", "cf-ipcountry": "US", "cf-ray": "951a65d57cc8ef5f-PDX", "cf-visitor": "{\"scheme\":\"https\"}", "content-type": "application/json", "render-proxy-ttl": "4", "rndr-id": "81fb3e0a-18c6-46d4", "sec-fetch-mode": "cors", "sentry-trace": "949fb076a1174bc0af69e7dd91c08010-9a7c150ab17e9dd4", "traceparent": "00-760823de7a2a5049f0555f84088c5e5e-09fcbe6553f2b571-01", "true-client-ip": "44.247.30.108", "x-forwarded-for": "44.247.30.108, 172.68.175.33", "x-forwarded-proto": "https", "x-request-start": "1750245630384738" }, "params": {}, "query": {}, "body": { "scheduled_date": "2023-06-20T00:00:00", "candidate_email": "thomas@gmail.com" }, "webhookUrl": "https://n8n-aibaze.onrender.com/webhook/281d9a17-3839-4f09-92a5-ss4343496814", "executionMode": "production" } ]
@Vapi Support Bot
v
It looks like your API node is only receiving custom fields, not the full Vapi event payload. To access the call id, make sure your webhook or API node is set up to receive the entire Vapi event, which includes a structure like:
Copy code
json
{
  "message": {
    "call": {
      "id": "your-call-id"
    },
    ...
  }
}
Update your workflow to parse
message.call.id
from the incoming payload. If you only see your custom fields, check your webhook trigger or mapping settings to ensure the full Vapi event is being passed through. Reference: [Vapi Docs: Server Events](https://docs.vapi.ai/server-url/events) Source: - [Vapi Docs: Server Events](https://docs.vapi.ai/server-url/events)
t
also having this issue @User
k
Use {{ call.id }} to inject it, or switch to a Tool Call node and return the correct toolCallId in your webhook response..
a
thank you !
one question @Kings_big💫 , if i use the tool call, how i grab the result of the tool call ?
two questions 1- if i use the tool call, how i grab the result of the tool call in the workflow ? 2- how i can use variables extracted in the call within the tool body?
k
- The result of a tool call is stored in a variable like toolResponse, which you can access in later workflow steps using {{toolResponse.key}}.. - To use variables extracted from the call in the tool body, reference them with {{variableName}} syntax inside the request body or headers..
a
thank you so much for this
r
wait so was it only possible with a tool call rather than a api request node?
is this possible from the dashboard or naw?
v
@raghav you should be able to achieve this via dashboard