# $workflow.executionId \[GOT CREATED\]

**URL:** <https://community.n8n.io/t/workflow-executionid-got-created/5586>\
**Category:** Feature Requests (done)\
**Created:** [May 3, 2021, 7:42pm UTC](https://community.n8n.io/t/workflow-executionid-got-created/5586 "2021-05-03T19:42:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AllanDaemon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/allandaemon/32/2968_2.png) [@AllanDaemon](https://community.n8n.io/u/AllanDaemon)\
**Post date:** [May 3, 2021, 7:42pm UTC](https://community.n8n.io/t/workflow-executionid-got-created/5586/1 "2021-05-03T19:42:17Z")

</div>

In the execution of a workflow, we have access to the `$workflow` data: `isActive`, `workflowId`, `workflowName`.

I think that now you know the final id of the execution when it starts. Assuming that, it would be nice if we could have access to the execution id also. It could be something like `$workflow.executionId`. Other data that now is available could also be added.

I saw in the `packages/workflow/src/WorkflowDataProxy.ts` that it gets the data from the object of the type `Workflow` (`packages/workflow/src/Workflow.ts`). So the execution Id isn’t in this class, so instead of putting it in the `$workflow`, it would make more sense to create an `$execution` variable.

Anyway, I would love to have the execution id in the workflow, so then I have to debug something outside, I could just look up the id returned in some webhook and easily find the execution I should look, instead of looking through dozens of executions and maybe dealing with cases that the executions weren’t saved (by wrong settings or bugs).

> **[Expressions | n8n Docs](https://docs.n8n.io/code-examples/expressions/)**
>
> Documentation for n8n, a workflow automation platform.

---

<div class="post-metadata">

**Author:** ![AntonAndreevichMoroz](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/antonandreevichmoroz/32/5845_2.png) [@AntonAndreevichMoroz](https://community.n8n.io/u/AntonAndreevichMoroz)\
**Post date:** [May 11, 2021, 11:43am UTC](https://community.n8n.io/t/workflow-executionid-got-created/5586/2 "2021-05-11T11:43:11Z")

</div>

Oh, I ran into this too. I generate a unique code in the process and I need to compare the returned code with a specific launch. Then I can save information which code was generated at which start. Is there a solution for this?

---

<div class="post-metadata">

**Author:** ![lublak](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/lublak/32/9258_2.png) [@lublak](https://community.n8n.io/u/lublak)\
**Post date:** [May 12, 2021, 7:41am UTC](https://community.n8n.io/t/workflow-executionid-got-created/5586/3 "2021-05-12T07:41:51Z")

</div>

Topical is a good idea. Only the error trigger currently gets this data: [https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/nodes/ErrorTrigger.node.ts](https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/nodes/ErrorTrigger.node.ts)

---

<div class="post-metadata">

**Author:** ![nsk](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@nsk](https://community.n8n.io/u/nsk)\
**Post date:** [May 19, 2021, 4:33am UTC](https://community.n8n.io/t/workflow-executionid-got-created/5586/4 "2021-05-19T04:33:51Z")

</div>

I am also looking for this. It will help us better in troubleshooting and developing the better workflows.

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [September 5, 2023, 2:37pm UTC](https://community.n8n.io/t/workflow-executionid-got-created/5586/5 "2023-09-05T14:37:10Z")

</div>

I am sure you have all found it by now but we do have `{{ $execution.id }}` available which will return the execution id of the running workflow.
