Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Contact Us
  • Home
  • Built-in tools
  • Functions
  • Create a function

Create a workflow using Python with Functions

Written by Owner

Updated at August 20th, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Tables
    Work with tables Manage tables Create tables Troubleshoot Zapier Tables
  • Product updates
    Product updates: January 2023 Product updates: March 2023 Product updates: February 2023 Product updates: April 2023 Product updates: May 2023 Product updates: June 2023 Product updates: July 2023 Product updates: August 2023 Product updates: September 2023 Product updates: October 2023 Product updates: November 2023 Product updates: December 2023 Product updates: January 2024 Product updates: February 2024 Product updates: March 2024 Product updates: April 2024 Product updates: May 2024 Product updates: June 2024 Product updates: July 2024 Product updates: August 2024 Product updates: September 2024 Product updates: October 2024 Product updates: November 2024 Product updates: December 2024 Product updates: January 2025 Product updates: February 2025 Product updates: March 2025 Product updates: April 2025 Product updates: May 2025 Product updates: June 2025 Product updates: July 2025 Product updates: August 2025
  • Zaps
    Zap basics Zap history Troubleshoot Zaps Manage your Zaps Do more with Zaps
  • Your Zapier account
    Plans Billing Account profile Notifications Data privacy & security Get help User roles and permissions
  • Interfaces
    Troubleshoot Zapier Interfaces Create an interface Use interface components Manage interfaces
  • Canvas
    Create a canvas Collaborate on a canvas
  • Chatbots
    Add logic and knowledge to chatbots Troubleshoot chatbots Create chatbots Manage chatbots
  • Getting started
    Intro to Zapier Set up your Zapier account Use case templates
  • Agents
    Create agents Manage agents Troubleshoot agents
  • MCP
    Set up MCP
  • Built-in tools
    Filter & Paths Formatter Schedule & Delay Email, IMAP, SMTP, & Email Parser Webhooks & Code Storage, Digest, & RSS Sub-Zap & Looping Other built-in tools Custom Actions & API Requests Functions AI by Zapier & AI actions Copilot Human in the Loop
  • Lead Router
    Create routers
  • Apps
    Connect and manage your app connections AI apps on Zapier Apps on Zapier
+ More

Table of Contents

Sign up for Functions Create a new function Add triggers The main.py file and other code files Use Copilot to make changes Test your code Deploy your function Task usage in Zapier Functions Limitations Provide feedback and get help

Zapier Functions lets you use Python code to build workflows, creating triggers and actions that can directly interact with your code. It also provides an easy way to authenticate your app accounts. Each function can use multiple triggers and actions, and you can create and reuse Python functions and import the most common packages.

miscBoltAlt icon Beta

This product is in open beta. It’s available for use but still in active development and may change.

Sign up for Functions

To get started with Functions:

  1. Go to https://zapier.com/functions.
  2. Click Try the Beta.
    • If you're on an Enterprise plan, ask the Account Owner or an Admin to opt in to Functions.
  3. Once you've been added to the beta program, you'll receive an email from Zapier’s Functions team. From the email, you can log in to your Zapier account or sign up for one.

Create a new function

Once you have access to Zapier Functions, to create a function:

  1. From the Functions home, click + Create.
  2. In the dialog box, enter a name for your function.
  3. Click Create.

Functions are composed of trigger files and code files. A file named main.py is created for every new function. Once you deploy the function, this file runs and can call on other files. You can start writing your code right away and all changes are automatically saved.

Screen Shot 2025-08-15 at 11.53.21 AM.png

Add triggers

A trigger is an event that starts your workflow. You can add multiple triggers for each function you write.  Once a trigger is set up, you can reference its outputs within the main.py file or any other code files you create. Learn more about setting up function triggers.

The main.py file and other code files

Your code files are where you write Python code, which will include your Zapier actions. When you deploy your function, Zapier will run your main.py file and execute anything included in it whenever the trigger events happen.

You can create several code files to reuse and organize Python functions. Learn how to work with code files.

Use Copilot to make changes

You can chat with Copilot to create and update triggers, actions, and debug your function. To open Copilot, click the Copilot icon on the bottom of the left sidebar.

In the chat text field on the bottom left, enter the changes you want to make and press Enter on your keyboard, or click the Send icon .

Click the Stop button in the chat field to stop the AI generation.

Test your code

You can test your code at any time by clicking Run function in the right sidebar. When Zapier runs your code, the trigger sample data you selected will be injected into zapier.trigger_output.

Functions have a 5-minute runtime limit. If execution reaches this limit, the function stops immediately, and any remaining code is not run.

To select a different trigger sample:

  1. In the Test tab, on the right side of the screen, click the Selected Trigger dropdown menu to select a different trigger.
  2. In the Sample data section, click the radio button beside the record number you want to use.

Deploy your function

When you deploy a function, it monitors your trigger apps for trigger events. Once one of them occurs, the function runs the code on main.py. 

To deploy a function:

  1. Click the Deploy button at the top right. A dialog box will appear.
  2. In the Notes field, enter any information about the function. These notes will be attached to the current version of your function.
  3. Click Deploy.

Functions have a 5-minute runtime limit. If execution reaches this limit, the function stops immediately, and any remaining code is not run.

miscEye icon Note

You cannot deploy a function that contains parsing errors. If there are any, Functions will display a notification when you try to deploy. You must return to the file that contains errors and fix them.

Task usage in Zapier Functions

A task is used in Zapier Functions for each successful zapier.action call made in production. No task is used when testing a function. Learn more about what counts as task usage in Zapier products.

Limitations

During the beta period, Functions has the following limitations:

  • You can have up to 4 functions.
  • You can use up to 1,500 tasks per month. 

Provide feedback and get help

Submit a feature request, provide feedback on existing features, or get help from the Zapier Functions team. You can also discuss Functions with other users on Zapier's Early Access Program Slack.

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Create trigger events for your functions
  • Write code in Zapier Functions
  • Import packages in Zapier Functions
  • Use secrets in Zapier Functions
  • Error handling in Zapier Functions

Copyright 2025 – OBZ-Zapier.

Knowledge Base Software powered by Helpjuice

Expand