Best Practices on Dynamic Credentials?

Hey guys,

I know N8N doesn’t natively support dynamic credentials out of the box and there are a number workarounds I’ve seen people apply. I’m curious to hear the communities perspective on the best way to do this and any resources that might be helpful to solve this problem. I have a SAAS I’ve been building for sometime now. I have a multi-factor authentication all set-up within the app and have a chatbot. I’d like to connect the chatbot to N8N and run it through some multi-agents I’ve built.

However each user is fully authenticated on my app and has their own workspace (in some cases many). What are best practices / how do people building SAAS platforms normally use N8N to dynamically switch between users while keeping just one N8N environment? Namely - if Sally (one of my users) runs a query to trigger my AI agents and then Tom (another user) triggers another query, how do most people switch credential? Are there any tutorials that walk through the whole process?

Also - if a user is authenticated in my app, can i use the chatbot to pass the authentication and run

commands via n8n on their computer. For example, if someone types in: “Draft an email in GMAIL” → this passes to N8N which runs a workflow and uses their credentials to open their GMAIL on their computer without having to manually set-up individual users using Google Cloud Console.

Any advice, resources would be greatly appreciated.

I did not get the dynamic credentials part of your question. we can use expressions when creating credentials and read for example the token from $input ( {{ $json.token }} for instance) so we have a single node and a single credentials but the token changes based on the input of the node

1 Like

My main blocker right now. How can I authenticate a node for different users? with their data in the supabase