Using SOAP Custom Connectors in Microsoft Power Automate (Flow) – Part 1

This Post is part 1 of a 3 part series on creating and using SOAP custom connectors in Azure Logic Apps, Power Automate (Microsoft Flow), and Power Apps.

These technologies come with native connectors for almost every conceivable task, ideal for no-code solutions. However, in some cases there is a need to call into services that are either not available as a native connector, or your scenario is so specific that it could never work using an off-the shelf connector.

In this post I explain how to call into a SOAP based PDF Conversion Service, but the principle is the same for other SOAP based web services. Why use a SOAP based PDF Conversion Service, as a perfectly fine connector such as the The Muhimbi PDF Converter Online is available at little or no cost?

Well, in some cases there are non-functional requirements to consider. For example, some organisations are not allowed, able or willing to use cloud based services to process their documents, no matter how secure the underlying technology is. Quite often these requirements are dictated by internal security departments, or regulatory bodies that oversee the industry the organisation is operating in.

It is a minefield, but fortunately there are workarounds. In this post we actually use an on-premise version of a product, install that into our own Azure instance – so we control it end-to-end – and invoke its internal Web Service from Microsoft Power Automate.

So, with the “why?” having been covered, lets move-on to the actual steps you’ll be using to get this working.


In this three-part series, we’ll cover the following topics:

  1. Creating a SOAP custom Connector using Postman (this post).
  2. Creating a custom Connector using a Postman collection file and Integrating it with Microsoft Power Automate (part 2).
  3. Creating a Flow that can consume the SOAP Service (part 3).


Before we begin creating and using a SOAP custom connector , please make sure the following prerequisites are in place:

  1. Install and configure a Windows Server with a public facing IP address. This may be a server in your own data centre, or a VM in AWS or Azure.
  2. Download the fully functional free trial of The Muhimbi PDF Converter Services here.
  3. Please make sure the software is installed exactly as described in chapter 2 of the Administration Guide. Please follow that guide to the letter and make sure you pay particular good attention to the section about ‘dependencies’. The Administration Guide is included in the download and available on-line here.
  4. Install The Postman extension for Chrome with reference to this article.

Now that we have the prerequisites in place, lets create the SOAP custom connector using Postman.

Step 1: Launch the Chrome browser and click on The Postman APP when you browse to chrome://apps/ or download  Postman from: https://www.getpostman.com/

Note: For the purpose of this demo, I am using the Postman Chrome APP / Extension, though the Postman Native APP works in the same way.

Apps 
chrome 
Chrome I chrome://apps 
Web Store 
Slides 
Google Dri... 
Sheets 
ARC 
x 
Not signed in to Chrome 
(You're missing out—sign in) 
You Tube 
Cm ail 
Postman 
Web store e

Step 2: Create a new collection in Postman.

  • In the header toolbar, click the New button
  • The “Create New” tab appears.
  • In the “Create New” tab, click “Collection“ as shown below:
  • Enter a name and optional description and Click the “Create” button.

Step 3: Configure a Convert to PDF request in the Postman.

  • In the request body, define the SOAP Envelope as shown below:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ns="http://services.muhimbi.com/2009/10/06" 
xmlns:ns1="http://types.muhimbi.com/2009/10/06" 
xmlns:ns2="http://types.muhimbi.com/2014/02/06"
 xmlns:ns3="http://types.muhimbi.com/2015/04/13" 
xmlns:ns4="http://types.muhimbi.com/2010/05/17" 
xmlns:ns5="http://types.muhimbi.com/2013/08/01" 
xmlns:ns6="http://types.muhimbi.com/2013/01/14">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:Convert>         
         <ns:sourceFile></ns:sourceFile>        
         <ns:openOptions>            
            <ns1:FileExtension></ns1:FileExtension>            
            <ns1:OriginalFileName></ns1:OriginalFileName>            
         </ns:openOptions>         
         <ns:conversionSettings>            
            <ns1:Format>PDF</ns1:Format>           
            <ns1:Fidelity>Full</ns1:Fidelity>           
            <ns1:ConverterSpecificSettings/>           
            <ns1:OutputFormatSpecificSettings/>            
         </ns:conversionSettings>
      </ns:Convert>
   </soapenv:Body>
</soapenv:Envelope>
  • Save the REQUEST in the collection as shown below:

Your final POST Request will look like this:


Step 4: Now it’s time to test our POST request:

  • Change the body of the SOAP request as shown below and click on SEND. In this particular case we are sending a very short TXT file – in the sourceFile element – to the conversion service (base64 encoded).
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ns="http://services.muhimbi.com/2009/10/06" 
xmlns:ns1="http://types.muhimbi.com/2009/10/06" 
xmlns:ns2="http://types.muhimbi.com/2014/02/06"
 xmlns:ns3="http://types.muhimbi.com/2015/04/13" 
xmlns:ns4="http://types.muhimbi.com/2010/05/17" 
xmlns:ns5="http://types.muhimbi.com/2013/08/01" 
xmlns:ns6="http://types.muhimbi.com/2013/01/14">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:Convert>         
         <ns:sourceFile>TXVoaW1iaSByb2Nrcw==</ns:sourceFile>        
         <ns:openOptions>            
            <ns1:FileExtension>txt</ns1:FileExtension>            
            <ns1:OriginalFileName>clavin.txt</ns1:OriginalFileName>            
         </ns:openOptions>         
         <ns:conversionSettings>            
            <ns1:Format>PDF</ns1:Format>           
            <ns1:Fidelity>Full</ns1:Fidelity>           
            <ns1:ConverterSpecificSettings/>           
            <ns1:OutputFormatSpecificSettings/>            
         </ns:conversionSettings>
      </ns:Convert>
   </soapenv:Body>
</soapenv:Envelope>
  • A successful response  should give you the Status as “200 OK” and the response body shown below. The response includes a base64 encoded version of the converted PDF. We’ll get to that later.

Step 5: Now that we have configured the Postman request and tested it, let’s export our Postman collection.

  • Click on the ellipses (…) beside the collection and click on Export.

Step 6: Export the collection as V1 and Save it to your computer.

Your Postman custom Connector is now finished!  In the next Post, we’ll create a custom connector using a Postman collection file and Integrate it with Power Automate (Microsoft Flow).

Leave a Reply

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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