Custom data to send with streaming logs

Describe the problem/error/question

I’m trying to include custom metadata (like userId, projectId, and orgId) in the log stream for my n8n workflows. I can successfully add this data to the execution context using Custom Execution Data, and I can filter by it in the execution list. However, I can’t find a way to include that metadata in the log stream output in any way before potentially forking the repository and writing code.

Has anyone figured out how to include custom execution data in the log stream, or do I need to modify n8n’s internal logging/event system? I’ve tried injecting it into the log messages in custom nodes but it doesn’t seem to propagate through the event logs

Please share your workflow

Information on your n8n setup

  • n8n version:
  • 1.85.4
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Docker
  • Operating system:
1 Like

Hi @Brian_Yu ,

Can you include the sub workflow in a code step? I’d like to see what it does so I can get the data into the right format.

Best,

Robert

Yes it’s: