Use secrets in Zapier Functions
- 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
- Your Zapier account
- Interfaces
- Canvas
- Chatbots
- Getting started
- Agents
- MCP
- Built-in tools
- Lead Router
- Apps
Table of Contents
This product is in open beta. It’s available for use but still in active development and may change.
In Zapier Functions, secrets let you securely store data, such as an API key, which can be referenced in your Functions code files.
Add a secret
- From the code editor, click the Secrets icon on the left. A sidebar will open.
- Click + Add secret. A dialog box will open.
- In the Secret name field, enter a name for your secret.
- In the Secret value field, enter the value you want to encrypt.
Reference a secret in code
Whenever you want to use the encrypted secret, enter the following code in your code file:
os.environ["<name of your secret>"]
Replace <name of your secret>
with the name you created for it.
Copy the secret reference
You can also copy the reference from the Secrets menu.
- From the code editor, click the Secrets icon on the left. A sidebar will open.
- Click the Copy icon . The code will be copied to your clipboard.
- Paste the code into your code file.
Edit a secret
You can edit a secret at any time.
- From the code editor, click the Secrets icon on the left. A sidebar will open.
- Click the three-dot icon .
- Select Edit.
- Edit any fields you need.
- Click Save.
You cannot view a secret value once it's created, but you can replace it.
Delete a secret
- From the code editor, click the Secrets icon on the left. A sidebar will open.
- Click the three-dot icon .
- Select Delete.
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.