Hi everyone,
I’m currently building a SaaS platform on top of n8n and I’m running into challenges around Google integrations and multi-tenant credential management. I’d really appreciate feedback from anyone who has already built something similar.
Project context:
-
Users of my platform can buy prebuilt AI agents
-
Each agent is defined by a JSON model with variables
-
User-provided values are injected to generate a custom JSON
-
This JSON is then sent to the n8n REST API to programmatically create the agent (workflow) for that specific customer
So far, the workflow creation via the API works fine.
The main challenge:
After the agent is created, the Google service nodes (Sheets, Drive, Gmail, etc.) inside each agent must use the customer’s own Google account, not a shared or global one.
I’m trying to figure out the best and cleanest way to handle:
-
OAuth per customer
-
Credential isolation per tenant
-
Mapping credentials to workflows created via the API
-
Avoiding credential overwrites or security issues in a multi-tenant setup
Questions:
-
Has anyone used the n8n API to build a SaaS with per-customer Google OAuth?
-
How did you manage Google credentials dynamically for workflows created programmatically?
-
Did you rely on credential overwrites, custom OAuth flows, separate projects, or another pattern?
-
Any architectural or security pitfalls to be aware of?
Any feedback, real-world experience, or pointers to docs/examples would be extremely helpful.
Thanks in advance ![]()