0

I am trying to pass a parameter to a function in a flow using Twilio Studio. I can add the parameter no problem to the function widget, but how do I retrieve the parameter in the function?

Studio Screenshot

enter image description here

I've tried looking at the logs and can't figure out how to reference the parameter.

Alex Baban
  • 11,312
  • 4
  • 30
  • 44
Jephph
  • 13
  • 2

1 Answers1

1

The parameters are properties of the event object, you can access with the dot notation. In your case something like this:

exports.handler = function(context, event, callback) {

    const test = event.Test; 

    // your function code here...


};
halfer
  • 19,824
  • 17
  • 99
  • 186
Alex Baban
  • 11,312
  • 4
  • 30
  • 44