- Home
- Resources
- Integrations
- Code by Zapier
Code by Zapier Zapier integrationAutomate Code by Zapier with Zapier.
The Code by Zapier Zapier integration puts a few lines of Python or JavaScript inside a Zap. It counts 2 triggers, 2 actions and 0 searches. Below: what each one does, what it costs, and the traps to know before you switch anything on.
Verified Trustpilot reviews · AI, automation & growth agency
What the Code by Zapier Zapier integration is for
Code by Zapier is the step you reach for when no app offers the operation you want. You write a short piece of Python or JavaScript, and the Zap runs it like any other step. It is not a premium app, so it works from the free plan, within that plan's limits.
Three typical results. A cleaned-up value: Run Javascript takes a messy phone number or name from the step before and passes on a tidy version. A computed figure: Run Python adds, rounds or converts something no app computes for you. A Zap with no app behind its start: the Run Python and Run Javascript triggers let your own code decide when the automation kicks off.
Each step runs on the latest version of Python or Node that Zapier supports. Zapier itself files these operations as advanced, and it means it (you are writing code, even if it is ten lines).
What Zapier does not do here: there is no search step, and neither trigger is instant. Both are checked on a timer, so the free plan waits up to 15 minutes. And a Code action placed between a trigger and another action makes a Zap of three steps, which the free plan refuses.
If you are weighing tools, the Code by Zapier n8n integration sits on its own page, and the n8n vs Zapier comparison sets the two platforms side by side.
Zapier vocabulary in one minute
Eight words come back on every line of this page. Here they are in plain English, once.
- Zap
- The automation you build in Zapier: one trigger, then one or more actions that run each time the trigger event happens.
- Trigger
- The event that starts the Zap. Once the Zap is switched on, Zapier sits and waits for it to happen.
- Action
- What the Zap does after it starts: the step that writes, sends or moves something on your behalf.
- Task
- The unit Zapier bills you on: one action your Zap completes successfully. The number on your plan counts these.
- Polling trigger
- A trigger Zapier checks on a timer. It asks for new items at a fixed interval and keeps only what it has not seen.
- Instant trigger
- A trigger the app reports itself, the moment the event happens. Code by Zapier has none of these, both of its triggers poll.
- Filter
- A step that lets the Zap continue only when what arrived meets your condition, and stops it quietly otherwise.
- Multi-step Zap
- Any Zap that goes beyond one trigger and one action. A second action or a filter makes one, and it needs a paid plan.
What a Code step really costs
The trigger never costs a task, and neither does checking for new data, however often Zapier looks.
- Premium appNo, works on the free plan
- Free plan100 tasks a month, two steps per Zap
- TriggerCosts no task
Each action that succeeds counts as one task. An action that fails is not counted. The free plan gives 100 tasks a month and unlimited Zaps, but only two steps per Zap. So a Code action squeezed between a trigger and a second action, or followed by a filter, moves you to a paid plan. Zapier also has a help article titled How is Code by Zapier usage measured, worth a careful look before you roll a Code step out widely.
Add Code by Zapier to your account in 3 steps
- 01
Open the Apps page
In your Zapier account, go to Apps. This is where every connection lives, meaning each app account you link to Zapier once and then reuse in all your Zaps.
- 02
Add the connection
Click + Add connection, type Code by Zapier in the search box of the dialog, select it in the results, then confirm your choice with the Add connection button.
- 03
Sign in and grant access
Sign in to the app in the tab that opens and allow Zapier to use the account. You need an account on the app, plus access to anything you do not own that the Zap should touch.
Your first Zap: leads scored in JavaScript, then sent to HubSpot
GoalA marketing agency lets a JavaScript trigger produce lead records, keeps only the serious ones and creates them in HubSpot.
- 01
Build the start
Create a Zap, pick Code by Zapier as the app and Run Javascript as the trigger event. Write the few lines that produce each lead and give it a score.
- 02
Test the trigger
Run the test and read what came back. Spot the score your code returned, because the filter will compare against it in the next step.
- 03
Add the filter
Add a Filter on that returned value, with a rule of the right type: a number rule for a score, a text rule for a label. The wrong type never passes.
- 04
Send to HubSpot
Add HubSpot with Create Contact, then map the values your code returned into the contact fields. Test this step once, on the lead picked earlier.
- 05
Publish
Check the whole chain once more, then Publish. With a filter, this Zap needs a paid plan. On the free plan, keep only the trigger and one action.
Code by Zapier triggers
2 events start a Zap when something happens in Code by Zapier. Zapier checks for them at the interval your plan allows.
Run Python
Polling triggerIn Zapier“Use Python to kick off a workflow. This is an advanced action! Uses the latest supported version of Python.”
Here the Zap starts from your own Python rather than from an event in some app. Your code is the starting point, and every step after it works with what the code produces. It runs on the latest Python version Zapier supports.
Run Javascript
Polling triggerIn Zapier“Use Javascript to kick off a workflow. This is an advanced action! Uses the latest supported version of Node.”
Same idea in JavaScript: a block of code you write opens the Zap, on the latest Node version Zapier supports. Pick it if your team already reads JavaScript more easily than Python.
Code by Zapier actions
Code by Zapier gives you 2 actions. For each one: what it does for you, when to reach for it, and what to watch out for.
Operations index
Run Javascript
ActionIn Zapier“Run Javascript code This is an advanced action! Uses the latest supported version of Node.”
Drops JavaScript in the middle of a Zap, so the data from earlier steps gets reshaped before it moves on. It runs on the latest Node version Zapier supports.
Run Python
ActionIn Zapier“Run Python code This is an advanced action! Uses the latest supported version of Python.”
The Python twin of the step above: your script receives the values you map in, and the steps that follow can use what it returns.
When a Code by Zapier Zap breaks
Most failures come from Zapier's general rules, not from your code.
Zapier's help center files several articles under this app. Their titles alone tell you where the friction is: longer runtimes, usage, and a product being retired. The six cases below cover what to check first. For a Zap that keeps failing, the Zapier troubleshooting page is the next stop.
Nothing from before the Zap was on
A Zap only reacts to what happens after you publish it. Old records are never picked up, and moving a backlog is a separate job.The Zap keeps setting itself off
If the last step writes into the very place the trigger watches, the Zap restarts again and again, and your task count drains fast.A sudden huge batch is held back
After a bulk import or a migration, a trigger that returns a pile of items at once can be held back by Zapier's flood protection.The same item does not run twice
On a polling trigger, Zapier remembers what it has already seen. An item it already processed will not start the Zap a second time.Long-running code
Two help articles carry the words in their titles: Run longer Code steps with extended runtimes, and Configure extended runtimes for Code steps. If a step seems to run long, start there.Zapier Functions is being retired
One help article is titled Important update: Zapier Functions is being deprecated, another Migrate from Zapier Functions to Code by Zapier. Still on Functions? Read both.
Need help automating Code by Zapier with Zapier?
A person reads every message.



