Skip to main content

Notifications

Power Automate - Connector Development
Unanswered

Fails only in in a flow

(0) ShareShare
ReportReport
Posted on by 96

I have written a custom connector to update an object using a vendor's REST API.  When I test the custom connector using the test facility Microsoft provides within the custom connector itself, it works perfectly.  However, when I try to use the exact same data within a flow, the flow fails and the vendor's API returns a 500 unknown error.

I have been trying to debug this for several weeks.  I have already tried creating a duplicate of the connector and sending the output to Postman.  It looks perfect.  The headers are perfect.  I've tried sending the data to the vendor's API via the HTTP connector. That works fine as well.  The only thing that does not work is when you try to use the custom connector in a flow.

 

The vendor does not log requests and refuses to look into this on their side.  But clearly,  since the request works when using the HTTP connector and in the test facility within the connector itself, the problem is not on the vendor's side.

 

I'm wondering if anyone has any ideas.  Because it works perfectly in Test and not in a flow using the same data, I really don't know where to go from here.

 

I personally believe now (after weeks of looking at this bug), that this is a bug in Power Automate.

  • HaroldA Profile Picture
    HaroldA 96 on at
    Re: Fails only in in a flow

    Sure, here's a picture of the flow:

    • Updated Pick Ticket creates the JSON that represents the updated object.  It is static.  The data in the JSON have previously been used successfully to test the custom connector against the live API service.

    • HTTP to SOS Inventory passes the JSON to the live API using the HTTP connector.  That succeeds as well.

    • HTTP to webhook.site passes the JSON to webhook.site so I can examine the data that was passed to the live API.

    • Update Pick ticket 2 is a duplicate version of the custom connector, but pointing to webhook.site.  The data sent to webhook.site is identical with the previous step, HTTP to webhook.site

    • Finally Update Pick ticket passes the exact same data to the live connector as was passed in the previous step, but against the live API. This fails.

      Since testing the custom connector succeeds and yet fails in a flow  I'm going to try Azure Logic Apps and see if it is more reliable.  Update:  It works in Azure Logic Apps.  My guess is that Power Automate is sending too many headers to the API, as @Rahber has said.  Others have reported this problem.  I suppose I could strip out the unnecessary headers with APIM....

    Harold_Anderson_0-1647786182735.png

     

  • Rahber Profile Picture
    Rahber 1,935 on at
    Re: Fails only in in a flow

    The reasons for 500 could be a extra headers/ip blocking/auth issues/how your flow is triggering in run/  however since its a very specific case i would suggest you to debug using Support. 

     

    Can you try posting your complete flow? Have you tried using only the custom connector action?

     

    Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

    Thanks,
    Rahber

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard

Featured topics