conscious-sapphire•3mo ago
API Post Request to N8N Endpoint does not wait for Reply
I set an API Post request to N8N (the workflow fills in some variables and sends them back) but in the "Run Test Step" the Voiceflow API Call successfully sends a HTTP Post Request to N8N which takes about 2 seconds to process (and succeeds every time) but the API Post Request in Voiceflow just instantly moves on to the next field even though the call has succeeded and therefore the variables are returned with "0" "0"
Does anyone know how to solve this?



4 Replies
It sounds like the webhook in n8n is replying before your workflow finishes, so Voiceflow receives an almost-empty body (often just
• Set the response mode to JSON and include the fields Voiceflow needs, e.g. • Make sure the status code is 200. 2. In Voiceflow’s API step:
• Run the test again – you should now see the real JSON coming back after ~2 s.
• Map the fields in the Capture Response section (each path starts with
{ "success": true }
) and immediately continues ⇒ the variables you mapped are still 0
/empty.
How to make Voiceflow wait and receive the real data
1. In your n8n workflow add a “Respond to Webhook” (or enable “Respond immediately: OFF / Wait for workflow” on the Webhook node).*• Set the response mode to JSON and include the fields Voiceflow needs, e.g. • Make sure the status code is 200. 2. In Voiceflow’s API step:
• Run the test again – you should now see the real JSON coming back after ~2 s.
• Map the fields in the Capture Response section (each path starts with
response.
). (docs)
3. (Optional) raise the timeout in the API step if your workflow ever needs >15 s.
Once n8n waits and returns the JSON synchronously, Voiceflow will pause until it gets the full reply and your variables will be populated correctly.conscious-sapphireOP•3mo ago
I mean what can I say. The response status is 200 and the n8n workflow I am testing out all the time is set to "use respond to webhook node" or Use last Node ... doesnt matter

conscious-sapphireOP•3mo ago
I think it has something to do with the capture repsonse object.


conscious-sapphireOP•3mo ago
does anybody know about this?