Write PDF From Markdown
Controlled node
Overview
The Write PDF From Markdown node converts markdown content into a PDF file and saves it to the project library. It first converts the markdown to a DOCX document, then converts that DOCX into a PDF before uploading the result.
This node is useful for generating reports, summaries, exports, or user-facing documents from markdown produced by AI Write, Markdown Text, or other workflow nodes.
Inputs
| Input | Type | Description | Default |
|---|---|---|---|
| Run | Event | Triggers the PDF generation and upload. | - |
| Data | Data | The markdown content to convert. Non-string data is converted to text before rendering. | - |
| Name | Data | The filename for the generated PDF. If the name does not end with .pdf, the extension is appended automatically. | - |
| Path | Data | Optional folder path in the library where the PDF should be saved. Missing folders are created automatically. If omitted, the file is saved in the root library folder. | root |
Outputs
| Output | Type | Description |
|---|---|---|
| Done | Event | Fires when the node has finished running. |
| File | Data | The generated library file reference. If generation or upload fails, this output contains an error object. |
Runtime Behavior and Defaults
- Controlled Node: The node runs only when the Run event fires.
- Project Requirement: A runtime project ID is required so the generated PDF can be uploaded to the project library.
- Filename Handling: The node requires a non-empty Name input.
.pdfis appended if the extension is missing. - Directory Creation: If Path is provided, the node creates or resolves that library folder path before uploading.
- Markdown Conversion: Data is converted to a string, rendered to DOCX, then converted to PDF.
- Error Handling: If data, project ID, filename, conversion, or upload fails, File contains an error object instead of a file reference.
Example Usage
Generate a PDF Report
- Use AI Write or Markdown Text to produce markdown report content.
- Connect the markdown output to Data.
- Set Name to
"monthly-report". - Optionally set Path to
"reports/monthly". - Trigger Run from a Start node or another event.
The node saves monthly-report.pdf to the library and outputs the generated file reference.
tip
Use Get Library Download URLs after this node if you need a downloadable link for the generated PDF.