Invoke REST API from Power Automate and Power Apps

In this tutorial, we will learn how to Invoke a REST API with Power Apps and Power Automate. For this demo, we will be using the Muhimbi REST API with the HTTP action and Parse JSON in Flow all while understanding the basics of REST API.

Basics of REST API

Before we start exploring the Muhimbi PDF Converter Online REST API, let’s understand the structure of REST API requests which is made up of raw HTTP Method, Endpoint, including Headers, and the Body. Let’s understand each of them in detail

  • HTTP VERBS – HTTP defines a set of request methods to indicate the desired action to be performed for a given resource. The primary or most-commonly-used HTTP verbs or methods are POST, GET, PUT, PATCH, and DELETE.
  • URI\Endpoints – REST APIs use URIs to address resources. For APIs, an endpoint can include a URL of a server or service. Each endpoint is the location from which APIs can access the resources they need to carry out their function.
  • Headers – Headers are an important part of the API request and response as they represent the meta-data associated with the API request and response.
  • Request and Response Body – APIs work using “requests” and “responses”. In our example we will  provide a request body in JSON to the REST API call.

Now that we understand the basic element\structure of REST API requests – Let’s use the Muhimbi REST API call to Convert some HTML text to PDF.

Before we begin, please make sure the following prerequisites are in place:

  • Power Automate subscription with Flow Plan 1 or Plan 2 .
  • Muhimbi PDF Converter Services Online Free, full or trial subscription (Start trial). Once signed up, and the email address has been confirmed, you will receive an API KEY. 
  • Appropriate privileges to create Power Apps and Power Automate.
  • Working knowledge of both Power Apps and Power Automate.

About the Muhimbi Converter Online API

Muhimbi PDF Converter Online provides the most mature subscription-based PDF Conversion and Document Automation platform in the market. You can use the service to create meeting packs, share documents, watermark and secure sensitive information, make content searchable via OCR, and archive to PDF/A in line with regulatory requirements.

API Reference and Endpoints

For links to the Muhimbi PDF Converter Online reference and a list of the API endpoints, see API Reference and Endpoints.

  • Use the following URL and POST for the REST API call –
  • Headers:
    • API_key: Your Muhimbi API Key.
    • Content-Type: application/json.

Body :

	  "use_async_pattern": false,
	  "source_file_name": "string",
	  "source_file_content": "base64string",
	  "output_format": "PDF",
	  "fail_on_error": true
Use Async Pattern booleanSet True for long running operation
Source file nameTRUEstringName of the source file including extension
Source file contentTRUEbase64stringContent of the file to convert
SharePoint File objectSharePoint File URLS
Output formatTRUEenumOutput format
Override settings stringOptional settings using Muhimbi’s XML syntax
Template file content byteOptional template file content (e.g. infopath XSN file)
Fail on error booleanFail on error
  • Response:
	  "processed_file_content": "base64string",
	  "base_file_name": "string",
	  "result_code": "Success",
	  "result_details": "string"
Processed file contentbase64stringFile generated by the Muhimbi converter.
Base file namestringName of the input file without the extension.
Result codeenumOperation result code.
Result detailsstringOperation result details.

  • Configuring the Power Automate HTTP Action:

Now that we know the basics of REST API and also understand the MUHIMBI REST Endpoint lets Invoke REST API from Power Automate and Power Apps

In this tutorial, we will learn how to Invoke a REST API with Power Automate.

Invoke REST API from Power Apps – Power Apps Pen Input to PDF (Signature)

Subscribe to this blog for the latest updates about SharePoint Online, Power Automate (Microsoft Flow), Power Apps and document conversion and manipulation.

2 thoughts on “Invoke REST API from Power Automate and Power Apps

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s