Understanding execution_data.data JSON

Hello team,

I’m having difficulty understanding the structure of the data field inside the execution_data table.

This field contains a large JSON array with many key-value pairs. However, most values are just numeric references (e.g., "1", "2", "47") and do not represent actual execution data. Some elements are arrays (e.g., ["40"]), while others are objects with keys like executionTime, startTime, data, metadata, etc., referencing these numbers.

Here’s a simplified example:

[
  {
    "startData": "1",
    "resultData": "2",
    "executionData": "3",
    "parentExecution": "4"
  },
  ["40"],
  ["41"],
  ["42"],
  {
    "hints": "43",
    "startTime": 1744774591588,
    "executionTime": 3,
    "source": "44",
    "metadata": "45",
    "executionStatus": "46",
    "data": "47"
  }
]

:question: My Goal

I’m trying to extract the execution time for each node, but I’m currently unable to link these numeric references back to the actual node identifiers, such as node name or node ID.

:mag: Expected output fields:

  • executionId
  • workflowName
  • nodeName
  • executionTime

So far, I’ve been able to retrieve almost all fields by querying the execution_data table — except for the node name.

Is there any documentation or guidance on how to resolve these internal references or decode the structure?


:information_source: My Setup

  • n8n version: 1.86.1
  • Database: PostgreSQL
  • Running via: npm
  • OS: Debian

Thanks in advance for your help!

Hi @tungns Welcome to n8n :n8n: community :tada:

If you’re trying to extract execution details, you might find it easier to use the n8n API directly…

There’s also an n8n node available that can fetch execution data, which could help you get the info you need without having to manually parse the tabe.

image

for example:

2 Likes

The numbers u see are the indexes that refer to the same array. So you need to recursively go through the array and build ur data set.
Going yhrough the API to get the data is easier. That returns it already processed.

1 Like

Oh great! I’ve got all the data I need now.

Thanks so much @mohamed3nan

1 Like

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