FlowTruxFlowTrux/Docs

PDF Generator MCP Server

Generate PDF documents from markdown, structured sections, data tables or HTML

The PDF Generator MCP server creates PDF documents and saves them in your organization's file storage - the same storage the Files server uses. It provides 4 tools, one per kind of input: markdown text, structured sections, a single data table, and HTML.

How It Works

  1. An Agent or Action node calls a PDF tool with its content.
  2. The PDF is rendered and saved to the workspace's file storage.
  3. The tool returns the file's key, its size, and a download link valid for one hour.

Send the PDF on by passing its key - gmail_send attachments (s3_key) and Telegram's send_document (s3_key) read it directly. There is no need to read the file back first.

Setup

None. The PDF Generator is enabled by default: every organization has it, and it is available in each workspace without configuration. An OWNER or ADMIN can switch it off in Resources > MCP Servers, or remove it from one workspace in that workspace's settings (Enabled resources tab > MCP Servers). Generated files count toward your plan's storage limit.

Which tool to use

Pick the tool by the content you have - each accepts one input shape:

You haveToolParameter
HTML (starts with <!DOCTYPE or <html>, or an Agent's HTML output)generate_pdf_htmlhtml
Markdown or plain textgenerate_pdfcontent
Structured JSON sections (headings, paragraphs, lists, tables, separators)generate_pdf_reportsections
Exactly one table as headers plus rowsgenerate_pdf_tableheaders, rows

generate_pdf does not understand HTML - tags would appear as literal text.

Tools

generate_pdf

Generate a PDF from markdown or plain text passed in content. Supports headings (#, ##, ###), lists (-, *, 1.), horizontal rules (---) and paragraphs. Not for HTML - use generate_pdf_html. Returns the file's key and a download link.

ParameterTypeRequiredDescription
contentstringYesMarkdown or plain text content for the PDF.
titlestringNoDocument title (displayed at top of PDF)
filenamestringNoOutput file name (default: 'document.pdf')
pathstringNoSubfolder path in storage (default: 'pdf')
page_sizestringNoPage size: A4, Letter, A3, Legal (default: A4)
orientationstringNoPage orientation: portrait or landscape (default: portrait)
header_textstringNoText shown in the header of each page.
footer_textstringNoText shown in the footer (default: 'Page X of Y')

generate_pdf_report

Generate a PDF from structured JSON sections passed in sections - typical for reports that mix headings, text, lists and tables. Returns the file's key and a download link.

ParameterTypeRequiredDescription
titlestringNoReport title (displayed at top)
sectionsarray of objectYesArray of content sections.
filenamestringNoOutput file name (default: 'report.pdf')
pathstringNoSubfolder path in storage (default: 'pdf')
page_sizestringNoPage size: A4, Letter, A3, Legal (default: A4)
orientationstringNoPage orientation: portrait or landscape (default: portrait)
header_textstringNoHeader text on each page.
footer_textstringNoFooter text (default: 'Page X of Y')

Section types:

TypeFieldsDescription
headingtext, level (1-3)Section heading
paragraphtextBody text
listitems[], ordered?Bulleted or numbered list
tableheaders[], rows[][]Data table with headers
separator(none)Horizontal line

Example sections array:

[
  { "type": "heading", "level": 1, "text": "Monthly Report" },
  { "type": "paragraph", "text": "Summary of activities for March 2026." },
  { "type": "table", "headers": ["Metric", "Value"], "rows": [["Revenue", "$12,000"], ["Users", "340"]] },
  { "type": "separator" },
  { "type": "heading", "level": 2, "text": "Action Items" },
  { "type": "list", "items": ["Review Q1 targets", "Update forecasts"], "ordered": true }
]

generate_pdf_table

Generate a PDF of one data table, passed as headers plus rows (each row an array of cell text). For several tables or mixed content use generate_pdf_report. From a Wialon run_report table, pass its headers and its matrix (ask the report for matrix: true). Returns the file's key and a download link.

ParameterTypeRequiredDescription
titlestringNoTable title.
headersarray of stringYesColumn header names.
rowsarrayYesData rows, each an array of cell text. From a Wialon run_report table, pass its matrix.
filenamestringNoOutput file name (default: 'table.pdf')
pathstringNoSubfolder path in storage (default: 'pdf')
orientationstringNoportrait or landscape (default: landscape for wide tables)

generate_pdf_html

Render an HTML document or fragment, passed in html, into a PDF. The only tool that accepts HTML, and the right choice when the design matters: branded reports, email-style layouts, multi-column pages, custom fonts. Returns the file's key and a download link.

ParameterTypeRequiredDescription
htmlstringYesFull HTML document or fragment. Only inline CSS, data: images and Google Fonts load - see the notes below.
filenamestringNoOutput file name (default: 'document.pdf')
pathstringNoSubfolder path in storage (default: 'pdf')
page_sizestringNoPaper format: A4, Letter, A3, Legal, Tabloid (default: A4)
orientationstringNoportrait or landscape (default: portrait)
margin_topstringNoe.g. '20mm', '1in', '0' (default: '20mm')
margin_bottomstringNo(default: '20mm')
margin_leftstringNo(default: '15mm')
margin_rightstringNo(default: '15mm')
header_templatestringNoHTML for the per-page header. Supports the template classes: <span class='title'></span>, <span class='date'></span>, <span class='pageNumber'></span>, <span class='totalPages'></span>. Wrap in styled divs for layout.
footer_templatestringNoHTML for the per-page footer (same template-class support as header).
print_backgroundbooleanNoRender CSS backgrounds and images (default: true).
page_break_cssbooleanNoApply the default page-break rules (rows, list items and cards kept whole, table headers repeated). Default true; your own CSS overrides them.

Notes on HTML:

  • Pass the raw document - do not wrap it in markdown code fences.
  • Only inline content loads: images must be data: URLs and CSS must be inline (<style>). Google Fonts are the one exception. Any other external image or stylesheet is shown as missing.
  • Page breaks are handled for you: table rows, list items, images and .card blocks are kept whole, table headers repeat on every page, and a heading stays with the text below it. Your own @media print rules still win. Set page_break_css: false to turn the defaults off.

Example Workflows

Weekly report by email

  1. Trigger - Schedule (weekly).
  2. Action - HTTP request that fetches metrics.
  3. Agent - Turns the metrics into report sections (JSON).
  4. Action - MCP tool pdf:generate_pdf_report with a title and the sections.
  5. Action - MCP tool google-workspace:gmail_send with an attachment { "s3_key": "{{steps.report.output.response.key}}" }.

Export data as a PDF table

  1. Trigger - Webhook with query parameters.
  2. Action - HTTP request that fetches the data.
  3. Action - MCP tool pdf:generate_pdf_table with headers and rows.
  4. Return {{steps.table.output.response.downloadUrl}} in the webhook response.

Branded document from an Agent

  1. Trigger - Manual, with a topic.
  2. Agent - Writes the document as a full HTML page with inline CSS.
  3. Action - MCP tool pdf:generate_pdf_html with html set to the Agent's output.
  4. Action - Send it with Telegram's send_document (s3_key).