Skip to main content
GET
/
api
/
execution
/
{id}
Get Execution
curl --request GET \
  --url https://api.example.com/api/execution/{id}
{
  "success": true,
  "data": {
    "id": "<string>",
    "workflowId": "<string>",
    "workflowName": "<string>",
    "status": "<string>",
    "mode": "<string>",
    "startedAt": "<string>",
    "stoppedAt": "<string>",
    "finished": true,
    "data": {}
  },
  "_errorAnalysis": {
    "summary": {},
    "errorNode": {},
    "upstreamNode": {},
    "executionPath": [
      {}
    ],
    "debuggingHints": [
      {}
    ]
  }
}

Overview

The n8n_executions tool with action='get' retrieves detailed execution information. Use different modes to control data size and focus on relevant information.
Use mode='error' for fast error debugging with optimized data filtering and upstream context.

Parameters

Required

action
string
required
Must be set to "get" for retrieving execution details.
id
string
required
Execution ID to retrieve. Obtained from n8n_test_workflow response or n8n_executions list.

Detail Modes

mode
enum
default:"summary"
Controls the level of detail and data filtering.

Filtered Mode Options

nodeNames
array
For mode='filtered': Array of node names to include. Other nodes are omitted from the response.
Example
["HTTP Request", "Set Variables", "Webhook Response"]
itemsLimit
number
default:"2"
For mode='filtered': Number of items to return per node.
  • 0 - Structure only (node names, status)
  • 2 - Default (first 2 items)
  • -1 - Unlimited (all items)
  • Any positive integer - First N items
includeInputData
boolean
default:"false"
Include input data in addition to output data for each node.

Error Mode Options

errorItemsLimit
number
default:"2"
For mode='error': Number of sample items to include from upstream node.
  • Minimum: 0 (no sample data)
  • Maximum: 100
  • Default: 2 (sufficient for debugging)
includeStackTrace
boolean
default:"false"
For mode='error': Include full stack trace. By default, stack traces are truncated to first 5 lines.
includeExecutionPath
boolean
default:"true"
For mode='error': Include the execution path showing which nodes were executed before the error.
fetchWorkflow
boolean
default:"true"
For mode='error': Fetch workflow structure for accurate upstream node detection. Improves error context accuracy.

Response Fields

success
boolean
required
Indicates if the request was successful.
data
object
Execution details object. Structure varies by mode.

Error Mode Response

When mode='error', the response includes specialized error debugging information:
_errorAnalysis
object
Error analysis container (only present for failed executions).

Examples

{
  "action": "get",
  "id": "exec_789xyz",
  "mode": "preview"
}

Response Examples

{
  "success": true,
  "data": {
    "id": "exec_789xyz",
    "workflowId": "abc123",
    "workflowName": "Customer Onboarding",
    "status": "success",
    "mode": "webhook",
    "finished": true,
    "startedAt": "2024-01-15T10:30:00.000Z",
    "stoppedAt": "2024-01-15T10:30:05.234Z",
    "data": {
      "resultData": {
        "runData": {
          "Webhook": [
            {
              "startTime": 1705315800000,
              "executionTime": 5,
              "source": [],
              "data": {
                "main": [
                  [
                    {
                      "json": {
                        "name": "John Doe",
                        "email": "[email protected]"
                      }
                    },
                    {
                      "json": {
                        "name": "Jane Smith",
                        "email": "[email protected]"
                      }
                    }
                  ]
                ]
              }
            }
          ],
          "Create Customer": [
            {
              "startTime": 1705315801000,
              "executionTime": 234,
              "source": [{"previousNode": "Webhook"}],
              "data": {
                "main": [
                  [
                    {
                      "json": {
                        "id": "cust_123",
                        "status": "created"
                      }
                    },
                    {
                      "json": {
                        "id": "cust_124",
                        "status": "created"
                      }
                    }
                  ]
                ]
              }
            }
          ]
        }
      }
    }
  }
}

Mode Comparison

ModeData SizeUse CaseResponse Time
previewSmallestQuick status checkFastest
summarySmallGeneral debuggingFast
filteredMediumTargeted analysisMedium
errorSmall-MediumError debuggingFast
fullLargestComplete auditSlowest

Best Practices

  • Preview: Check execution status and node structure
  • Summary: Default for most debugging scenarios
  • Filtered: When you know which nodes to inspect
  • Error: First choice for failed executions
  • Full: Only when complete data is required (exports, audits)
  1. Use mode='error' to get error analysis
  2. Check _errorAnalysis.debuggingHints for quick fixes
  3. Examine upstreamNode.sampleItems to understand input data
  4. Review executionPath to trace execution flow
  5. Use includeStackTrace: true only if hints aren’t sufficient
  • Start with mode='preview' or mode='summary'
  • Use filtered mode with specific nodeNames when possible
  • Set appropriate itemsLimit (usually 2-5 items is sufficient)
  • Avoid mode='full' for workflows with large datasets
  • Use includeInputData: false unless specifically needed
  • Check finished field before processing data
  • For finished: false, poll periodically with mode='preview'
  • Once finished, retrieve full data with appropriate mode

Common Patterns

Quick Status Check

{
  "action": "get",
  "id": "exec_123",
  "mode": "preview"
}

Debug Specific Nodes

{
  "action": "get",
  "id": "exec_123",
  "mode": "filtered",
  "nodeNames": ["Failing Node"],
  "itemsLimit": 10,
  "includeInputData": true
}

Analyze Error

{
  "action": "get",
  "id": "exec_error",
  "mode": "error",
  "errorItemsLimit": 5
}

Export Complete Data

{
  "action": "get",
  "id": "exec_123",
  "mode": "full",
  "includeInputData": true
}

Build docs developers (and LLMs) love