Need help adapting an Outlook workflow for multiple users with Open WebUI and n8n

Hey everyone! :waving_hand:

I’m currently working on a workflow that retrieves unread emails from an Outlook inbox, analyzes the content with ChatGPT, and generates a response that is then saved as a draft email. Everything works fine for a single user, but my goal is to make this workflow adaptable for multiple users.

The issue is that, for now, the Outlook connection is made with a fixed account in the workflow, and I’m looking for a way to modify it so the workflow connects dynamically to the Outlook account of the user currently logged into Open WebUI, instead of being tied to a hardcoded account.

The workflow is connected to Open WebUI, which uses a pipe function to link Open WebUI and n8n. I want the workflow to use the Microsoft account of the logged-in user when they connect to Open WebUI to access their Outlook inbox and retrieve emails.

If anyone has experience with this or has ideas on how to adapt this workflow for multiple users, I would greatly appreciate your advice! :folded_hands:

Thanks in advance for your help! :smiling_face_with_sunglasses:

Talk soon,

Evan Cnaepelnickx

Did you found a solution?

The Outlook Credential allows you to set the shared mailbox by expression. If you pass the mailbox to the node you can act on it’s behalf.

I know it says shared but I tried it with another standard mailbox I have permissions to and was able to read the inbox