By Steve Drake, Director, Technology and Christian Waters, Director, Delivery

“An API-first approach involves developing APIs that are consistent and reusable. This can be accomplished by using an API description language to establish a contract for how the API is supposed to behave.”

swagger.io

When we deliver web portals using an API-first approach, it is a simple process to expose these operations to Power Automate. This allows your users to combine your business-specific operations in innovative ways.

To do this, a custom connector that understands the API’s operations and data structures is created. Then consuming the API is as simple as populating a single Power Automate shape, no dealing with JSON, schemas, or authentication directly!

api6

Power Automate can trigger on almost any action within the Microsoft suite of products, as well as a huge range of 3rd party products. Examples include on receipt of an email, or an update to a Dynamics 365 record.

“Empower everyone to build automated processes with flows in Power Automate. Use low-code, drag-and-drop tools and hundreds of pre-built connectors that automate repetitive, mundane tasks with ease.”

powerautomate.microsoft.com

The key to making this work seamlessly with your own APIs is to follow Open API standards when developing the API.

For example, we build a web portal in Angular that uses Auth0 for authentication. These Auth0 tokens are then used to make requests directly to a RESTful backend API running in the Azure cloud.

api-2

The API’s contract is defined by decorating our method with various attributes:

api-3

This then allows us to generate an Open API specification (formerly known as a Swagger Specification):

api-4

Once this API description is available, creating a Power Automate connector is simply a case of pointing the wizard at the definition:

api5

And in a few clicks, all your API operations are available to use in Power Automate, with the exact same experience as the out-of-the-box connectors. Now let your power users loose on them!

api7

To find out more about how we can help improve your business processes, click here.

Further Reading

https://swagger.io/resources/articles/adopting-an-api-first-approach/

https://docs.microsoft.com/en-us/connectors/custom-connectors/define-openapi-definition

https://docs.microsoft.com/en-us/connectors/custom-connectors/use-custom-connector-flow

Get our latest articles in your inbox

Enjoyed this article? Sign up for our email newsletter and get real-world information on all things Microsoft, cloud and tech. Your information will be shared with MailChimp but no one else, and you can unsubscribe with one click at any time