Need to get the flow_id in my action endpoint controller

Hi. I have an app in which I’m using shopify flow_action extension. I need to get the flow id which is triggered. I have check the doc’s but didn’t get the required one. If anyone can help me in this case.

Hi @RanaWaqar_Ahmad

Why would you need the Flow’s ID?

Hi @Dylan. So basic use case is that I’m sending email after some conditions from my app to that customer using flow and flow_action extension. So I need to record the analytics and show it on my app. So if I have flow_id I can distinguish the flows on my end.

I don’t believe the Flow API events include details about the specific workflow context.

However, what you can do is show timestamps, and merchants can tie the timestamp back to executions.

Yes. I also have checked it only send’s customer reference and other things like action run id but nothing about the Flow.

Good question — and you’re right, the Shopify documentation around Flow extensions doesn’t explicitly expose the Flow run or workflow ID in the action payload.

Here’s what’s actually available:
When your Flow Action extension is triggered, Shopify sends a payload to your endpoint containing:

Trigger data
Shop metadata
Flow-specific input values you’ve defined

However, it does not currently include the Flow run ID or workflow ID by default. Shopify’s Flow API is event-driven, and at the moment it doesn’t attach a unique Flow execution ID to each action trigger.

What you can do:

If you need to track or associate actions with a workflow:

Include a custom Flow input field in your flow setup (like a flow_reference_id or workflow_label) and pass that value from your Flow into your extension via the input schema.
Use this value as an indirect way to trace or identify the workflow instance that triggered the action.

Example of adding a custom input field:

{
  "flow_reference_id": {
    "label": "Flow Run Reference ID",
    "type": "single_line_text_field"
  }
}

Then in your Flow setup, you can pass a static or dynamic value (like a timestamp or workflow name) into this field when configuring the action.

Why this is the case:

Shopify Flow is currently stateless per action— it doesn’t expose internal workflow IDs to external apps for security and isolation reasons. The recommended way is to pass through what you need via Flow inputs.

Yes. that’s the only work around I also came up with. By creating a field and passing a reference and work with it in my app.

Thanks for the information. @Robert_Clark