Overview
Power Automate provides a vast range of built-in connectors, but sometimes businesses need to integrate with APIs or services that don’t have a native connector. This is where custom connectors come in. Developers can create custom connectors to extend Power Automate and integrate with third-party applications, legacy systems, or internal APIs.
Connect to any REST API
Enhance automation with external services
Secure API authentication (OAuth 2.0, API Key, etc.)
Create reusable connectors for multiple flows
1️⃣ What Are Custom Connectors in Power Automate?
🔹 A custom connector is a wrapper around an API that allows Power Automate to communicate with it.
🔹 It supports RESTful APIs with JSON responses.
🔹 Developers define authentication, triggers, and actions for the connector.
🔹 Once created, a custom connector works like a built-in Power Automate connector.
Example: A company needs to integrate Power Automate with a legacy CRM system. Since there is no built-in connector, they develop a custom connector using the CRM’s REST API.
2️⃣ Steps to Create a Custom Connector in Power Automate
Step 1: Prepare the API
Before creating a custom connector, ensure the API meets these requirements:
✔️ REST API with HTTPS support
✔️ Returns JSON-formatted responses
✔️ Authentication (API Key, OAuth 2.0, or Basic Auth)
✔️ OpenAPI (Swagger) documentation (optional, but helpful)
Example: You want to integrate Power Automate with an internal HR system API that provides employee records in JSON format.
Step 2: Create a Custom Connector in Power Automate
1️⃣ Go to Power Automate
- Navigate to Power Automate > Data > Custom Connectors.
- Click + New custom connector and choose:
- Create from blank (manual setup).
- Import an OpenAPI file (if available).
- Use a Postman collection (if API is tested in Postman).
2️⃣ Define General Information
- Enter Connector Name.
- Add API base URL (e.g.,
https://api.example.com
). - Upload an icon for the connector.
3️⃣ Set Up Authentication
- Choose None, API Key, Basic Authentication, or OAuth 2.0.
- If using OAuth 2.0, provide:
- Client ID & Secret
- Authorization URL
- Token URL
Example: If using OAuth 2.0, configure it with an Azure App Registration for secure authentication.
Step 3: Define API Actions and Triggers
1️⃣ Go to the “Definition” tab
2️⃣ Click + New Action and provide:
- Summary: Short description of the action.
- Operation ID: Unique identifier (e.g.,
GetEmployee
). - Request URL: API endpoint (e.g.,
https://api.example.com/employees/{id}
). - Method:
GET
,POST
,PUT
, orDELETE
. - Headers and Query Parameters (if required).
- Response Format: Define expected JSON response schema.
Example: Creating an action called GetEmployee
that fetches an employee’s details using GET /employees/{id}
.
Step 4: Test the Custom Connector
1️⃣ Save and go to the “Test” tab.
2️⃣ Enter required parameters (e.g., API Key or OAuth token).
3️⃣ Click Test operation and check the response.
4️⃣ If successful, proceed to the next step; if not, debug API errors.
Example: If an API request fails, check the authentication headers or response format for issues.
Step 5: Use the Custom Connector in Power Automate
Once tested, the custom connector can be used in Power Automate, Power Apps, or Logic Apps.
1️⃣ Create a new Flow in Power Automate.
2️⃣ Add a trigger (e.g., “When an item is created in SharePoint”).
3️⃣ Select the Custom Connector as an action.
4️⃣ Provide required parameters (e.g., API Key or request body).
5️⃣ Save and run the flow to test automation.
Example: A custom connector fetches sales data from an external API and stores it in SharePoint when a new order is placed.
3️⃣ Best Practices for Custom Connectors
✔️ Use OpenAPI (Swagger) documentation – Makes API integration smoother.
✔️ Secure authentication (OAuth 2.0 preferred) – Avoid hardcoding credentials.
✔️ Test API calls before deployment – Ensure error handling is in place.
✔️ Use meaningful operation names – Helps users understand actions.
✔️ Apply retry logic – Handles API failures or rate limits gracefully.
✔️ Version control – Update API versions carefully to avoid breaking changes.
Example: A finance company ensures all API responses are encrypted before sending data through a custom connector.