How to Handle Multi-User Gmail & Google Calendar Integration in n8n (App-Based Environment)?

Hi everyone :waving_hand:,

I’m working on building an AI assistant inside a mobile app (Flutter) where multiple users (employees) can send emails and create calendar events using their own Gmail & Google Calendar accounts, all via n8n workflows.

Users authenticate once via Google OAuth in the mobile app, and we’d like to automate workflows using their tokens afterward — without manually pre-storing hundreds/thousands of Google credentials in n8n.

:red_question_mark: My Key Question:

How can I build a scalable, secure solution in n8n where each app user can use their own Gmail & Calendar via OAuth without manually managing their credentials in n8n?

Hello @Qkhanhss1,
n8n I do not currently believe it supports dynamic credentials within the same flow: each node uses a static set of credentials.

Since you have a flutter app as a frontend, maybe you can think of a workaround by saving users’ access tokens in a database after a frontend login.

I think you can then create HTTP nodes for Gmail or Calendar by going to retrieve the tokens in the authentication header

I am doing this, thanks for your advice.