Lambdas are custom functions that can be fired using a trigger action. Creating a lambda allows you to execute a custom code you have created using any rules available in triggers. Lambdas run within a Node.js v8.10 environment and are given 256MB and 15 seconds to complete.
Creating a Lambda
- Navigate to Flows → Lambdas.
- Enter a name for this lambda function.
- In the Code section, use the interface to write the custom code you wish to execute. The lambda interface gives you the ability to:
- Select font size
- Select your editor (Ace, Vim, or Emacs)
- Full-screen the editor
- Test the script by selecting a specific call
- If you wish to add environment variables to your lambda, click +Add Variable and specify the name and value for your variable.
- Click Save Changes.
Firing Lambdas with Triggers
To execute your new lambda, you will need to create a trigger or add a new action to an existing trigger. Click here to learn more about trigger setup.
- Navigate to Calls → Triggers. If you wish to edit an existing trigger, click edit next to the name of the trigger you want to use to run the lambda. Otherwise, you will need to create a new trigger.
- Use the trigger settings to configure when you would like the trigger to run and add any necessary rules to the workflow.
- To run the lambda function as part of the trigger, click Add Action, then select Run Lambda Function.
- Use the drop-down menu to select the name of the lambda you wish to run.
- Click Save Changes.
Comments
Article is closed for comments.