How to Upload a Custom Connector in Power Automate via OpenAPI URL
The Power Automate connector library is quite extensive, and it grows continuously, steadily accommodating new third-party applications and services for an equally fast-growing user base.
Even so, it’s possible we might find ourselves adrift in Power Automate without access to the specific API connector we need for our latest project.
Thankfully, if we find ourselves lacking the API we need to pursue our latest flow idea, all is not lost. Power Automate allows us to upload APIs to the platform as custom connectors, and with the right documentation, we can open doors to new services in our connector library.
Where do we find the option to upload custom connectors in Power Automate?
We’ll find the option to upload a custom connector in Power Automate by first navigating to the Custom connectors page. Bear in mind we’ll need a premium Power Automate license to access the Custom connectors tab (in much the same way we’ll need a premium license to access third-party connectors in the first place).
Starting from the Power Automate home page, we’ll find the Custom connectors tab by navigating to the lefthand side of our page & into the second set of pinned options.
We’ll click “more” to bring up additional navigation items, and we’ll then click “Discover all” to view the full list of options.
On the following page, we’ll find the Custom connectors option available under the Data section.
We can now pin this link to our navigation bar to make it easier to find in the future.
When we click on the Custom connectors link in our quickbar, we’ll reach the Custom connectors page.
Since I’ve created Custom connectors for demonstrations in the past, we’ll see those previously uploaded connectors listed on my Custom connectors page in the screenshot below. This is how all future custom connectors will appear for us.
How do we begin uploading a custom connector?
To upload our own custom connector, we’ll first click on the New custom connector dropdown menu in the top right corner of our Custom connectors page.
As shown in the above screenshot, we’ll find several different options we can pursue to upload our own custom connector.
These options include creating from an Azure Service (currently a preview option), importing an OpenAPI file, importing an OpenAPI from URL, importing a Postman collection, and importing directly from Github.
We’ll need to select an option from this list according to the API documentation we have available to us.
Uploading an OpenAPI connector from URL specification
In this article, we’ll focus learning to use the OpenAPI from URL option. This is an extremely easy upload method, and it’s the recommended method for uploading Cloudmersive APIs.
I’ll upload the Cloudmersive Virus Scan API in my example flow (providing documentation to locate the necessary URL), and you can follow along the same URL — OR with any OpenAPI URL spec of your choosing. Only two portions of this walkthrough will pertain specifically to Cloudmersive APIs: 1) locating URL documentation, and 2) utilizing the API key connection authorization method.
We’ll begin this demo by locating an OpenAPI URL specification for the Cloudmersive Virus Scan API. We’ll find this easily by navigating to the Cloudmersive website and searching for a Knowledge Base article titled “How can I access Cloudmersive Advanced Virus Scan Resources in Power Automate?”.
After we click on the article link, we’ll scroll down to the bottom of the page and copy the Virus Scan API URL specification to our clipboard.
We’ll then head back to the Custom connectors page in Power Automate, click on the New custom connector dropdown, and select the Import an OpenAPI from URL option.
We’ll then name our connector and paste our OpenAPI URL spec in the appropriate field.
We’ll then click “Import”, and after a moment, we’ll click “Continue” to move on.
This will bring us to the General information page. This page should have dynamically loaded some high-level information about our API from the specification we provided.
In my example, we’ll notice an auto-generated Virus Scan API description is already in place, and we’ll notice HTTPS was automatically selected from our two Scheme options. Additionally, we’ll notice the host is set to a basic API host URL (in this case, api.cloudmersive.com
, which is Cloudmersive’s default public cloud endpoint). This host URL can be changed to a different host depending on how our version of any given service is deployed.
When we navigate to the Security tab, we’ll find the Authentication type for our custom connector selected based on our API’s authorization requirements. Cloudmersive connectors require an API Key; other APIs may require OAuth 2.0, basic authentication, or no authentication at all.
On the Definition tab, we’ll find documentation for each individual service our API offers. These services will become “actions” in the Custom tab of our Power Automate connector library once we publish our custom connector.
The Cloudmersive Virus Scan API includes 11 separate services. Looking at my example, we’ll find the Summary, Description, Operation ID, and Request pre-requirements dynamically laid out for each Virus Scan API action, and we’ll find basic Response and Validation information included towards the bottom. Note that this information may not necessarily generate for every API we use, and we should refer to our provider’s documentation to fill in the gaps.
Directly following the Definition tab, we’ll find the AI Plugin (Preview) and Code tabs. We won’t cover these tabs in this demonstration, but the Code tab in particular can be useful if we’re technically adept enough to transform request and response payloads with C#.
The Test tab is the final page available to us in our custom connector configuration, but we won’t be able to utilize this option until we create our connector.
To create our connector, we’ll click on the Create connector option.
After our connector is successfully created, we’ll head to the Test tab. The option to create a New connection will now be available to us.
When we click on New connection, we’ll be redirected to a window that asks us to authorize our connection with the API’s selected authentication type.
As mentioned earlier, the Cloudmersive Virus Scan API requires an API key for authentication. If you’ve been following along with this demonstration using the Cloudmersive Virus Scan API URL specification, you can get a free API key by creating a free account on the Cloudmersive website. This will allow you to test and/or use the Virus Scan API in Power Automate with a limit of 800 API calls per month and zero additional commitments.
In my example, I’m using a free API key to authorize my Demo Virus Scan connection.
Once we’ve provided the necessary authentication details to create our connection, we’ll click Create connection to enable our new custom connector.
This will bring us back to the Test tab. We can now click Update connector to show the new connection in the Test tab.
Below the Connections box, we can now test various API services from our custom connector API spec with example requests.
In the above example, I’ve passed an empty pair curly brackets to the Virus Scan API endpoint to test my connection.
Because my connection is valid (and no file is included), I’ve received a 200 response from the endpoint with a generic Virus Scan result.
How do we find our custom connector in the Power Automate flow editor?
Now that we’ve successfully created our custom connector, we can find it in our connector library.
Note that our new connector may not immediately populate in the library; the speed at which the library updates depends largely on the traffic Power Automate is experiencing at any given time.
When we add a new action in a Power Automate flow, we can filter to custom connectors by clicking on the Runtime dropdown and selecting the Custom option.
Assuming Power Automate has already updated our connector library with the new custom connector, we’ll find it available in the Custom Runtime section.
When we click on our new custom connector, we’ll be able to access all its associated actions in exactly the same format as any other published connector in the Power Automate library.
And that’s all there is to it! We now have access to a brand new custom connector in our Power Automate connector library.
Conclusion
In this article, we learned how to navigate to the Custom connectors page in Power Automate, and we then learned how to upload our own custom connector using an OpenAPI URL specification. We demonstrated this in the context of uploading the Cloudmersive Virus Scan API, but we can apply the same workflow to any API with OpenAPI URL documentation available.