Getting n8n logged in username

Hello n8n community,

I am building a workflow that starts with the Chat Trigger. My goal is to personalize the conversation and perform user-specific actions based on the identity of the person interacting with the chat.

I have been looking through the data output by the Chat Trigger, but I can’t seem to find any information about the n8n user who initiated the chat session. I was expecting to find properties like user.name or user.email in the trigger’s JSON output, but this information doesn’t appear to be available.

My question is:

Is there a built-in way to access the details (specifically the username and/or email) of the authenticated n8n user who runs a workflow via the Chat Trigger?

If this is not natively supported, could anyone suggest a recommended workaround to achieve this? For example, is there another way to identify the user session?

Thank you in advance for any help or guidance you can provide!

Information on your n8n setup

  • n8n version:
  • Database SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via npm
  • Operating system: ubuntu

Hey, the chat trigger is not really meant to be used in that specific use case, so that’s probably the reason why it also doesn’t capture that data. If you think about it, it will usually be served somewhere outside n8n.

This sounds like a perfect post for Feature Requests btw, feel free to post there too!

As a simple workaround (I’m sure you thought of that) - maybe ask the user for the needed data after their first message?

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.