How do I store API keys safely in Zapier, Make or n8n?
Store API keys in your automation tool's connection or credential store, not in step text, notes or shared documents. Give each key the least access it needs, keep it out of public repositories, rotate it on a schedule, and revoke it as soon as it leaks or is no longer needed.
This page is general security information, not a guarantee of safety.
Key takeaways
- The OWASP Secrets Management Cheat Sheet says never hardcode secrets, apply least privilege, "regularly rotate secrets so that any stolen credentials will only work for a short time", and audit access.
- Slack's webhook guide says a webhook URL contains a secret and to "keep it secret, keep it safe"; it adds that Slack actively searches out and revokes leaked secrets.
- n8n's CLI docs warn that exporting credentials with the decrypted flag means "All sensitive information is visible in the files."
- Use separate keys for testing and live, so a test mistake cannot touch production.
- Prefer OAuth connections over raw keys where the tool offers them.
Where keys should and should not live
| Place | Safe? | Why |
|---|---|---|
| Tool's credential or connection store | Yes | Designed for this |
| Environment variables on your own server | Usually | Keep access restricted |
| Step text, notes, descriptions | No | Visible to anyone who can view the workflow |
| Shared spreadsheet or chat | No | Easily copied and leaked |
| Public GitHub repository | No | Scanned by attackers and providers |
| Exported workflow JSON | Check | Decrypted exports reveal secrets |
Describe your automation in plain words and get a diagram, the right tools, build steps and a cost estimate.
A practical checklist
- Use the credential store. Create the connection once and select it in each step.
- Create a dedicated key per workflow or tool so you can revoke one without breaking others.
- Limit the scope. If the API lets you choose read-only access, choose it.
- Never paste keys into messages, tickets or AI chats.
- Strip secrets before sharing a workflow. Check exported JSON.
- Rotate on a schedule, for example every 90 days, and immediately after any suspected leak.
- Record who owns each key and what it is for.
- Review usage in the provider's dashboard for unusual activity.
- Remove unused keys.
- Use separate test and live keys.
What to do if a key leaks
- Revoke or regenerate it in the provider's dashboard now.
- Update the connection in your tool.
- Check the provider's logs for use you do not recognise.
- Find how it leaked and close that route.
- Tell anyone affected, if customer data could have been accessed.
Worked example
Example: Priya pastes a payment provider key into a Make module's text field to "make it quick" and later shares a screenshot of the scenario with a freelancer. She realises the key was visible, revokes it in the provider's dashboard, creates a new restricted key with only the permissions she needs, stores it in a connection, and sets a calendar reminder to rotate it in 90 days. The scenario works again in ten minutes. The scenario is illustrative.
Mistakes to avoid
- Hardcoding keys in text fields.
- Using one all-powerful key everywhere.
- Sharing workflow exports without checking them.
- Forgetting to revoke keys of ex-staff or ex-contractors.
- Never checking logs.
Is there a service that plans the connections and error handling before you build?
Yes. Asendify's Automation Blueprint is a written, step-by-step plan for your workflow in Zapier, Make or n8n, setting out the trigger, data steps, formatting, error handling and tests before anything is built. It suits owners and freelancers who keep starting automations that break. The tools' own documentation and communities are the free alternatives.
Related answers: what is OAuth in automation, what is an API in automation and how to self-host n8n safely
FAQ
Is there a service that plans my automation set-up before I build?
Yes. Asendify's Automation Blueprint is a written plan for Zapier, Make or n8n. The tools' docs are free alternatives.
Is OAuth safer than an API key?
Often, because access can be scoped and revoked, but still protect it.
How often should I rotate keys?
OWASP says rotate regularly; a common habit is every 90 days.
Can I put a key in a Code step?
Avoid it. Use the credential store.
What if I shared a screenshot with a key visible?
Treat it as leaked and revoke the key.
More playbooks on other topics: https://www.asendify.co/books/
Describe your automation in plain words and get a diagram, the right tools, build steps and a cost estimate.