# Using MarkItDown in n8n

> Run MarkItDown from an n8n workflow with the Execute Command node, tested on n8n 2.35.7: the node is off by default and must be enabled. Other routes untested.

Source: https://markitdown.dev/recipes/n8n/ · Updated 2026-11-16·Upstream source ↗

n8n has no built-in MarkItDown step. We tested one way to add it: the Execute Command node running the `markitdown` command. It worked, but only after we enabled the node, because n8n 2.35.7 does not load it by default. The other routes people use, a community node or an HTTP call to your own service, we did not test.

> **Short answer**
>
> The Execute Command node must be switched on and `markitdown` must be installed where n8n runs. With the node enabled, a workflow running `/path/to/markitdown /path/to/file.docx` returned the Markdown in the node's `stdout`.

Tested with markitdown 0.1.9 · Python n8n 2.35.7 installed with npm on a GitHub-hosted Ubuntu 24.04 runner, Node 22, Python 3.13, markitdown 0.1.9. Not Docker, not n8n cloud (T23) · 2026-11-16 · evidence: [n8n.log](https://markitdown.dev/evidence/T23/n8n.log), [n8n-workflow.json](https://markitdown.dev/evidence/T23/n8n-workflow.json)

## What we ran

A two-node workflow: a Manual Trigger and an Execute Command node with the command `markitdown /tmp/data/report.docx`, run with `n8n execute`. MarkItDown 0.1.9 was in a virtual environment on the same machine.

````markdown
{"id":"md1","name":"markitdown execute command","active":false,"nodes":[
 {"parameters":{},"id":"n1","name":"Manual Trigger","type":"n8n-nodes-base.manualTrigger","typeVersion":1,"position":[0,0]},
 {"parameters":{"command":"/opt/mdv/bin/markitdown /data/report.docx"},"id":"n2","name":"Execute Command","type":"n8n-nodes-base.executeCommand","typeVersion":1,"position":[240,0]}],
 "connections":{"Manual Trigger":{"main":[[{"node":"Execute Command","type":"main","index":0}]]}},"settings":{},"pinData":{}}
````

*n8n-workflow.json · 507 bytes*

## The node is off by default

On n8n 2.35.7 the first run failed with the node unrecognised:

```
Unrecognized node type: n8n-nodes-base.executeCommand
```

Setting `NODES_EXCLUDE='[]'` (which clears n8n's default exclusion list) made the node available:

```bash
NODES_EXCLUDE='[]' n8n execute --id=md1
```

The run finished with status `success`, and the Markdown of our Word report was in `stdout`. The output also carried a `stderr` line from the file-type model's runtime, which is harmless.

````markdown
date: 2026-11-16
### install-n8n
$ npm install -g n8n 2>&1 | tail -3; n8n --version

361 packages are looking for funding
  run `npm fund` for details
2.35.7
[exit 0, 147s]

### import
$ n8n import:workflow --input=/tmp/data/workflow.json 2>&1 | tail -5
Finished migration AllowDiscordAgentChatSubscriptions1785840970000
Starting migration AddReasonToWorkflowPublicationOutbox1786519946974
Finished migration AddReasonToWorkflowPublicationOutbox1786519946974
Importing 1 workflows...
Successfully imported 1 workflow.
[exit 0, 5s]

### default-execute-command
$ n8n execute --id=md1 2>&1 | tail -25
Failed to load Custom API options for the node "n8n-nodes-base.confluence": Unknown credential name "confluenceCloudOAuth2Api"
n8n Task Broker ready on 127.0.0.1, port 5679
Failed to start Python task runner in internal mode. because its virtual environment is missing from this system. Launching a Python runner in internal mode is intended only for debugging and is not recommended for production. Users are encouraged to deploy in external mode. See: https://docs.n8n.io/hosting/configuration/task-runners/#setting-up-external-mode
[license SDK] Skipping renewal on init: renewOnInit is disabled in config
[license SDK] Skipping renewal on init: autoRenewEnabled is disabled in config
[license SDK] Skipping renewal on init: license cert is not initialized
Error executing workflow. See log messages for details.

Execution error:
====================================
Unrecognized node type: n8n-nodes-base.executeCommand
Error: Unrecognized node type: n8n-nodes-base.executeCommand
    at LazyPackageDirectoryLoader.getNode (/opt/hostedtoolcache/node/22.23.4/x64/lib/node_modules/n8n/node_modules/n8n-core/src/nodes-loader/directory-loader.ts:256:9)
    at LoadNodesAndCredentials.getNode (/opt/hostedtoolcache/node/22.23.4/x64/lib/node_modules/n8n/src/load-nodes-and-credentials.ts:631:29)
    at NodeTypes.getByNameAndVersion (/opt/hostedtoolcache/node/22.23.4/x64/lib/node_modules/n8n/src/node-types.ts:98:45)
    at new Workflow (/opt/hostedtoolcache/node/22.23.4/x64/lib/node_modules/n8n/node_modules/n8n-workflow/src/workflow.ts:94:30)
    at WorkflowRunner.runMainProcess (/opt/hostedtoolcache/node/22.23.4/x64/lib/node_modules/n8n/src/workflow-runner.ts:359:20)
    at WorkflowRunner.run (/opt/hostedtoolcache/node/22.23.4/x64/lib/node_modules/n8n/src/workflow-runner.ts:290:15)
    at Execute.run (/opt/hostedtoolcache/node/22.23.4/x64/lib/node_modules/n8n/src/commands/execute.ts:105:23)
    at CommandRegistry.execute (/opt/hostedtoolcache/node/22.23.4/x64/lib/node_modules/n8n/src/command-registry.ts:97:4)
````

*n8n.log · 5,141 bytes · first 40 of 89 lines shown*

## Cautions

-   The node runs arbitrary commands: never put a file name or text from outside into the command string. Use a fixed temporary file name.
-   The MarkItDown command must exist on the machine where n8n runs. The current n8n Docker image has no package manager, so we could not simply add Python to it with `apk`; we ran n8n from npm instead. A custom image is another way, which we did not build.
-   Scanned PDFs come back empty without an error ([OCR](https://markitdown.dev/ocr/)).

## Routes we did not test

A community MarkItDown node, and an HTTP Request node calling a conversion service you run yourself, for which [the FastAPI recipe](https://markitdown.dev/recipes/api-server/) is a starting point. The HTTP route keeps MarkItDown out of the n8n machine, which suits shared instances; that is reasoning, not a test. We also did not test n8n cloud.

## Related

- [Build a conversion API](https://markitdown.dev/recipes/api-server/): An HTTP service around MarkItDown, the safer route for shared n8n.
- [Is MarkItDown safe?](https://markitdown.dev/security/): What MarkItDown can read and send.
- [Convert a folder](https://markitdown.dev/batch/): Batch conversion.
- [MarkItDown for LLMs and RAG](https://markitdown.dev/rag/): Using the Markdown in RAG pipelines.

---
Independent guide to the open-source MarkItDown library. Not affiliated with or endorsed by Microsoft. Official source: https://github.com/microsoft/markitdown
