With Zapier, you can connect thousands of apps inside a Zap (what we call an automated workflow). Add forms, tables, and the ability to reach your data from any AI tool to the mix, and there's a lot you can do.
But sometimes you need more. Maybe Zapier's existing actions or triggers can't quite get you where you need to go. Maybe you're pulling information from App A, but it's not in the right format for App B. Or maybe you have something more involved in mind, like looping through records from one app, calling a second app for each one, then writing the results to a third.
That's where Code by Zapier comes in. It's a built-in tool that lets you drop custom code—JavaScript or Python—directly into your Zap workflows, so you can handle the edge cases, transformations, and logic that standard actions can't. Here's how it works.
¿Es la primera vez que usas Zapier? Es un software de automatización de flujos de trabajo que te permite centrarte en lo que realmente importa. Combina formularios, tablas de datos y lógica con miles de aplicaciones para crear y automatizar cualquier cosa que puedas imaginar. Contacta con ventas para saber más.
Saltar adelante
¿Qué es Code by Zapier?
Code by Zapier lets you add custom code to your Zap workflows so you can perform specific tasks that go beyond the pre-built triggers and actions provided by Zapier's existing integrations.
Code steps act just like any other trigger or action, with one important difference: you tell those steps what to do in Python or JavaScript. These extra instructions within your Zap workflows can come in handy when you need to do something more advanced that Zapier might not natively support. You might, for example, use code steps to implement complex lookup tables, process line items, clean up raw data like XML, or retrieve dynamic dates from your data.
When used as a trigger, Code by Zapier typically processes input data or checks for specific conditions to decide if the workflow should start. As an action, it allows you to write code that will interact with data coming from the trigger or a previous action step. Actions using code can process information, rearrange data, or retrieve data from an API before sending it on to later steps in your Zap. By default, these steps run for two minutes, but you can increase that runtime by up to 10 minutes total.
In the Zap editor, you can choose to extend a code step's runtime by one, two, four, or eight minutes. Normally, increments of actual runtime cost additional tasks (rounded up for partial minutes). But for a limited time, extended runs are free.

You can also reach the Zapier SDK from inside your code steps. This lets you call any Zapier-connected app and opens the door to complex, multi-app workflows—like chained requests, pagination, and retries—all in a single step. Because each step can run for up to 10 minutes, longer jobs won't hit timeout failures. And you can choose exactly which apps and accounts the step can reach, so you're never handing your code broad or autonomous access to your credentials.
Note: The Zapier SDK in code steps supports only JavaScript for now.
Using Code by Zapier isn't limited to developers. If you don't know how to write code at all—or you just get stuck—you can use AI directly within the Zap editor to generate code snippets by simply describing what you'd like to do.
En esencia, los pasos de código le permiten personalizar completamente sus flujos de trabajo y llevar sus procesos de negocio al siguiente nivel.
Las características principales incluyen:
Scripts personalizados: escriba código JavaScript o Python para ejecutar lógica u operaciones personalizadas no compatibles con las integraciones estándar de Zapier.
Manipulación de datos: transformar, formatear o modificar datos de pasos anteriores de Zap para cumplir con requisitos específicos.
Soporte de variables: utilice variables para almacenar y manipular datos dentro de sus scripts, haciendo que su código sea más dinámico y adaptable.
Utilidades de Python incorporadas: almacene y recupere datos entre ejecuciones de Zap con StoreClient, envíe solicitudes HTTP con la utilidad solicitud y utilice la utilidad de impresión para depurar su función durante la ejecución.
Utilidades de JavaScript incorporadas: almacene y recupere datos entre ejecuciones de Zap con StoreClient, use funciones de devolución de llamada para manejar tareas que toman tiempo en completarse, realice solicitudes HTTP con la utilidad fetch y depure su función con console.registro.
Extended runtime: Each step runs for two minutes by default, but you can extend that up to a 10-minute max. And, for a limited time, the extra runtime is free.
Generador de código de IA: Describe cómo te gustaría personalizar tu trigger o acción (en inglés sencillo), y la IA escribirá el código JavaScript o Python para ti.
Testing and debugging: Run your Zap via the dashboard to confirm the behavior you expect and check your Zap history for information around your code steps' input data, output details, and logs.
Zapier SDK access: Call any Zapier-connected app from a single code step to handle complex logic like chained calls or custom orchestration, and pick exactly which apps and accounts that step can reach.
Qué puedes hacer con Code by Zapier
With Code by Zapier, the possibilities are endless. While most use cases will depend on your unique business challenges, here are a few popular examples.
Send scheduled HTTP requests to an external API
You want to send or retrieve data from an app that doesn't have a native Zapier integration.
Cómo podría verse esto:
A Zap is triggered every hour using Schedule by Zapier.
Un paso de Code by Zapier envía una solicitud HTTP personalizada a un punto de conexión externo de la API y analiza la respuesta.
The parsed API response is used to add or update a row to a Google sheet.
Parsing and transforming Slack messages with JavaScript
You want to extract and clean up specific data from Slack messages before sending them to another app, without relying on multiple Formatter steps.
Cómo podría verse esto:
A new message is posted to a Slack channel.
A Code by Zapier step parses the message text, removes user mentions, and extracts the relevant content using regex.
The cleaned message text is sent to Airtable as a structured field in a new record.

Note: For most single-step changes—like splitting a field, finding and replacing values, or adjusting case, you can use Formatter instead. Code steps are for you if you need more control or complexity, like combining multiple adjustments into a single step that might otherwise require several Formatter action steps.
Normalizing timestamps for table storage
Your incoming table records use ambiguous or inconsistent date formats, and you want to make sure timestamps are stored consistently.
Cómo podría verse esto:
A record is added or updated in Zapier Tables.
A Code by Zapier step explicitly parses the incoming timestamp and converts it to ISO 8601 in UTC.
The normalized timestamp is written back to Zapier Tables by updating the original record.
Consejo: si te encuentras con problemas, las comunidades de codificación como Stack Overflow o la Comunidad Zapier son excelentes para obtener ayuda de otros codificadores para ajustar tu código o solucionar problemas.
Cómo empezar a usar Code by Zapier
¿Quieres probar un paso de código?
Para utilizar el código como trigger, siga estos pasos:
En el editor de Zap, haga clic en el paso desencadenante, luego busque y seleccione Código de Zapier.
Click the event dropdown menu and select Run Javascript or Run Python, then click Continue.

In the Configure tab, use the Code field to enter your JavaScript or Python code.

Si desea que la IA escriba el código para usted, haga clic en Generar con IA. En el cuadro de diálogo, ingrese un mensaje que describa el código deseado. Haga clic en Generar código y luego clic en Usar código.

Una vez que haya terminado de agregar su código, haga clic en Continuar para probar su paso de código. Si su código es válido, el paso mostrará que fue exitoso y mostrará los datos.
Ahora es el momento de agregar una acción. Busque y seleccione su aplicación de acción. Conecte su cuenta, configure el paso de acción y pruebe la acción.
Una vez que hayas terminado de agregar tus pasos de acción a tu Zap, recuerda activarlo.
Para utilizar el Código como acción, siga estos pasos:
En el editor Zap, haga clic en el paso de activación, luego busque y seleccione su aplicación de activación y el evento de activación. Conecte su cuenta, configure el paso trigger y pruebe el paso.
Una vez que haya terminado de configurar su trigger, haga clic en el ícono +para agregar un nuevo paso.
Busque y seleccione Código de Zapier.
Haga clic en el menú desplegable del evento y seleccione Ejecutar Javascript o Ejecutar Python. Luego haga clic en Continuar.
En el campo Datos de entrada , proporcione un nombre de clave y asigne los datos de su paso de activación. En el campo Código , ingrese su código JavaScript o Python.

Si desea utilizar la opción IA, haga clic en Generar con IA. En el cuadro de diálogo, ingrese un mensaje que describa el código deseado. Haga clic en Generar código y luego clic en Usar código.
Haga clic Continuar, luego clic paso de prueba. Si su código es válido, el paso mostrará que fue exitoso y mostrará los datos enviados.
Una vez que hayas terminado de agregar tus pasos de acción a tu Zap, recuerda probarlo y activarlo.
For more information on setting up code steps in your Zap, check out our JavaScript or Python help guides for step-by-step instructions.
Did you know? You can ask Copilot, Zapier's built-in AI assistant, to brainstorm, build, configure, and maintain cross-product automated systems.

To get step-by-step instructions for adding the Zapier SDK to a code step, visit our help docs.
Utilice pasos de código para impulsar el crecimiento de su negocio
Con Code by Zapier, puedes personalizar tus flujos de trabajo para que automaticen tareas complejas, se integren perfectamente con cualquier API o aplicación personalizada y, en última instancia, resuelvan problemas exclusivos de tu negocio.
Al agregar esa capa adicional de código, puede transformar sus datos de maneras que las integraciones estándar no pueden.
¿Estás listo para probarlo tú mismo? Crea un Zap con pasos de código ahora y comience a impulsar su negocio hoy mismo.
This guide was originally published in May 2022 by Tyler Robertson with previous updates from Elena Alston. It was most recently updated in June 2026.










