Code by Zapier lets you run custom JavaScript or Python code as steps in your Zap workflows. Use code steps to transform data, perform calculations, make API calls, or handle logic that is not possible with built-in Zapier actions.
Code steps work as both triggers and actions. Action steps can use the Zapier SDK to call other Zapier apps directly from your code, and can install third-party packages from npm or PyPI.
When to use Code steps
Code steps are useful when you need to:
- Transform data in ways that Formatter cannot handle
- Make API calls to services that do not have a Zapier integration
- Call APIs with stored credentials without exposing keys in your code (using API by Zapier with the Zapier SDK)
- Perform calculations or complex logic
- Parse or generate structured data like JSON or XML
- Orchestrate multiple apps in a single step using the Zapier SDK
Get started
Limitations
Runtime limits
On Professional, Team, and Enterprise plans, Code by Zapier action steps can run for up to 10 minutes using extended runtimes. Extended runtimes are useful for multi-API orchestration, LLM chaining, data-heavy transforms, and complex automation patterns.
Every Code step also has a standard runtime before it times out. If your code exceeds the configured limit, the step fails with a timeout error.
| Plan | Standard runtime | Memory |
|---|---|---|
| Free | 1 second | 512 MB |
| Trial | Matches the plan you're trialing | 512 MB |
| Professional | 30 seconds | 512 MB |
| Team | 30 seconds | 512 MB |
| Enterprise | 2 minutes | 512 MB |
Learn how to configure extended runtimes for Code steps and how Code by Zapier usage is measured.
Authenticated API calls
Code by Zapier does not support storing secrets in code. To make authenticated API calls safely:
- Apps with a Zapier integration: Use the Zapier SDK with your app connections. Credentials are handled automatically and are not exposed in your code.
- Apps without a Zapier integration, or API endpoints not available in standard app actions: Use an API by Zapier connection with the Zapier SDK. Credentials are stored in the connection and injected by Zapier. They are not exposed in your code, Zap history, or logs.
If you're migrating from Zapier Functions, learn more in Migrate from Zapier Functions to Code by Zapier.
Rate limits
Code steps are rate limited to prevent overloading Zapier's infrastructure. When your Zap exceeds these limits, runs are held until the limit resets.
| Plan | Rate limit |
|---|---|
| Free | 10 requests every 60 seconds |
| Trial | 75 requests every 10 seconds |
| Professional and Team | 225 requests every 10 seconds |
| Enterprise | 225 requests every 10 seconds |
Learn more about Code by Zapier rate limits.
Other limits
- Extended runtimes and the Zapier SDK are not available for Code triggers, only actions.
- For Code triggers, you cannot map fields from previous Zap steps. For Code actions, use the Input Data dictionary to pass data from previous steps into your code.
- Dates and times in Code steps use the UTC timezone, even if a different one is set for your account or Zap.
- Only JavaScript (Node.js 22) and Python 3.13 are supported.
Related resources
- How is Code by Zapier usage measured?
- Use the Zapier SDK in Code steps
- Use third-party packages in Code steps
- Configure extended runtimes for Code steps
- How to get started with API by Zapier
- Migrate from Zapier Functions to Code by Zapier
- JavaScript code examples
- Python code examples
- Troubleshooting Code (JavaScript)