Generate PDF from plain text and send via email

Recipe ToolsDeveloper ToolMarketing

What it does

When someone calls this automation with plain text, Js Eval generates a PDF document using JavaScript. The PDF is created in real time and sent by email to the specified recipient.

Who it's for

Operations teams who need to convert text into formatted PDFs and distribute them without manual document creation.

How teams use this

Convert reports to shareable PDFs

Transform plain text reports into formatted PDF documents and email them to stakeholders automatically. The team gets polished documents without manual formatting work.

Create invoices from text data

Generate invoice PDFs from plain text billing information and send them to customers. Only the input source changes from manual entry to automated data feeds.

Add headers and footers to PDFs

Extend the JavaScript code to include company branding, headers, footers, or page numbers on every generated PDF. The automation stays the same except for the enhanced formatting logic.

How it works

  1. Receive plain text input. Call this automation with plain text content that will become the PDF document body.
  2. Generate PDF with JavaScript. Js Eval executes JavaScript code to transform the plain text into a formatted PDF document using the pdf-lib library.
  3. Send PDF by email. Email the generated PDF to the recipient so they receive the document immediately after creation.