Overview
The Connector SDK is a powerful tool that allows you to create custom connectors for applications not directly supported by UnifyApps pre-built connectors library. It provides a framework for defining authentication methods, actions, and data schemas, enabling seamless integration with various APIs and services.
This article will guide you through the process of creating and configuring a custom connector using the Connector SDK.
Create a Custom Connector
Navigate to Connector SDK
The Connector SDK can be accessed through the platform tools.
Go to the platform tools and Click on "
Connector SDK
".You will see a list of all custom connectors created in the environment.
Create a New Custom Connector
Creating a new custom connector involves defining its basic properties. This step sets the foundation for your connector's identity and purpose.
Click on "
New Custom Connector
" in the top right corner.Enter the Connector Name (e.g., "Asana Custom Connector").
Provide a description for better understanding.
Enter the base URL (the consistent part or root of your website's address).
Click the "
Create
" button.
Configure Authentication
Defining how your connector will authenticate with the target application involves:
In the Authentication tab, click on "
New Authentication
".Provide a name for the authentication method (e.g., "API Key").
Define the authentication type for the API request (e.g., Access Token).
Click the "
Create
" button.
Set Up Input Schema
The input schema defines what information is required from the user for authentication.
In the Input tab, define the input required from the user to authenticate the API request.
You can set up the input schema through "
Setup using JSON
" or add fields manually.Create a field (e.g., "Access Token") with the appropriate field type (e.g., String).
Configure Connection Request
The connection request specifies how the authentication information is sent to the API.
In the Connection Request tab, pass the Access Token in the header.
Provide the key for the header (e.g., "Authorization").
Set the value for the header (e.g., "Bearer {{access_token}}").
Click the "
Save
" button to establish authentication.
Create an Action
Create a New Action
Each action represents a specific operation your connector can perform. This step allows you to define and name these operations.
Navigate to the Actions tab and click on “
New Action
”Provide a name for the action (e.g., "Get Task Details").
Add a description (e.g., "Get task details using task ID in ASANA").
Click the "
Create
" button.
Configure Action Input
Action inputs define what necessary data from the user is needed to perform the action..
Create fields in the input schema as required (e.g., "Task ID" as a string).
Define HTTP Request
The HTTP request specifies how your connector interacts with the API. This step is crucial for ensuring your action communicates correctly with the target application.
Define the schema of the API manually or import a curl command.
If you need to Map dynamic values that are being fetched from input as path or query parameter or as a header, then use double curly braces (e.g., {{task_id}}).
Define Output Schema
The output schema defines what data your action will return.
Click on the Output tab.
Set up fields manually or use "
Setup using JSON
" with a sample output JSON schema.Click the "
Save
" button.
Deploy and Publish
Deploying and publishing makes your connector available for use. This final step brings your custom connector to life within the Unifyapps ecosystem.
Click the "
Deploy Action
" toggle to deploy the action.Click the "
Publish
" button to make the custom connector available in the connector list.
Test the Custom Connector
Custom connectors are exposed in automation builder as soon as they are published , users have the capability to control the access of specific connector or connector actions through platform roles. It is suggested that you test a newly created action in the automation builder by following below steps.
Create a new automation (e.g., "Get Task Details from Asana").
Select the trigger type (e.g., webhook).
Search for the custom connector and select the action that you have created.
Create a new connection by selecting the authentication type and provide the authentication information.
Provide the required inputs (e.g., Task ID).
Save the configuration.
Navigate to the Test tab and click "
Start New Test
".Click the "
Run Test
" button to execute the automation.View the input and output of your custom connector in the right pane.
By following these steps, you can successfully create, configure, and test a custom connector using the Connector SDK, allowing you to integrate with applications not directly supported by Unifyapps's pre-built connectors. The Connector SDK empowers you to extend the capabilities of your Unifyapps environment, enabling seamless connections with a wide range of APIs and services.