Skip to main content

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​

InputTypeDescriptionDefault
RunEventTriggers the PDF generation and upload.-
DataDataThe markdown content to convert. Non-string data is converted to text before rendering.-
NameDataThe filename for the generated PDF. If the name does not end with .pdf, the extension is appended automatically.-
PathDataOptional 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​

OutputTypeDescription
DoneEventFires when the node has finished running.
FileDataThe 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. .pdf is 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​

  1. Use AI Write or Markdown Text to produce markdown report content.
  2. Connect the markdown output to Data.
  3. Set Name to "monthly-report".
  4. Optionally set Path to "reports/monthly".
  5. 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.