News combit Dev Blog

New Connection to Microsoft Flow for the Report Server

Posted: Thursday, March 28, 2019 | 0 comment(s)

Microsoft Flow allows you to define your own processes and workflows based on various triggers. More than 200 services such as Office 365, Facebook, WordPress etc. are available for this purpose, which can interact with each other in the workflows (called flows). These services offer actions as well as triggers, such as when a file is created (on Google Drive, DropBox or also on alternative services like e.g. box) or when a mail is received. Each flow has a trigger and may have multiple actions. This article describes how to connect combit Report Server to Microsoft Flow.

Figure 1: Example of a workflow that sends a previously exported report by email after an HTTP request and then saves it in the cloud.

What you need to do:

  • You need at least version 24 of the combit Report Server.
  • Activate the REST API of your report server (Administration > Advanced Settings > Activate REST API)
  • Create a user of type "API account with token" in the Report Server.
  • Create your own custom connector with Micosoft Flow
  • Install a local data gateway (On-premises data gateway) if the Report Server is running on your intranet.

Setting up Your Local Data Gateway (Required if The Report Server is NOT Accessible on the Internet)

The local data gateway acts as a bridge by providing fast and secure data transfer between local data (data outside the cloud) and the Power BI, Microsoft Flow, Logic Apps, and PowerApps services.

Using the REST API of the combit Report Server, you can now connect the Report Server from Microsoft Flow to your own network.

A custom connector for the data gateway (also called service on other platforms) connects to the REST API of the report server.

Figure 2: Running the local data gateway.


Creating Your Own Connector

If you run a Report Server that is also available on the internet (e.g. you have to create your own custom connector and don't need the local data gateway.

1. On the Microsoft Flow page  under Data click on Custom Connector.

2. Click on the button + Create custom connector, then Import to OpenAPI file

3. Download the file openapiflow.jsonThis includes the definition of some API functions of the Report Server REST API.

4. Click on Import and select openapiflow.json. Then set a name for the connector and press Continue.

5. Define icon and color. Enter the address of the Report Server and, if the address (e.g. https://localhost/rs24) is only available in the intranet (i.e. not from outside), check the box Connect via on-premises data gateway.

6. With "Create connector" the connector is now created.

The Security, Definition and Test tabs are no longer relevant and you can create your own flow directly.

Since the authentication is done individually for each action, the Custom Connector itself has no authentication type in Microsoft Flow (set Authentication Type to none).

Creating Your Own Flow

1. Click "Create from blank"

2. Click "Create from blank" again

3. Add any trigger (trigger of the workflow) (here e.g. When a HTTP request is received)

4.  Click "+ New step"

5. Go to the Custom tab and select the connector you created before.

6. Select the "Get Export of a Report Template" action.

7. Only required for a connection with a local data gateway

8. Fill in all required fields (see notes for information on IDs)

9. Press Save and, if necessary, Test.

Example Workflow 1: Export a Report Template and Then Save it to Google Drive / Dropbox:

The Report Server could also save the report directly itself. However, since the storage of a report is a very common requirement, we have implemented this in this workflow as an example using Microsoft Flow. Adding any trigger (here HTTP Request)
1. Adding the Get Export of a Report Template action
2. Connect to your gateway
3. Specifying IDs for the Export

4. Unique IDs are used here. You can copy these IDs (e.g. A0BCB71A-BA65-45C597F3-1282D9C7C126) from the URL, which is always at the end of the address:

  • For the ExportProfileID open the export profile for editing
  • For the TemplateID open the report template for editing

5. For file providers:

  • File content => Add dynamic content
  • Expression Tab
  • Insert the following expression: base64ToBinary(body('Get_Export_of_a_Report_Template')['$content'])

Important: Please do not simply enter the expressions in the field itself, but in the Expression / Expression tab on the right.

6. Execute trigger => Test!

Example Workflow 2: Sending the Report by Email

Perform steps 1-5 of Example workflow 1.

Then "+ New Step":

Attachments Content (expression): base64ToBinary(body('Get_Export_of_a_Report_Template')['$content'])

Attachments Content Type (expression): body('Get_Export_of_a_Report_Template')['$content-type']

As soon as the export profile is changed, the content type and the file extension also change.


Example Workflow 3: Executing a Planned Report


For this you only need the ID of the planned report and the access data of the API user.

Note: For the TaskID, open the Scheduled Report to edit


The planned reports and their actions can then be defined in the Report Server. When Microsoft Flow executes a scheduled report, it does not receive the export of the report itself.


  • Instead of body('Get_Export_of_a_Report_Template') it's best to use the premade button, because the action may not be called 'Get_Export_of_a_Report_Template':


  • IDs

​​When exporting a report template via REST API, the finished report (PDF, DOCX, etc.) is encoded with Base64 and returned by the REST API as follows:

Unique IDs are used in the article. You can copy these IDs (e.g. A0BCB71A-BA65-45C597F3-1282D9C7C126) from the URL, which is always at the end of the address:

For the TaskID open the scheduled reports for editing

For the ExportProfileID, open the export profile for editing

For the TemplateID open the report template for editing

Expression: base64ToBinary(body('Get_Export_of_a_Report_Template')['$content'])


The printout converts the transferred file back from Base64, which is stored in the body of the Get_Export_of_a_Report_Template action as $content.

The ready-made functions base64ToBinary and body are provided by Microsoft Flow (there are many more to process data):



After configuring the Custom Connector and using these sample workflows, you can now integrate exporting or generating reports into your flows. Whether it is uploading to any cloud server or general report processing.

In the next version, the Report Server will also be able to trigger flows via WebHooks.



Author: Alexander Horak
Head of Development combit Report Server

For over 20 years Alexander Horak is engaged in software development and has already worked at combit during his computer science studies. Nowadays, he is Head of Development of the combit Report Server, an ASP.NET MVC based Enterprise Reporting solution. In his spare time he loves soccer and is an active supporter of FC Bayern Munich.


combit Development BlogRSS
What’s this blog for?
A place to share updates about the ongoing development of our products. General musings on the software industry included.
June 2021 (1)
May 2021 (1)
April 2021 (2)
March 2021 (1)
February 2021 (2)
January 2021 (1)
December 2020 (2)
November 2020 (1)
October 2020 (2)
September 2020 (1)
August 2020 (2)
July 2020 (1)
June 2020 (1)
May 2020 (2)
April 2020 (2)
March 2020 (2)
February 2020 (1)
January 2020 (1)
December 2019 (1)
November 2019 (2)
October 2019 (2)
September 2019 (2)
August 2019 (2)
July 2019 (2)
June 2019 (2)
May 2019 (1)
April 2019 (0)
April 2019 (1)
March 2019 (1)
February 2019 (1)
January 2019 (1)
December 2018 (1)
November 2018 (2)
October 2018 (4)
September 2018 (4)
August 2018 (2)
July 2018 (2)
June 2018 (2)
May 2018 (1)
April 2018 (1)
March 2018 (1)
February 2018 (2)
January 2018 (1)
December 2017 (1)
November 2017 (2)
October 2017 (3)
September 2017 (3)
August 2017 (2)
July 2017 (2)
June 2017 (1)
May 2017 (2)
April 2017 (1)
March 2017 (1)
February 2017 (1)
January 2017 (2)
December 2016 (1)
November 2016 (1)
October 2016 (4)
September 2016 (5)
August 2016 (2)
July 2016 (2)
June 2016 (3)
May 2016 (2)
April 2016 (3)
March 2016 (3)
February 2016 (1)
January 2016 (2)
December 2015 (2)
November 2015 (1)
October 2015 (4)
September 2015 (5)
August 2015 (2)
July 2015 (2)
June 2015 (2)
May 2015 (1)
April 2015 (2)
March 2015 (1)
February 2015 (1)
January 2015 (1)
December 2014 (2)
November 2014 (1)
October 2014 (1)
September 2014 (2)
August 2014 (1)
July 2014 (2)
June 2014 (1)
May 2014 (2)
April 2014 (1)
March 2014 (2)
+1 800 256 3608 (toll-free North America only)