Best answer

How to use flow.data variables on Webhook trigger from Google Sheets to Twilio?

  • 27 August 2023
  • 6 replies
  • 238 views

Userlevel 1

hi, i can’t understand how to call datas from my gsheet in twilio. When i take a look at the request, there is no variables in “parameters”.

 

i try to put in a sms body a date with {{flow.data.date}} but it stay empty.

my zap action :

 

I need help please.

icon

Best answer by Flo 29 August 2023, 19:55

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

6 replies

Userlevel 7
Badge +14

Hi @Flo 

Good question.

To help us have more context, please post detailed screenshots with how each of your Zap steps are configured.

Userlevel 1

thanks for your answer.

my zap launching a flow on twilio from gsheet. that work well but when receive the sms, the variable is empty : 

Votre entretien d’adoucisseur aura lieu le .

1 pour confirmer

2 pour annuler

 

and on twilio :

 

Userlevel 2
Badge +1

To confirm: Zapier is correctly triggering Twilio, Twilio is sending the SMS to the correct number based on what Zapier sent (e.g. it’s not hard-coded in Twilio), but the data is not coming through?

 

Can you show how the target phone is set up in Twilio - assuming that part is working correctly?

I’d also re-check your variables in zapier for extra spaces or what-have-you. Maybe even create something under date called “date2” that has a hardcoded value of “Bonjour!”. Then you can test whether that comes into your SMS to try to narrow down the problem. 

Userlevel 1

To confirm: Zapier is correctly triggering Twilio, Twilio is sending the SMS to the correct number based on what Zapier sent (e.g. it’s not hard-coded in Twilio), but the data is not coming through?

 

exactly

I tried to add “test” with “bonjour!” as value. But it doesn’t work either.

 

 

 

 

 

Userlevel 1

 

Userlevel 1

I find the way to do it thanks to twilio’s support. here is there answer :

Partha Paul05:45 PM

Hi Florian, 
 
Thank you for reaching out to us. I'm Partha, and I'll be assisting you today.
 
Based on the attached screen-print, I can observe that the parameter 'test' is being passed to the Studio REST API during execution triggering. However, it's important to note that Studio API does not include a parameter called 'test'. When creating a Studio execution with custom parameters, the value should be included in the API request as JSON data within the 'Parameters' property, as demonstrated below:
 
Using curl:

shellCopy codecurl -X POST https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions \--data-urlencode "To=+13105555555" \--data-urlencode "From=+12125551234" \--data-urlencode "Parameters={\"test\":\"bonjour!\",\"time\":\"8AM\"}" \-u "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token"

For Zapier, you'll need to pass the parameter using the 'Parameters' property with a JSON payload, like this:
 
Property name: Parameters 
Payload:

{  "test": "bonjour!"}

In your flow, the parameters you've passed will be accessible through a variable in the form of {flow.data.parameter_name}. Whenever we encounter this syntax, we'll automatically replace it with the corresponding parameter's value.
 
For more detailed information on triggering executions with custom parameters, please refer to this resource: Trigger a Twilio Studio Flow Execution via the REST API. This documentation can provide you with a clearer understanding of the process.
 
If you have any further questions or need additional assistance, feel free to ask.

Best,
Partha Paul
Twilio Support

!alttext