Skip to main content

Celonis Product Documentation

Create CSV File from Celonis Output

Getting the specific data you want within your mail can lead to clutter. That's the reason we provide you with that automation solution which builds you a CSV file of your data and attaches it to a Mail automatically. Imagine you would want to get daily or weekly or just regular updates of some data. Normally you would have to search for them every time, making sure to get the latest version, same data and look at different tables searching for the right data to check. After setting up the following Action Flow you do not have to check them by hand anymore. You can aggregate data from different tables and build a custom CSV file which will be sent to you via mail as often as you prefer it.

Follow the step-by-step guide below to implement this solution for your Celonis Action Flows use case.

Sample Action Flow

The image below shows a working Action Flow which:

  • Extracts data from Celonis (this step could be replaced with any other source of data),

  • Creates a CSV file with the collected Data,

  • Sends an email to defined recipients with a message and the attached CSV file

Configuring Action Flow

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

1. Consolidate Data

We use the Celonis Query Data Model to consolidate the Data for our CSV to be send. All information on how to do it can be found here. We use some Demo Data here as an example, getting Sales Order Numbers (VBAK.VBELN), requested delivery dates (VBAK.VDATU) and the corresponding customer name (KNA1.NAME1).

In addition we already filter here for the customer with the name Amadeus to keep the amount of orders we find small. So we just want to include the delivery dates of the customer Amadeus in the CSV.


The data can be adjusted (like the formatting of dates) within the next module.


In your use case, you may wish to access data from a different source (i.e. not Celonis) like SAP, email, spreadsheet, etc. and push that information to your Celonis data model. To do so, you would need to replace this Celonis "Query Data" action with the module that corresponds to your chosen data source.

Row Limit

Don't forget to specify the Row Limit - the row limit defines the maximum of rows in the result so make sure it is set to a limit high enough. The default value is 50.


Action Flows Module: Celonis

Action: Query Data

2. Create custom CSV

We use the advanced module to create our CSV as we have the possibility here to adjust the data we just queried (e.g. format a date).

We do this by setting up our data structure in the CSV. We use the Generator and paste our JSON format in, this is especially relevant when having more complex data structures:

        "Order ID": "",
        "Requested Delivery Date": ""

If you have more / other Columns you can adjust the JSON quite easy, the generic format is:

        "Column 1 Name": "",
        "Column 2 Name": "",
                "Column 3 Name": "",
                "Last Column Name": ""

Fill the new fields with the respective data form the Query Data module and adjust it if needed.



Action Flows Module: CSV

Action: Create CSV (advanced)


55707870.png. 55707858.png

3.[OPTIONAL] Adjust Metadata of CSV


This step is particularly useful if you open the CSV attachments with Excel.

In order to open the csv file with Excel locally, a slight modification is neededby adding a "Compose a string" module after the Create CSV module to add additional metadata information.By only adding one line ( sep=,)andnew line before the content from the CSV file, we are able to "adjust" the metadata and this allows Excel to open a CSV file properly considering the columns without needing to "Convert data to columns" in the Excel environment.



Make sure to have each element in a separate line.


Effect of the Modification

Original result


Result of Modification

4. Send CSV via Mail


Action Flows Module: Email

Action: Send an Email

The screenshot on the right show how this module has been configured with our demo data.

To: You can choose a recipient of your choice

Subject: Define the subject of the mail

Content Type: HTML

Content: here we will add the text of the mail. we use the <p> tags to get normal text within the mail which is formatted to fit.

<p>Dear recipient,</p>

<p>Find the upcoming Sales Orders for the Customer Amadeus with their requested delivery date attached.</p>


<p>Your Name</p>


[OPTIONAL] Replace CSV with new Text variable

If you employed the optional step 3, please do not forget to replace the original attachment below with the modified attachment to build up the csv file.


Data: take the text item of the CSV module

File name: Choose the name of the CSV file to be sent


Make sure to add the right suffix to the name your attachments (e.g. somename.csv or picture.jpg) to make sure they are sent in the desired format.

Downloading Action Flow blueprints

To download blueprints for Action Flows, go to Marketplace. In the Marketplace page for your Action Flow, click the Download button to get the blueprint.

Blueprints can be imported into your Celonis Platform Team so that you can quickly make the required changes without needing to build the Action Flow from scratch.

Possible Use Cases
  • Send on-time delivery report to customer service

  • Notify employee about PO/invoice mismatch

  • Inform master data team about frequent master data adjustments

  • Notify clerk about invoice with cash discount approaching

  • Notify when duplicate invoice detected

  • Send outstanding payment report to clerks