Today, we have just built a custom connector wrapping the chucknorris io free JSON API from scratch and used it in a Power Automate and I'm sure you agree that it's a fun and easy process, right?
But why do you need to create a custom connector?
Connector Use case
Team XYZ (a fusion team) comprises of a Business Manager (citizen developer building low code solutions on Power Platform), IT Admin, Researcher and Pro-Dev. The Researcher has identified a new External Service (with a free & public API) that would greatly benefit their business goals and they would like to access it directly from their system. However, the Business Manager, building the low code solutions lacks the coding background to use the API endpoints directly from his solution. The Pro-Dev therefore steps up to fill in the gap by building a connector to wrap the API and publishes it to the organization's environment. The Business Manager then uses this connector to access the external service, helping the team hit their business goals and everyone is happy.
service, helping the team hit their business goals and everyone is happy.
What we covered today
Every person's role on the Power platform towards digital transformation.
What is a connector? Note: Connectors allow you to not only access Microsoft products, but also external services
Custom connectors are used to:
- Add services not currently supported
- Expand an existing connector that doesn't have the trigger/action you want to use
Step-by-step - Build a connector
Step 1: Read the Docs/ know the API you want to build a connector for.
Step 2: Start in one of the products (Power Apps, Power Automate or Logic Apps). You can choose one of the following options to start building your connector:
- Create one from blank. See example of the SWAPI API (Star Wars)
- Create from Azure Service (Preview) - Super useful when using Azure API Management
- Import an OpenAPI File (version 2)
- Import an OpenAPI from URL
- Import a Postman collection. Learn how to Create a Postman collection for a custom connector
- Import from GitHub
Step 3: Set up the Authentication
Step 4: Define the operations (triggers/actions) for your connector. The action you want to create MUST be implemented by the API
Step 5: Add code if needed (for now C# code is supported)
Step 6: Save and test your connector
When you build your connector, ensure you hit save button to avoid losing all your work.
Note: If you want your connector to be used across different environments, create it within a solution
Finally. these tools will help you build custom connectors: