Code

Code - Features, Pricing, Alternatives, and More

Matthew Guay
Written by Matthew GuayLast updated August 28, 2018

With Zapier's Code action you can extend our platform to do just about anything using two of the most popular programming languages available - Javascript or Python! Run code in response to any trigger that Zapier supports.

Some example use cases include:

  • Transform incorrect dates or convert between other data types.
  • Use custom regular expressions to extract extra data like emails or tracking numbers from large text blobs.
  • Make an extra API call to a different service with requests without building a full dev app.
  • Augment data from a trigger with extra data from some other source (either generated or external API).
  • Anything else you can dream up!

Warning - this is advanced stuff! You probably need to be a programmer to use this - though you are welcome to play with it. Technical support for bugs in your code is not provided!

How does it work?

The environments are vanilla Node.js v8.10.0 which runs JavaScript or vanilla Python 2.7.10. Your script is sandboxed and can only run for a limited amount of time and within a limited amount of memory. If you exceed those limits - your script will be killed (you can upgrade to a paid Zapier to increase your limits).

Since the amount of data that might feed into your script might be large or highly dynamic - you'll need to define an input mapping via our GUI. This is a really simple step - the screenshot below shows a very basic example:

Testing/Debugging

Running your zap via the dashboard is the canonical way to confirm the behavior you expect - your Task History will have all relevant details around the ran code's inputData, output and logs. The test step in the editor can be used for a tighter feedback loop.

Try asking for help by tagging questions as Zapier on Stackoverflow!

Have any feedback on this overview, or something we should change? Let us know!

Code Integration Details

Launched on Zapier June 15, 2015

Zapier combines Triggers (like "Run Javascript") and Actions (like "Run Javascript") to complete an action in one app when a trigger occurs in another app. These combos—called "Zaps"—complete your tasks automatically.

The following Code Triggers, Searches, and Actions are supported by Zapier:

Run Javascript

Use Javascript to kick off a workflow. You must return an array of objects. This is an advanced trigger! Uses Node 8.10.x.

Run Python

Use Python to kick off a workflow. You must return an array of objects. This is an advanced trigger! Uses Python 3.7

Run Javascript

Run Javascript in response to data from trigger. This is an advanced action! Uses Node 8.10.x.

Run Python

Run Python in response to data from trigger. This is an advanced action! Uses Python 3.7.

Use our free platform to build a single Zapier integration and instantly connect your app with 1,400+ others.

Become a Zapier Integration Partner

What is Code by Zapier

Built-In

Write custom Javascript code in response to any data from any service! Transform, mutate, customize or even do custom HTTP in a native and familiar node.js environment.