PL400 : Design custom connectors

Data is playing an important role in the business world which encourages the use of software application. Nowadays, software is designed according to the needs of businesses, resulting in connectivity challenges between different types of software. Software connectors perform control and transfer of data between components. Connectors can also provide services, such as persistence, invocation, messaging, and transactions, that are largely independent of the functionality of the interacting components. Microsoft introduced Power Platform which provides a variety of features to the business world along with a low-code/no-code development platform and Connectors are one of them. These connectors cover a wide range of SaaS providers, including Dynamics 365, Office 365, Dropbox, Salesforce and more.

A connector is a proxy or a wrapper around an API that allows the underlying service to talk to Microsoft Power Automate, Microsoft Power Apps, and Azure Logic Apps. It provides a way for users to connect their accounts and leverage a set of pre-built actions and triggers to build their apps and workflows.

Our large ecosystem of software as a service (SaaS) connectors enable you to connect apps, data, and devices in the cloud. Examples of popular connectors include Salesforce, Office 365, Twitter, Dropbox, Google services, and more.

.Connectors are categorized by Standard / Premium.

Connector Components:

There are two components of connector.

Trigger : can notify your app when specific events occur
Action: Actions are operations that read, change or manipulate data or variables..

There are two types of triggers:

Polling Triggers—These triggers call your service at a specified frequency to check for new data. When new data is available, it causes a new run of your workflow instance with the data as input.

Push Triggers—These triggers listen for data on an endpoint, that is, they wait for an event to occur. The occurrence of this event causes a new run of your workflow instance. 

Triggers are not supported in Power Apps.

Why do we need customer connector, HTTP API can call directly?

As well known power platform is low/no code platform and it widely encourages business users or citizen developer to use it. Microsoft provides simple to link external APIs, rather than using complex technical calls (Simplicity). Also, Power Apps can not make HTTP calls directly, so it needs to use Power Automate, in this scenario, the custom connector can avoid unnecessary overhead and be used across multiple different apps (Reusability) can be done. Finally, custom connectors can be easily monitored in the Power Platform admin center ((better logging/Analytics).

Custom connectors:

Custom connectors are defined in the context of an environment and are only available to apps and workflows within that environment. Connectors make triggers and actions available that can be used by the apps and workflows. Triggers are used by Power Automate to start the execution of the workflow. Actions are used by apps and workflows to perform a defined set of actions during execution.

Lifecycle:


We can create custom connectors using three different approaches:
  1. Using a blank custom connector
  2. From an OpenAPI definition
  3. From a Postman collection


Custom Connector Architecture:

Generally, architecture refers to all the components of a system and how they interact with each other, the environment in which they operate, and the principles used to design applications. The communication between the custom connector and the RESTful API is bi-directional, so the RESTful API receives a request from the custom connector, and will respond back, and then send the custom connector information back to Power Apps or Power Automate. The reason for this is that the custom connector needs to understand all the inputs and outputs in order to create the appropriate trigger/action card within the designer. This approach also allows you to do simple mapping when you transfer data from one to the other. Connector ID provides information about the host, provides information about the path of operation use, Connection ID provides information about the credentials to be used, we can have a connector that is authenticated anonymously , so we don't need to provide any credentials to be authenticated, but we still need a connection. The custom connector sits in a hosting environment, where some interactions occur when Power Apps calls to perform certain operations.


Components of Custom Connectors:



Information

In this section, we provide the general information regarding our connector alike title, version, schema, description base path and security definition.

Actions:

here, we provide the API end points and its methods with operation Id.

Triggers:

Connectors provide triggers that can notify your app when specific events occur

References:

Consolidate repetitive inputs/outputs into definitions
shared between actions and triggers
Map to serializable (JSON) objects in API

Policies:

Set of pre-defined templates for user-configurable runtime behavior changes.

Security in the Custom Connectors:

Use one of these standard authentication methods for your APIs and connectors (Azure Active Directory is recommended):

  1. Generic OAuth 2.0
  2. OAuth 2.0 for specific services, including Azure Active Directory (Azure AD), Dropbox, GitHub, and SalesForce
  3. Basic authentication
  4. API Key

Thanks for below links:

https://docs.microsoft.com/en-us/connectors/connectors
https://docs.microsoft.com/en-us/connectors/custom-connectors/
https://www.youtube.com/watch?v=b4aJdQrmTsQ

Comments

Popular posts from this blog

Exploring the Differences: Managed vs. Unmanaged Solutions in Dynamics CRM/Dataverse

PCF vs. Web Resources: Choosing the Right Extensibility Tool for Dataverse

Effective Strategies for Debugging Plugins in Dynamics CRM