PPTX Text Extraction
Extracts text from Microsoft PowerPoint (.pptx) presentations by traversing the Office Open XML Presentation structure with python-pptx.
Extracts the text of a .pptx presentation with python-pptx: one ## Slide n block per slide with the text of its text boxes and placeholders, followed by the speaker notes.
Emits slide-by-slide content preserving deck order and separating visible slide text from presenter notes.
Features:
- Slide order preservation: Every slide produces a section marker with its slide number, title placeholder, and body placeholders concatenated in reading order.
- Presenter notes: Speaker notes are extracted per slide and emitted as a separate block so they can be used or filtered independently.
- Tables within slides: In-slide tables are rendered as markdown tables.
- Shape traversal: Text from grouped shapes, text frames, and SmartArt is flattened deterministically so the same deck always yields the same output.
- Hidden slides: Slides flagged as hidden are reported in metadata but excluded from the main text stream by default.
How it works
- Resolves the node config: expressions in config keys are evaluated against the run; the incoming item is used as-is.
- Reads
content_base64orfile_pathfrom the config first, then from the incoming item. If neither is present it returnserror. - Opens the presentation and walks the slides in deck order. For each slide it keeps the text of every top-level shape that has a text frame, one paragraph per line.
- Appends the speaker notes as
**Notes:** …inside the slide block. Slides with no text and no notes are left out. - If the script fails it returns
errorwith the Python message and stderr. Otherwiseempty: truegoes out throughemptyand any other result throughextracted.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-pptx-text",
"label": "Read deck text",
"operator_slug": "ai.pptx.extract.text",
"operator_version": "1.0.0",
"config": {
"execution": {
"timeout_ms": 120000
}
}
}{
"ok": true,
"port": "extracted",
"data": {
"text": "## Slide 1\n\nQuarterly review\n\nRevenue grew 12%\n\n**Notes:** Mention the new region.\n\n## Slide 2\n\nNext steps",
"chars": 106,
"empty": false,
"method": "python-pptx",
"metadata": {
"slides_total": 3,
"slides_with_content": 2
}
}
}Configuration
This node has no configuration fields.
Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
execution.timeout_ms - Timeout of the Python subprocess. When unset the code uses 120000 ms (the schema shows 300000 as the default).
-
content_base64 / file_path - Not declared in the config schema, but read from the config before the incoming item. Use them to point at a file with an expression, e.g.
{{ $json.attachment.content_base64 }}.
Output ports
extracted default At least one slide has text or notes.
{
"text": "## Slide 1\n\nQuarterly review\n\nRevenue grew 12%\n\n**Notes:** Mention the new region.\n\n## Slide 2\n\nNext steps",
"chars": 106,
"empty": false,
"method": "python-pptx",
"metadata": {
"slides_total": 3,
"slides_with_content": 2
}
}empty No slide has readable text or notes. Same shape with text: "" and empty: true.
{
"text": "",
"chars": 0,
"empty": true,
"method": "python-pptx",
"metadata": {
"slides_total": 4,
"slides_with_content": 0
}
}error The input is missing or the script fails. data is { error } or { error, stderr }.
{
"error": "File is not a zip file",
"stderr": ""
}In expressions
What a later node can read from this node's output with $("PPTX Text Extraction").item.json.<path> (write your node's label instead of PPTX Text Extraction). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through extracted, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("PPTX Text Extraction").item.json.text | ||
$("PPTX Text Extraction").item.json.chars | ||
$("PPTX Text Extraction").item.json.empty | ||
$("PPTX Text Extraction").item.json.method | ||
$("PPTX Text Extraction").item.json.metadata | ||
$("PPTX Text Extraction").item.json.metadata.slides_total | — | |
$("PPTX Text Extraction").item.json.metadata.slides_with_content | — |
— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).
Errors
| Message | Port | Cause and fix |
|---|---|---|
Either content_base64 or file_path is required. | error | Neither the config nor the incoming item has content_base64 or file_path. Map the file from the previous node. |
Either content_base64 or file_path is required | error | Raised by the Python script when file_path does not exist on the orchestrator host. Data also carries stderr. |
<exception message from the Python library> | error | The file could not be read as a .pptx presentation (corrupt, encrypted or another format). data.stderr has the details. |
Python timed out after <timeout_ms>ms | error | The script exceeded execution.timeout_ms. Raise it or process fewer pages. |
Python runtime not available (ENOENT) | error | No Python interpreter is available on the orchestrator host. |
Input contract
-
content_base64string Optional -
file_pathstring Optional
Output contract
-
textstring Optional -
charsnumber Optional -
emptyboolean Optional -
methodstring Optional -
metadataobject Optional
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "ai.pptx.extract.text",
"name": "PPTX Text Extraction",
"category": "ai",
"version": "1.0.0",
"description": "Extracts text from Microsoft PowerPoint (.pptx) presentations by traversing the Office Open XML Presentation structure with python-pptx.\n\n Emits slide-by-slide content preserving deck order and separating visible slide text from presenter notes.\n\n **Features:**\n - **Slide order preservation:** Every slide produces a section marker with its slide number, title placeholder, and body placeholders concatenated in reading order.\n - **Presenter notes:** Speaker notes are extracted per slide and emitted as a separate block so they can be used or filtered independently.\n - **Tables within slides:** In-slide tables are rendered as markdown tables.\n - **Shape traversal:** Text from grouped shapes, text frames, and SmartArt is flattened deterministically so the same deck always yields the same output.\n - **Hidden slides:** Slides flagged as hidden are reported in metadata but excluded from the main text stream by default.",
"capabilities": [
"pptx",
"office",
"powerpoint",
"presentation",
"text-extraction"
],
"config_schema": {
"type": "object",
"properties": {
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
},
"input_contract_schema": {
"type": "object",
"properties": {
"content_base64": {
"type": "string"
},
"file_path": {
"type": "string"
}
}
},
"output_contract_schema": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"chars": {
"type": "number"
},
"empty": {
"type": "boolean"
},
"method": {
"type": "string"
},
"metadata": {
"type": "object"
}
}
},
"ports": [
{
"port_id": "extracted",
"label": "Extracted",
"is_default": true,
"supports_condition": true
},
{
"port_id": "empty",
"label": "Empty",
"is_default": false,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"is_default": false,
"supports_condition": false
}
],
"execution_mode": "async",
"tags": [
"ai",
"pptx",
"office",
"powerpoint",
"presentation",
"text"
],
"is_stateful": false,
"publisher": {
"identity": "org_sommatic_ai",
"profile": {
"name": "Sommatic AI",
"verified": true,
"url": "https://me.veripass.com/sommatic",
"logo_url": null
}
}
}{
"type": "object",
"properties": {
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
}{
"type": "object",
"properties": {
"content_base64": {
"type": "string"
},
"file_path": {
"type": "string"
}
}
}{
"type": "object",
"properties": {
"text": {
"type": "string"
},
"chars": {
"type": "number"
},
"empty": {
"type": "boolean"
},
"method": {
"type": "string"
},
"metadata": {
"type": "object"
}
}
}[
{
"port_id": "extracted",
"label": "Extracted",
"is_default": true,
"supports_condition": true
},
{
"port_id": "empty",
"label": "Empty",
"is_default": false,
"supports_condition": true
},
{
"port_id": "error",
"label": "Error",
"is_default": false,
"supports_condition": false
}
]Execution
- Execution
async- Stateful
- No
- Retries (
retryOnFail) - No
- Capabilities
pptxofficepowerpointpresentationtext-extraction- Tags
aipptxofficepowerpointpresentationtext
Notes and limits
- Only top-level shapes with a text frame are read. Tables, grouped shapes, charts and SmartArt are skipped, although the description says otherwise.
- Hidden slides are not detected: they are extracted like any other slide. Notes are inline in each slide block, not a separate field.
- Only the Open XML format (.pptx) is supported; legacy .ppt files fail.
file_pathis a path on the orchestrator host.content_base64wins when both are present.- The extraction runs in a Python subprocess. On first use the orchestrator creates a virtual environment and installs the pinned requirements, which can take minutes; later runs reuse it.
- The Python result is limited to 50 MB of output; above it the node leaves through
error. - The engine does not apply
execution.retryOnFail,maxTries,waitBetweenTriesorcontinueOnFailto this node. Handle failures by wiring theerrorport.
Reviewed against the orchestrator code · 31e874b · 2026-11-26