How to access the param inside the function

Viewed 23

I have created one flow from that I am sending some param to the function, how should I access the param inside the function? Here I am attaching the sample params I am sending from run_function to function.

1 Answers

If you have set up params to send from a Studio Flow to a Function via the widget, then you will be able to access the params on the event object that is passed to your function.

For example, if you set a param named "CustomerName" in the Run Function widget you will access it like this:

exports.handler = function (context, event, callback) {
  console.log(event.CustomerName);

  callback(null, {});
}
Related