cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Guillaume_G
Advocate I
Advocate I

Custom connector Vs Power Automate Flow

Hello,

 

There is an API which I use with a Power Apps application. I authenticate (via basic authentication), retrieve an access token which expires every hour, which then needs to be passed as the bearer token in the authorization header in all subsequent requests (usual OAuth 2.0 cycle).

 

I have created two ways to access the API (for comparison purposes):

I have been able to call the API by using a Power Automate flow which is triggered from the Power Apps application.

I have also created a custom connector, which I use within my Power Apps app, to call the API .

Both methods enable me to make the same API requests.

 

Given the authentication scenario explained above, I often have to make one call to the API to authenticate/refresh the token and another call to request some data. I either do this by executing a child flow from my main Power Automate flow or, if I use the custom connector, I invoke two custom connector actions from within the app.

 

Bearing this in mind, is there any best practice which would recommend the use of one method over the other (custom connector or Power Automate flow)? Also, in terms of performance, is one method advised over the other one?

 

Thanks in advance,

Guillaume. 

1 ACCEPTED SOLUTION

Accepted Solutions
Syndicate_Admin
Administrator
Administrator

Whatever method works best for is the one you should choose. Having said that, my recommendation would be to use the custom connector route since it involves fewer stacks of applications, therefore should be just a tiny bit faster theoretically. Moreover, you can extend the custom connector and add more functionalities around the API. If you build a flow you are essentially building the custom connector using a bunch of HTTP calls stringed together (assuming that what you did), which isn't a module that represents your API.

 

Let me emphasize this one more time: you should choose a method that works best for you, since you know you use case and APIs better.

 

Hope this helps.

If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE 👍.

View solution in original post

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Whatever method works best for is the one you should choose. Having said that, my recommendation would be to use the custom connector route since it involves fewer stacks of applications, therefore should be just a tiny bit faster theoretically. Moreover, you can extend the custom connector and add more functionalities around the API. If you build a flow you are essentially building the custom connector using a bunch of HTTP calls stringed together (assuming that what you did), which isn't a module that represents your API.

 

Let me emphasize this one more time: you should choose a method that works best for you, since you know you use case and APIs better.

 

Hope this helps.

If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE 👍.

Thanks for taking the time to respond. I will follow your advice and we will assess which method works best for our use cases. 

 

Thanks,
Guillaume.

Greetings...how can you dynamically update an access token in a Custom Connector? When I enter "Authorization:" as the entity name, I get "Authorization head is not allowed. Use 'API Key' ...".

 

That's fine and well when it's an actual API key. When it's a new access token I have to retrieve at the start of a call, how exactly to I pass that token in a Custom Connector?

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,443)