Email body converter
A simple extension that can convert the email HTML body into a PDF and upload it to a queue as a new document.
An additional feature is that it can also convert HTML attachments into PDFs.
The original API endpoint documentation can be found here.
Installation
Email body converter is a webhook maintained by Rossum. To use it, follow these steps:
- Log in to your Rossum account.
- Navigate to Extensions → My extensions.
- Click on Create extension.
- Fill in the following fields:
- Name:
Email body converter
- Trigger events:
email.received
- Extension type:
Webhook
- URL (see below)
- In "Advanced settings" select Token owner (should have Admin access)
- Name:
- Click Create the webhook.
- Fill in the
Configuration
field. See Available configuration options below.
Environment | Webhook URL |
---|---|
EU1 Ireland | https://elis.rossum.ai/svc/email-converter/api/v1/convert |
EU2 Frankfurt | — |
US east coast | https://us.app.rossum.ai/svc/email-converter/api/v1/convert |
Japan Tokyo | — |
Available configuration options
{
// Each object in the `configurations` list represents a specific configuration (distinguished by
// the queue IDs).
"configurations": [
{
// Required! List of queue IDs this configuration applies to. A single configuration can be
// used for multiple queues, specified in this list.
"queue_ids": [172636],
// Minimum number of characters in the email body to convert it to PDF. Default is 0.
"minimal_email_character_count": 5,
// Skip conversion if supported files are present (`true` to skip, `false` to convert the
// email body to PDF). Supported files include email attachments supported by Rossum and any
// additional files converted to PDF as part of the webhook call (e.g., HTML attachments
// converted to PDF). Default is `false`.
"skip_if_supported_files_present": false,
// Optional. List of attachment types to convert to PDF. Supported values: "html", "txt".
// When omitted, thef files will be deleted as with any other unsupported attachment.
"convert_attachments": ["html", "txt"],
// Optional. Specifies the style for TXT files, which are first converted to HTML and then
// to PDF. This configuration is added as an HTML style tag to affect the appearance of
// the TXT in the converted PDF.
"txt_style": "@page { size: letter landscape; margin: 2cm; } pre { white-space: pre-wrap; }",
// Optional. Specifies the style for the email header in the rendered PDF.
"header_style": "table.email-header { width: 100%; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 14px; margin-bottom: 20px; }\ntable.email-header td { vertical-align: top; padding: 2px 0; }\ntable.email-header td:first-child { padding: 2px 2em 2px 0; white-space: nowrap; width: 1%; }\ntable.email-header td:nth-child(2) { word-break: break-all; }",
// Optional. If set to `true`, the webhook will only create a document (via /documents API
// endpoint) and will not create the annotation. Default is `false`.
"create_document_only": false,
// Optional. If set to `true`, the webhook will include the email header in the rendered PDF.
// Default is `false`.
"include_header_in_pdf": false
}
]
}