Zapier Provides Data and You Code in the Browser

This is the Run Code action. It lets you write code in your browser during Zap setup but run the code in your AWS Lambda on behalf of Zapier:

In order for Zapier to "Run Code" dynamically provided in your zap you will need to create a special "sugar" function for us to piggyback. Go to your Lambda Console to get started on this and Create a Lambda Function:

Copy the code from this gist and paste it into your function - be sure to name the function zapier_eval! This bit of code will let us provide code that is run safely within your very own Lambda environment.

You can set the function's role, memory and timeout to whatever settings you deem appropriate.

Now you can use the "Run Code" action in Zapier and provide code on the fly. You only need to set up this function once - we'll always use it in the future.

You are welcome to customize the zapier_eval function - some people like to create their own *.zip with custom npm dependencies so you can require and utilize other functionality. You are welcome to use the code from this gist as the foundation.

Was this article helpful?
0 out of 0 found this helpful