Best way of Passing 'current_user' with Webhook Trigger (from app) for Workflow Execution

I have one Workflow with parallel code blocks at the end, created for two separate end users. They can trigger the Workflow from the app by clicking a button.

  • If User 1 triggers the workflow, I want the flow to only run the upper path.
  • If User 2 triggers the workflow, I want the flow to only run the lower path.

What's the best way to achieve this? Can you pass 'current_user' along with the trigger and add a code block to the workflow with some conditions to determine which code blocks should be run (or skipped)?

(I am aware that I can also copy the workflow, however in this usecase I will have 40+ end users, so I don't want seperate flows).

image
Have you tried using current_user in a workflow just to check? it seems to compile fine. to answer your question though
image
workflows using a webhook trigger expect input to be an Object, so you can pass current_user just fine.

2 Likes