Skip to main content

Send PDF Report via Mail

Manually exporting and distributing Celonis reports is a time-consuming, repetitive task. This automation solution streamlines your reporting by automatically generating PDF reports from your Studio Analysis and delivering them directly to your stakeholders' inboxes on a schedule that works for you.

The following Action Flow acts as a bridge between your data insights and your team. It automates two critical steps:

  1. Create PDF Report: It connects to your specified Studio Analysis, captures the latest data from your selected sheets, and renders them into a professional PDF document.

  2. Send Email: It takes the freshly generated file and attaches it to an outgoing email, ensuring your team receives consistent, data-driven updates without any manual intervention.

60364264.png

Below you will find the step-by-step guide for configuring each module of the above Action Flow.

CHANGES REQUIRED

60364265.png

Configuration:

Action Flows Module: Celonis

Action: Create PDF Report

Connection: Create a Connection with an Application Key, following the setup here: .

Analysis:Select the Studio Analysis you would like to create the report from

Note

Ensure that yourStudio Analysis is publishedand that the Application Key has permissions to use the analysis.

Your Application Key requires"USE" permissions on the Analysis.

Sheets: Select one or multiple sheets that should be included in the report

Note

Please note that only sheets of type New Sheet can be included! Sheets of other types e.g. process overview, conformance will create an empty report.

60364266.png

CHANGES REQUIRED

60364268.png

Configuration:

Action Flows Module: Email

Action: Send an Email

To: choose Recipients of your choice

Subject: choose a Subject of your choice

Content Type: HTML

Content: choose Content of your Choice

Attachments: (see below)

  • File name: Report.pdf - select file name that must end with .pdf

  • Data: {{pdfReport}} - map the PDF report from previous module

60364269.png

You can copy the blueprint of the Action Flow defined in this Help Page below:

This blueprint can be imported into your Celonis Platform Team so that you can quickly make the required changes without building the Action Flow from scratch.

{
    "name": "Create PDF V1",
    "flow": [
        {
            "id": 1,
            "module": "celonis:createPdfReport",
            "version": 3,
            "parameters": {
                "__IMTCONN__": 1195
            },
            "mapper": {
                "analysisId": "bd04ace7-b98f-47cf-b158-50186f9a8f5e",
                "sheets": [
                    "f5a83f70-e19d-41e2-a4ff-effb97586535"
                ]
            },
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0,
                    "name": "Get PDF Report from Analysis"
                },
                "restore": {
                    "__IMTCONN__": {
                        "label": ""
                    },
                    "analysisId": {
                        "mode": "chose",
                        "label": "Analysis Pizza Shop 2"
                    },
                    "sheets": {
                        "mode": "chose",
                        "label": [
                            null
                        ]
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "analysisId",
                        "type": "select",
                        "label": "Analysis",
                        "required": true
                    },
                    {
                        "name": "filter",
                        "type": "text",
                        "label": "Filter"
                    },
                    {
                        "name": "width",
                        "type": "number",
                        "label": "Width"
                    },
                    {
                        "name": "height",
                        "type": "number",
                        "label": "Height"
                    },
                    {
                        "name": "devicePixelRatio",
                        "type": "number",
                        "label": "Device Pixel Ratio"
                    },
                    {
                        "name": "headerContent",
                        "type": "text",
                        "label": "Header",
                        "multiline": true
                    },
                    {
                        "name": "footerContent",
                        "type": "text",
                        "label": "Footer",
                        "multiline": true
                    },
                    {
                        "name": "sheets",
                        "type": "select",
                        "label": "Sheets",
                        "multiple": true,
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 3,
            "module": "email:ActionSendEmail",
            "version": 7,
            "parameters": {
                "account": 1196,
                "saveAfterSent": false
            },
            "mapper": {
                "to": [
                    "[placeholder email recipient]"
                ],
                "subject": "Weekly Report - CW 07",
                "contentType": "html",
                "attachments": [
                    {
                        "fileName": "Report-CW07.pdf",
                        "data": "{{1.pdfReport}}",
                        "cid": ""
                    }
                ],
                "cc": [],
                "bcc": [],
                "from": "",
                "sender": "",
                "replyTo": "",
                "inReplyTo": "",
                "references": [],
                "priority": "normal",
                "headers": [],
                "html": "Please find attached the weekly report.\nBest regards,\nAnalyst"
            },
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 0,
                    "name": "Send PDF as attachment"
                },
                "restore": {
                    "account": {
                        "label": ""
                    },
                    "saveAfterSent": {
                        "label": "No"
                    },
                    "to": {
                        "mode": "chose",
                        "items": [
                            "undefined"
                        ]
                    },
                    "contentType": {
                        "label": "HTML"
                    },
                    "attachments": {
                        "mode": "chose",
                        "items": [
                            "undefined"
                        ]
                    },
                    "cc": {
                        "mode": "chose",
                        "items": []
                    },
                    "bcc": {
                        "mode": "chose",
                        "items": []
                    },
                    "references": {
                        "mode": "chose",
                        "items": []
                    },
                    "priority": {
                        "label": "Normal"
                    },
                    "headers": {
                        "items": []
                    }
                },
                "parameters": [
                    {
                        "name": "account",
                        "label": "Connection",
                        "type": "account",
                        "required": true
                    },
                    {
                        "name": "saveAfterSent",
                        "label": "Save message after sending",
                        "type": "select",
                        "required": true,
                        "validate": {
                            "enum": [
                                true,
                                false
                            ]
                        }
                    }
                ],
                "expect": [
                    {
                        "name": "to",
                        "label": "To",
                        "type": "array",
                        "required": true,
                        "labels": {
                            "add": "Add a recipient",
                            "edit": "Edit a recipient"
                        },
                        "spec": {
                            "name": "email",
                            "type": "email",
                            "label": "Email address",
                            "required": true
                        }
                    },
                    {
                        "name": "subject",
                        "label": "Subject",
                        "type": "text"
                    },
                    {
                        "name": "contentType",
                        "label": "Content Type",
                        "type": "select",
                        "required": true,
                        "validate": {
                            "enum": [
                                "html",
                                "text"
                            ]
                        }
                    },
                    {
                        "name": "attachments",
                        "label": "Attachments",
                        "type": "array",
                        "spec": [
                            {
                                "name": "fileName",
                                "label": "File name",
                                "type": "filename",
                                "required": true,
                                "semantic": "file:name"
                            },
                            {
                                "name": "data",
                                "label": "Data",
                                "type": "buffer",
                                "required": true,
                                "semantic": "file:data"
                            },
                            {
                                "name": "cid",
                                "label": "Content-ID",
                                "type": "text"
                            }
                        ],
                        "labels": {
                            "add": "Add an attachment",
                            "edit": "Edit an attachment"
                        }
                    },
                    {
                        "name": "cc",
                        "label": "Copy recipient",
                        "type": "array",
                        "labels": {
                            "add": "Add a copy recipient",
                            "edit": "Edit a copy recipient"
                        },
                        "spec": {
                            "name": "email",
                            "type": "email",
                            "label": "Email address"
                        }
                    },
                    {
                        "name": "bcc",
                        "label": "Blind copy recipient",
                        "type": "array",
                        "labels": {
                            "add": "Add a blind copy recipient",
                            "edit": "Edit a blind copy recipient"
                        },
                        "spec": {
                            "name": "email",
                            "type": "email",
                            "label": "Email address"
                        }
                    },
                    {
                        "name": "from",
                        "label": "From",
                        "type": "text"
                    },
                    {
                        "name": "sender",
                        "label": "Sender",
                        "type": "text"
                    },
                    {
                        "name": "replyTo",
                        "label": "Reply-To",
                        "type": "text"
                    },
                    {
                        "name": "inReplyTo",
                        "label": "In-Reply-To",
                        "type": "text"
                    },
                    {
                        "name": "references",
                        "label": "References",
                        "type": "array",
                        "spec": {
                            "type": "text",
                            "label": "Reference",
                            "required": true
                        }
                    },
                    {
                        "name": "priority",
                        "label": "Priority",
                        "type": "select",
                        "validate": {
                            "enum": [
                                "high",
                                "normal",
                                "low"
                            ]
                        }
                    },
                    {
                        "name": "headers",
                        "label": "Headers",
                        "type": "array",
                        "spec": [
                            {
                                "name": "key",
                                "label": "Key",
                                "type": "text",
                                "required": true
                            },
                            {
                                "name": "value",
                                "label": "Value",
                                "type": "text",
                                "required": true
                            }
                        ]
                    },
                    {
                        "name": "html",
                        "label": "Content",
                        "type": "text"
                    }
                ]
            }
        }
    ],
    "metadata": {
        "instant": false,
        "version": 1,
        "scenario": {
            "roundtrips": 1,
            "maxErrors": 3,
            "autoCommit": true,
            "autoCommitTriggerLast": true,
            "sequential": false,
            "confidential": false,
            "dataloss": false,
            "dlq": false
        },
        "designer": {
            "orphans": []
        },
        "zone": "integromat.eu-dev-1.k8s.celonis.cloud"
    }
}

Related topics