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.
Zapierははじめてですか?Zapierは、重要なことに集中できるようにするためのワークフロー自動化ソフトウェアです。フォーム、データテーブル、ロジックを何千ものアプリと組み合わせて、考え得るあらゆるものを構築し、自動化できます。詳しくは営業担当者にお問い合わせください。
先に進む
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.
本質的には、コード ステップを使用すると、ワークフローを完全にカスタマイズし、ビジネス プロセスを次のレベルに引き上げることができます。
主な機能は次のとおりです。
カスタム スクリプト:標準の Zapier インテグレーションでサポートされていないカスタム ロジックまたは操作を実行するための JavaScript または Python コードを記述します。
データ操作:特定の要件を満たすために、以前の Zap ステップからのデータを変換、フォーマット、または変更します。
変数のサポート:変数を使用してスクリプト内でデータを保存および操作し、コードをより動的かつ適応性のあるものにします。
組み込み Python ユーティリティ: StoreClientを使用してZap実行間でデータを保存および取得し、リクエストユーティリティを使用してHTTPリクエストを送信し、printユーティリティを使用して実行中に関数をデバッグします。
組み込みの JavaScript ユーティリティ: StoreClientを使用して Zap 実行間でデータを保存および取得し、コールバック関数を使用して完了に時間のかかるタスクを処理し、 fetchユーティリティを使用して HTTP リクエストを行い、console.log を使用して関数をデバッグします。
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.
AI コード ジェネレーター:トリガーまたはアクションをどのようにカスタマイズしたいかを (平易な英語で) 記述すると、AI が JavaScript または Python コードを作成します。
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.
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.
これは次のようになります。
A Zap is triggered every hour using Schedule by Zapier.
Code by Zapierステップは、カスタムHTTPリクエストを外部 APIエンドポイント に送信し、その応答を解析します。
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.
これは次のようになります。
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.
これは次のようになります。
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.
ヒント:問題が発生した場合、 Stack OverflowやZapier コミュニティなどのコーディング コミュニティは、他のコーディング ユーザーから支援を受けてコードを微調整したり、トラブルシューティングしたりするのに最適です。
Code by Zapierの始め方
コードステップを試してみませんか?
コードをトリガーとして使用するには、次のステップに従います。
Zap エディターでトリガー ステップをクリックし、 Code by 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.

AI にコードを書かせたい場合は、 「AI で生成」をクリックします。ダイアログ ボックスで、必要なコードを説明するプロンプトを入力します。[コードの生成]をクリックし、 [コードの使用]をクリックします。

コードの追加が完了したら、 「続行」をクリックしてコード ステップをテストします。コードが有効な場合、ステップでは成功したことが示され、データが表示されます。
ここでアクションを追加します。アクション アプリを検索して選択します。アカウントを接続し、アクション ステップを設定し、アクションをテストします。
アクション ステップを Zap に追加し終わったら、必ずオンにしてください。
コードをアクションとして使用するには、次のステップに従います。
Zap エディターでトリガー ステップをクリックし、トリガー アプリとトリガー イベントを検索して選択します。アカウントを接続し、トリガー ステップを設定し、ステップをテストします。
トリガーの設定が完了したら、 +アイコンをクリックして新しいステップを追加します。
Code by Zapierを検索して選択します。
イベントのドロップダウン メニューをクリックし、 Javascript の実行またはPython の実行を選択します。次に「続行」をクリックします。
「入力データ」フィールドにキー名を指定し、トリガー ステップからのデータをマップします。[コード] フィールドに、JavaScript または Python のコードを入力します。

AI オプションを使用する場合は、 「AI で生成」をクリックします。ダイアログ ボックスで、必要なコードを説明するプロンプトを入力します。[コードの生成]をクリックし、 [コードの使用]をクリックします。
[続行]をクリックし、 [テスト ステップ]をクリックします。コードが有効な場合、ステップでは成功したことが示され、送信されたデータが表示されます。
アクション ステップを Zap に追加し終わったら、必ずテストしてオンにしてください。
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.
コードステップを使用してビジネスの成長を促進します
Code by Zapier を使用すると、ワークフローをカスタマイズして複雑なタスクを自動化し、あらゆる API やカスタム アプリケーションとシームレスに統合し、最終的にはビジネス固有の問題を解決できます。
追加のコードレイヤーを追加することで、標準的なインテグレーションでは不可能な方法でデータを変換できます。
自分で試してみる準備はできていますか? コードステップでZapを今すぐ構築 そして、今日からあなたのビジネスを強化し始めましょう。
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.










