Step-by-Step Guide to Creating a Custom Connector for Power Automate
You can make a custom connector in Power Automate by following steps. A custom connector lets you link to any outside API. This means you can automate jobs like syncing leads between systems. You can also make expense approvals easier or help new hires join. Many companies use custom connectors to cut down on manual work. They also use them to make workflows the same and connect data or files across tools. This guide will help you do more with Power Automate, even if you are new.
Key Takeaways
Custom connectors help you connect Power Automate to many APIs. They let you automate jobs that built-in connectors cannot do.
Get all API information and pick the best authentication method first. This helps make setup easy and keeps things safe.
Use Power Automate’s visual tools to build, test, and check your connector. You do not need to know how to code.
Update your connector often so it works with new API changes. Share it safely with your team to help everyone work better together.
Test your connector well to stop mistakes. This keeps your automated workflows working well and without problems.
Custom Connector Basics
What Is a Custom Connector
A custom connector helps Power Automate link to almost any web service or API. You use it when the built-in connectors do not have the service you want. You set up the connector by telling Power Automate how to talk to the API. This means you set up the connection, choose how to log in, and pick what actions or triggers you want.
Tip: You do not need coding skills to use a custom connector. Power Automate shows you each step.
Key parts of a custom connector are:
Connectivity: You can connect Power Automate to APIs and use them in your flows.
Authentication: You choose how users log in, like OAuth 2.0, API keys, or basic authentication.
Trigger & Action Support: You pick what starts a flow and what actions the connector can do.
Reuse: You can use your connector in many flows, teams, or places.
UI Customization: You can make the connector simple to use by setting clear choices and options.
Custom connectors act like a bridge. They help Power Automate talk to services without built-in connectors. You can use them to connect to partner systems, apps made by your company, or special tools.
Why Use One
You use a custom connector to automate tasks with services that Power Automate does not support. Built-in connectors work with many popular apps, but sometimes you need more. A custom connector lets you reach extra services.
Some main reasons to use a custom connector are:
You can connect to third-party or internal APIs, which lets Power Automate do more.
You control what triggers and actions are there, so you can make automation fit your needs.
You can use safe login methods, so your data stays protected.
You can automate tasks with custom or special apps, which helps you get more done.
You can fill gaps that built-in connectors cannot cover.
Custom connectors also help you work with old or on-premises systems. You can use them in different flows and share them with your team. This saves time and keeps your automations neat.
Prepare for Setup
Gather API Info
Before you start, you need some API details. This helps you set up your custom connector without mistakes. It also makes things easier later. You should find these things:
General Information
Look for the API host address, like
api.example.com
.Check the base URL for calls, such as
/v1/
.Make sure the URL uses HTTPS for safety.
Write a short note about what the API does. Try to get an icon for your connector if you can.
Security Details
Find out what authentication type the API needs. It could be an API key, OAuth 2.0, or basic authentication.
Write down the label users see, the name the API wants, and where to send it (header or query).
Definition of Actions
List the actions or triggers you want, like "Get User" or "Create Record."
Write the operation IDs for each action.
Note the HTTP verbs (GET, POST, etc.) and request URLs.
Collect sample requests and responses. These show the data structure for your connector.
Tip: You can usually find this info in the API’s documentation or developer portal.
Choose Authentication
You need to pick an authentication method that fits the API’s rules. Power Automate supports a few common types:
API Key Authentication: You use a special key. It goes in the header or query string. Many APIs use this for quick access.
Basic Authentication: You type a username and password. Power Automate puts these in the request header.
OAuth 2.0: You log in on a secure page. The connector uses tokens to reach the API. This works well with services like Microsoft or Google.
Each connector can only use one authentication method. If you need more than one, you must add extra steps outside Power Automate. Always pick the method that keeps your data safe and matches the API’s rules.
Build the Custom Connector
Start in Power Automate
You can start making your custom connector in Power Automate. First, go to
https://make.powerautomate.com/
. Open the Data tab on the left. Pick Custom connectors from the list. Click New custom connector at the top right. Choose Create from blank to begin. Type a name for your connector and click Continue.
Tip: If you already have an API definition, you can import it. You can use an OpenAPI file or a Postman collection instead of starting from nothing.
There are a few ways to make a new connector. You can build one from scratch with the visual tool. You can also import an OpenAPI file. Or you can import a Postman collection. These ways help you set up the connector fast if you have API info.
Add General Details
After you start, you need to add some basic info. This helps everyone know what your connector does.
Write a simple description. Say what the connector does. Do not talk about private systems.
Add an icon and a background color. This helps people find your connector in Power Automate.
If you use OpenAPI or Postman, upload the file now. Power Automate will read the endpoints and help you set up actions.
Best Practice: Use names that show what the connector links to, like "SAP_InventoryConnector." Write clear summaries for each action, like "Create new task" or "When a new order is placed." This makes your connector easy to use.
Set Up Security
You must pick how users will connect to the API. Power Automate lets you use different authentication types:
None: No login needed. Only use this for public APIs.
API Key: Users type a key. Power Automate sends it in the header or query.
Basic Authentication: Users type a username and password.
OAuth 2.0: Users log in on a safe page. You must enter the Client ID, Client Secret, Authorization URL, Token URL, and Scope. For Microsoft Entra ID (Azure AD), register an app and use its info.
Note: For OAuth 2.0, add all needed fields like access_token and refresh_token. If you use environment variables for secrets, use
@environmentVariables("prefix_VarName")
.
You can also set Data Loss Prevention (DLP) rules for your connector. This controls if people can use it in business or non-business flows. If you set it as "Blocked," Power Automate will stop all flows that use it.
Define Actions
Now, you will add the actions and triggers your connector will use.
Click New action or New trigger.
Give each action a clear name and description. Use sentence case and keep it under 80 letters.
Set a unique operation ID, like
getContacts
orcreateOrder
.Pick the HTTP method (GET, POST, etc.) and type the endpoint URL.
Add input parameters. These can be path, query, or body parameters.
Import a sample request and response. This helps Power Automate know the data format.
Add headers, like
Content-Type: application/json
, if needed.Test each action with sample data to check if it works.
Repeat for every action or trigger you want to add.
Tip: Use "Import from sample" to set up requests and responses fast. This helps Power Automate map the data right.
If you see errors like "400 Bad Request" or "401 Unauthorized," check your endpoint URLs and authentication. Make sure you set all path parameters and use the right HTTP methods.
Common Errors Table:
When you finish adding and testing all actions, save your custom connector. Now you can use it in your flows to automate tasks with your API.
Test and Use
Validate the Connector
You should check your custom connector before using it in real workflows. Power Automate has tools to help you do this. Here are some steps to make sure your connector works:
Make a solution in Power Automate. Add your custom connector to it.
Click the three dots next to your solution. Pick Solution checker, then click Run.
Wait for the check to finish. You will get messages by email and inside Power Automate.
Look at the Solution Checker report. The report shows problems, how bad they are, and ways to fix them.
Solution Checker helps you find problems with connections, triggers, and actions. It checks your connector using Power Platform best practices.
Testing your connector is very important. You make sure it works the way you want. You check that it connects to APIs or services without trouble. You also make sure your workflows do not have errors. Good testing helps your automation work better and keeps business tasks running smoothly.
Add to a Flow
After you check your connector, you can use it in a Power Automate flow. Here is how you do it:
Click New and pick Custom Connector under Automation.
Type the connector's name, add an icon, and write a description.
Enter endpoint details and pick the authentication type.
Set up security, like the API key name and where it goes.
Add actions by making new ones and bringing in request samples.
Check and create the connector.
Test the connector by making a new connection and entering login details.
Use the connector in a flow by picking it from the Custom tab and adding its actions.
Save and test the flow to see what happens.
You can test your flow with sample data. For example, you can add items to a SharePoint list, run the flow, and look at the results. You can also use manual triggers and give input in the easy-to-use interface. This helps you see if the connector works with your data.
You can link old systems with new apps.
You can automate hard workflows with special integrations.
Always test your connector with real data before using it for real work. This step helps you find problems early and keeps your automation working well.
Maintain and Share
Update as Needed
APIs can change as time goes on. You must keep your custom connector updated. This helps your flows keep working. When the API changes, you should update your connector. Here are the steps:
Open your custom connector in Power Automate.
Go to the Definition tab and pick Response.
Change the response schema to match the new API.
Test the connector to see if it works now.
Make a new connection for the updated connector.
Take out the old connector from your Power Apps app.
Save and publish your app.
Open the app again and add the new connector.
Save, publish, and close the app.
Open the app one more time and allow permissions.
Power Apps saves connector details for later use. If you remove and add the connector again, the app refreshes and uses the newest schema.
If you use public and on-premises APIs, you can use hybrid integration. The On-premises Data Gateway helps with this. It lets Power Automate connect to your local servers and cloud services. You can link cloud flows with on-premises data. This makes your automation more flexible.
Share with Team
Sharing your custom connector helps your team do more. You can publish connectors for everyone in your company. This lets people use the same logic and actions.
Use safe authentication, like OAuth, to protect credentials.
Make connectors for reuse, not just one-time use.
Publish connectors in your Power Platform environment for team access.
Update and republish connectors when your needs change.
Check who can use your connectors often. Use tools like the Power Platform admin center to watch sharing and ownership.
Security matters when you share connectors. Only let trusted people use them. Look at custom code for risks. Give roles carefully and use the least privilege needed. Manage access with Azure AD security groups. Set Data Loss Prevention (DLP) policies to control connector use. Use multi-factor authentication for extra safety. For important flows, use service principals instead of personal accounts.
By following these steps, your team can work better and keep data safe.
You can make a custom connector by following easy steps. First, collect the API details you need. Next, choose how users will log in. Then, decide what actions your connector should do. After that, test your connector to see if it works. If you have problems, check your OAuth app type. Make sure the token audience is correct. You can also use Postman to try sending requests again. Try out cool features like connecting to on-premises data. You can also set up actions to run at the same time. Join the Power Platform Community Forum to share your connector. You can also get help from others there. Custom connectors let you automate tasks and link your favorite tools. This makes your workflows faster and helps them work better.
FAQ
How do you fix authentication errors in your custom connector?
Check your API key, username, or OAuth settings. Make sure you enter the right values. If you use OAuth, confirm your client ID and secret. Try logging in again. If you still see errors, review the API documentation.
Can you update a custom connector after you publish it?
Yes, you can update your connector anytime. Open it in Power Automate, make changes, and save. Test the connector again to make sure it works with your flows.
What should you do if your connector returns a 404 error?
A 404 error means the endpoint does not exist. Double-check the URL and path parameters. Make sure you use the correct HTTP method. Review the API documentation for the right endpoint.
Is it possible to share your custom connector with others?
You can share your connector with your team or organization. Go to the connector settings and set permissions. Use Azure AD groups for better control. Always review who has access.
Do you need coding skills to build a custom connector?
You do not need to write code. Power Automate gives you a visual editor. You fill in forms and upload sample requests. You only need to understand the API documentation.