Is Flow like DIY?

Sometimes you might find that you need to create custom Flow connectors for applications that aren’t available in the list of connectors.

Microsoft Flow or Power Automate currently has 341 connectors available.

Now you’ve got a few options available:

  1. Wait for the connector to become available
  2. Use the standard HTTP request actions available within Flow
  3. Write a custom connector or get someone to do this for you

Before go any further. I hope that when you read this that you will realise that Microsoft Flow development is a bit like DIY. You try and do the job yourself but then half way through you realise that you should have asked an expert for help. Often Flow is seen as citizen development, where in my opinion it isn’t always the right approach to take.

Custom Flow Connectors

Custom Connectors in Power Automate

You might already have found the Custom Connectors option in Flow. This is where you would start if you want to create your own connectors.

Now you can either upload an existing connector file or you can create a new connector within the Flow interface.

create Custom connector

As I try to stick to the no code options where possible, I’m going to have a look at the create from blank option in the Create custom connector menu.

Custom Connector name

I’m going to use Microsoft Graph as an API for my examples today. Graph can do an awful lot already, and wouldn’t it be great if you could help all your users by making these MS Graph endpoints available within Microsoft Flow without them having to understand the complicated API layer of MS Graph.

Once I have supplied the connector name, I can supply the base details for my connector.

General

If you have ever looked at writing a swagger file then some of the above will look familiar. Just to give you an example of the a flow connector swagger files, have a look at the Create a Team in Microsoft Teams connector. To understand the above forms it might even be a good idea to have a look at the example swagger file.

In the above form I’m filling in the following details.

Icon background color: #123456

Description: Graph connector

Scheme: HTTPS

Host: graph.microsoft.com

Base URL: /

Then I click on the Security link.

Security

Depending on your API you might need to select a different option here.

  • No Authentication
  • Basic Authentication
  • API Key
  • OAuth 2.0

Basic Authentication

With Basic Authentication you will need to supply a user name and password when you setup the connection to your API.

Basic Authentication

API Key

The API Key will give you options to ask for keys that your API needs. This is a typical approach for 3rd party SAAS solutions. You will have seen this in my SMS post from last week.

API Key

OAuth 2.0

The OAuth option is a bit confusing. The below screenshot is how this option appeared for me. For some reason the form is pre-filled with details from an existing connection.

OAuth

But help is at hand. This is a good moment to have a detailed look at the swagger file that is part of the Create a team project mentioned earlier.

OAuth 2.0

All the authorisation URL details can be found here and this makes the development process a lot easier as I can simply copy/paste the urls across.

Definition

This is where the interesting bits start. So far it has been all about creating a connector but we are really after created actions and triggers.

Definition Screen

I’m going to have a look at creating an action. All I had to do was click on New action and a new action is created. There is still some details to supply though.

Create An Action

Again I’m going to make use of the Microsoft Teams example.

The Summary, description and operationId are some of the details that need to be supplied. Note that the operationId needs to start with a capital. The operationId also needs to be unique within your connector. Multiple connectors can use the same operationId.

Action JSON

In the Request section you will need to supply the API path details ( Like the method Post, Get, Put, Patch and the URL that you are connecting to).

Then when you click on Create the Connector , the connector should become available within your flow environment.

Create the Connector

Within Flow I can now find my action that I created within the Custom tab.

My Action in a Flow

This now completes the basics on creating custom connectors. In my next post I will have a look at updating custom connectors in more detail.

Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications Microsoft MVP working as the Head of Power Platform at Vantage 365. You can contact me using contact@sharepains.com

2 thoughts on “Write custom flow connectors in Power Automate”
  1. Hi Pieter,
    great article. I’m excited on how you’ll handle updating the connectors.
    I’m relying heavily on custom connectors right now, too.
    Do you have any insights on how the new licensing changes will impact custom connectors and HTTP requests? Unfortunately Microsoft is not very good on communicating these. All users requiring a P1 Flow license would be a dealbreaker.

    1. Hi Timo,

      In my second post about creating your own connectors I’m looking at updating the connectors through the same custom connector interface.

      I’ve compared the costs of Flow with for example Nintex and fond that Flow will still be cheaper. I do agree though that it makes that initial introduction of Flow a bit harder.

      The latest licensing updates are here:
      https://techcommunity.microsoft.com/t5/Office-Retirement-Blog/UPDATED-Updates-to-Microsoft-Flow-and-PowerApps-for-Office-365/ba-p/289589

Leave a Reply to Pieter VeenstraCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains by Microsoft MVP Pieter Veenstra

Subscribe now to keep reading and get access to the full archive.

Continue reading