TheGuardians
TheGuardians2mo ago

Help

I don't understand with my current flow (see image 1) when the webhook response is displayed when it is a simple sentence (see photo 2) with this n8n config (see photo 3) but when it is a complete product recommendation with name price description product link image link it doesn't work (see photo 4) I have this n8n config (see photo 5)
No description
No description
No description
No description
No description
2 Replies
Tico | Voiceflow Assistant
It’s almost certainly the shape of the JSON you’re returning from n8n.
Voiceflow’s Webhook step can only read top-level, primitive fields in the response (strings, numbers, booleans). When you send back a single sentence that arrives as a plain string everything works, but when you send an object like
{
"product": {
"name": "Lamp A",
"price": "$35",
"description": "…",
"image": "https://…",
"url": "https://…"
}
}
{
"product": {
"name": "Lamp A",
"price": "$35",
"description": "…",
"image": "https://…",
"url": "https://…"
}
}
Voiceflow doesn’t know how to map the nested values and you get an empty result. Fix 1. In Voiceflow create variables that match the fields you want to display (e.g. {name}, {price}, {desc}, {img}, {url}) 2. In your n8n HTTP Response node flatten the payload so those keys are at the top level:
{
"name" : "Lamp A",
"price": "$35",
"desc" : "Modern desk lamp",
"img" : "https://…/lamp.png",
"url" : "https://…/lamp"
}
{
"name" : "Lamp A",
"price": "$35",
"desc" : "Modern desk lamp",
"img" : "https://…/lamp.png",
"url" : "https://…/lamp"
}
3. Voiceflow will automatically assign each field to the matching variable. Add a Card step (or Carousel if you have several) after the Webhook and reference the variables in the title / description / image / button URL. Need to show several products? • Use a Custom Action instead of Webhook and return a pre-formatted carousel trace, or • Loop through the array in a Code step and output a carousel trace manually (see Trace Types > cardV2 and carousel). Helpful docs: https://docs.voiceflow.com/reference/trace-types#type-cardv2
https://docs.voiceflow.com/reference/trace-types#type-carousel Once the response you send from n8n is flat and matches your Voiceflow variables, the product card will render correctly.
TheGuardians
TheGuardiansOP2mo ago
please help me someone to use n8n and voiceflow??

Did you find this page helpful?