living-lavenderL
Voiceflow2y ago
2 replies
living-lavender

Voiceflow API parameters

Hello people - do any of you know how to pass variable calues (like name and email address entered by the user) into an API block raw body? I assume I have to set the parameters and then call the keys from the code, but that doesn't work.

This is the code I have that works with static values:

{
"sendWelcomeEmail": true,
"firstName": "Dan",
"tags": [
"Mila"
],
"identifiers": [
{
"type": "email",
"consent": {
"source": "Mila"
},
"channels": {
"email": {
"status": "subscribed"
}
},
"id": "dan+26@spacedroid.co.uk"
}
],
"country": "United Kingdom",
"countryCode": "GB"
}


But when I set the parameters and use this it does not:

{
"sendWelcomeEmail": true,
"firstName": first_name,
"tags": [
"Mila"
],
"identifiers": [
{
"type": "email",
"consent": {
"source": "Mila"
},
"channels": {
"email": {
"status": "subscribed"
}
},
"id": email_address
}
],
"country": "United Kingdom",
"countryCode": "GB"
}

Thank you so much!
Cheers,
Dan
Was this page helpful?