email_to_pdf
Convert email files (MSG, EML) to PDF, embedding or converting attachments as needed. Specify page size, orientation, and margins for customized output. Integrates with cloud storage and local file uploads for streamlined processing.
Instructions
Input Schema
Name | Required | Description | Default |
---|---|---|---|
api_key | No | PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional) | |
convertAttachments | No | Set to false if you don’t want to convert attachments from the original email and want to embed them as original files (as embedded PDF attachments). Converts attachments that are supported by the PDF.co API (DOC, DOCx, HTML, PNG, JPG etc.) into PDF format and then merges into output final PDF. Non-supported file types are added as PDF attachments (Adobe Reader or another viewer may be required to view PDF attachments). | |
embedAttachments | No | Set to true to automatically embeds all attachments from original input email MSG or EML files into the final output PDF. Set it to false if you don’t want to embed attachments so it will convert only the body of the input email. True by default. | |
margins | No | Set to CSS style margins like 10px, 5mm, 5in for all sides or 5px 5px 5px 5px (the order of margins is top, right, bottom, left). (Optional) | |
orientation | No | Set to Portrait or Landscape. Portrait is set by default. (Optional) | |
paperSize | No | A4 is set by default. Can be Letter, Legal, Tabloid, Ledger, A0, A1, A2, A3, A4, A5, A6 or a custom size. Custom size can be set in px (pixels), mm or in (inches) with width and height separated by space like this: 200 300, 200px 300px, 200mm 300mm, 20cm 30cm or 6in 8in. (Optional) | |
url | Yes | URL to the source file (MSG, EML). Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files. |