Skip to main content

Can you write Python in Zapier?

Yes. Zapier has a Code by Zapier step that runs Python or JavaScript. The code runs inside one step of a Zap, with a short timeout and a restricted set of packages.

The Code step and its limits.

Code by Zapier runs a script inside a Zap step. Here is what it handles and where the Zap around it takes over.

CapabilityWhat it doesWhere it stops
Python supportRuns Python or JavaScript inside a Zap stepRestricted packages. No pip install, no pandas, no custom libraries
BillingAvailable on all paid Zapier plansEach code step execution counts as a task. Loops multiply the count
TimeoutCode runs between Zap stepsShort runtime limit. Rules out batch processing or long API sequences
Code reuseCode lives inside one stepCannot call functions from another step. Logic duplicates across the Zap
TestingTest individual Zap stepsNo assertion framework. No automated testing before going live
Version controlZap version historyNot a line-level diff of the code
Control flowPath steps for branching, Looping steps for iterationEach is billed separately
Python support
What it doesRuns Python or JavaScript inside a Zap step
Where it stopsRestricted packages. No pip install, no pandas, no custom libraries
Billing
What it doesAvailable on all paid Zapier plans
Where it stopsEach code step execution counts as a task. Loops multiply the count
Timeout
What it doesCode runs between Zap steps
Where it stopsShort runtime limit. Rules out batch processing or long API sequences
Code reuse
What it doesCode lives inside one step
Where it stopsCannot call functions from another step. Logic duplicates across the Zap
Testing
What it doesTest individual Zap steps
Where it stopsNo assertion framework. No automated testing before going live
Version control
What it doesZap version history
Where it stopsNot a line-level diff of the code
Control flow
What it doesPath steps for branching, Looping steps for iteration
Where it stopsEach is billed separately

qbash Tasks.

A Task is an AI automation written in Python, hosted on a managed runtime. A developer writes the script; anyone runs it from a form. Integrations, model calls, version control, and logging are built in.

Model and provider agnostic.

  • Anthropic
  • OpenAI
  • Gemini
  • xAI
  • OpenRouter
  • Amazon
  • Perplexity
  • MoonshotAI
  • Meta
  • Qwen

In qbash, the whole automation is Python.

One script with loops, branches, and functions. Model calls and integrations are Python functions, billed per run.

  • Adding a step costs nothing. Loops, branches, and helper functions are language features.
  • 45+ integrations called in one line, with credentials brokered server-side.
  • aisle.ai.run_prompt for model calls, with structured output that constrains the model to your JSON.
  • aisle.parallel fans out over hundreds of items with concurrency and rate limiting as arguments.
  • tests.py for assertions, and every save is a version with a line-level diff.
reconcile.py
invoices = aisle.integrations.xero.list_invoices(status="AUTHORISED")

for invoice in invoices:
    match = aisle.ai.run_prompt(
        slug="match-invoices",
        variables={"invoice": invoice},
    )
    if match["confidence"] < 0.8:
        aisle.integrations.slack.create_message(
            "#finance", text=match["note"],
        )

The logic stays in one place.

All the logic in one file, billed per run, and the whole script is versioned.

Predictable cost

qbash bills per run, not per step. A loop over 200 invoices with a model call and a Slack post on each is one run, not 600 tasks. A prompt is only used when you call it, so the model spend sits at points you chose.

batch.py
result = aisle.parallel(
    reconcile, invoices,
    concurrency=5, max_per_minute=60,
    checkpoint="monthly-reconcile", retry=3,
)

A test harness

Write Python-style assertions against your functions in a tests.py file. Tests run in a sandbox, so they cannot post to a real channel or bill a model call. The tests are versioned in the same revision as the code.

tests.py
def test_low_confidence_flags():
    result = reconcile(mock_invoice(amount=0))
    assert result["confidence"] < 0.8
    assert "review" in result["note"].lower()

def test_high_confidence_passes():
    result = reconcile(mock_invoice(amount=100))
    assert result["confidence"] >= 0.8

Revisions and rollback

Every save writes a version with a line-level diff. The diff shows what changed in the code and the tests together. Any version restores in one click, and a broken change is one click to undo.

Questions

Can Zapier's Code step run any Python package?

No. The sandbox includes requests and a small set of built-in modules. Custom packages, pandas, and other libraries are not available. If the logic needs a library outside the sandbox, it has to be rewritten or moved to an external service.

Does every code step count as a billable task?

Yes. Each code step execution is one task on your Zapier plan. A Zap with three code steps that runs once costs three tasks. In a loop, the count multiplies by the number of iterations.

How is qbash's pricing different from Zapier's?

qbash bills per run, not per step. Adding a loop, a branch, or a code block does not increase the cost per run. Model calls are billed at the provider's rate, and a prompt is only used when you call it.

Do I need to write Python to use qbash?

To build or change a task, yes, though the builder drafts the first version from a description. To run one, no. Typed inputs render a form, so the person who asked for the automation runs it without seeing the code.

Can I move my Zapier code steps to qbash?

The Python code itself is portable. The work is rebuilding the surrounding Zap logic as code. Describe the automation to the builder and it drafts the task. See the full qbash vs Zapier comparison for how the two platforms differ overall.

Competitor details reviewed . Vendors change plans and features without notice, so check theirs before deciding.

Ship your first task.

Open the editor, write a script against your connected accounts, and put it on a trigger. Or describe it, and the builder drafts the task as code you edit.