Zapier makes automation easy for anyone. But what if you need to handle advanced logic, work with sensitive data, or bring in a Python library that isn’t available in the built-in Code by Zapier step? That’s where Zapier Functions come in.
With Functions, you can run custom Python code in a secure development environment. And now, with the ability to call a Function from a Zap, you can combine the flexibility of custom code with the power and scalability of Zapier’s automation platform.
Why call a Function from a Zap?
If you’ve used the Code by Zapier step, you already know how handy it is for quick calculations, basic API calls, or manipulating data inline using a few lines of code. It’s a fast and lightweight tool that fits seamlessly into many workflows.
When your logic gets more complex, though, Functions help take it to the next level:
🧠 Handle advanced logic that might otherwise require multiple Zap steps or external systems
✅ Use Python packages (like Pandas for data analysis, NumPy for scientific computing, or TensorFlow for machine learning and AI)
🔐 Access secrets securely, such as API keys or tokens
💻 Write and test reusable code in a structured environment
Think of Code by Zapier as the quick, lightweight tool, and Functions as the complete dev toolkit. Together, they make your automations more powerful and flexible than ever.
How to call a Function from a Zap
Here’s how to set up your first Zap with a function step.
1. Add a trigger
Start with any Zap trigger you like, from any app.
2. Add a “Call a Function” action
Choose Functions by Zapier as the app, and select Call a Function as the action event.

3. Create a new Function
You’ll see a link to create a new Function. Click it to go directly to the Function editor.

📌 Pro tip: Functions can be called from multiple Zaps, so that you can reuse logic across workflows.
4. Add a “Start a Function” trigger
Want to trigger Zaps from your Function? Add the Start a Function trigger to any Zap. Learn more about Function triggers →

5. Write your code
Once inside the Function editor, you can:
Use advanced Python features and libraries
Reference secrets for secure API access
Write modular code for data processing or for leveraging external integrations
Explore how to write code in Functions →
6. Return results to your Zap
Your Function can return structured data to the Zap, which becomes available for use in any subsequent step—like sending an email, updating a CRM, or posting to Slack. To return the structured data you need, add a Return from a Function (return_action) action event in your code.
Learn more about how to call Functions from Zaps
How to choose between Functions and Code steps
Use the Code by Zapier app when you need to:
Run quick scripts in JavaScript or Python
Perform inline data formatting
Add lightweight logic to a single Zap
Reach for Functions when you need to:
Leverage existing Python packages
Process or transform data at scale
Securely manage secrets
Reuse business logic across Zaps
Calling Functions from Zaps represents an exciting evolution in our commitment to empowering users with flexible automation tools. By combining the power of code with the accessibility of Zapier's intuitive interface, we’re bringing serious programming power to your no-code workflows. Try calling a Function from a Zap today! Get started with Zapier Functions →