web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / When an event is added...
Power Automate
Unanswered

When an event is added, updated or deleted (V3) "Bad Gatway" Error "Request failed. Try again later."

(0) ShareShare
ReportReport
Posted on by 137

We have a flow that uses the When an event is added, updated or deleted (V3) connector that points to a shared calendar.

 

The shared calendar receives thousands of invitations per day, and approximately every 3 to 4 weeks it generates a "Bad Gateway" error, with message "Request failed. Try again later.":

 

   "body": {
        "error": {
            "code": 502,
            "source": "flow-apim-unitedstates-002-westus-01.azure-apim.net",
            "clientRequestId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "message": "BadGateway",
            "innerError": {
                "status": 502,
                "message": "Request failed. Try again later.\r\nclientRequestId: xxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\nserviceRequestId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                "error": {
                    "message": "Request failed. Try again later."
                },
                "source": "office365-scus.azconn-scus-001.p.azurewebsites.net"
            }
        }
    }

 

Once this error occurs, all subsequent triggers fail until the connector is removed & recreated. The errors usually happen overnight and remain until somebody recreates the connector the next morning.  This causes us to miss out on thousands of updates from the calendar.  (The Analytics from our latest error show over 1000 errored triggers.)

 

We have noticed that prior to the first Bad Gateway error, the flow receives thousands of triggers within a very short timeframe (1 to 2 minutes.)  Usually these are ActionType = 'deleted'.  My assumption is that Outlook/Exchange is doing a purge of old data.

 

I believe the real problem is the flow trigger is overloaded and can't handle all the updates.

 

What can be done to prevent the Bad Gateway errors?

 

Can they be captured and at least send an email when an error occurs?

 

I have thought about using a Trigger Condition to exclude ActionType = 'deleted', but in the Settings the Split is Off, which allows multiple updates per trigger.  (This is necessary for other parts of the flow to work properly.)  

 

Can someone from Microsoft confirm what's actually happening?

 

Thank you

 

 

 

 

 

Categories:
I have the same question (0)
  • michalparal222 Profile Picture
    86 on at

    Hi @ericwhitley ,

     

    In case you would not need a immediate trigger when an anything happened to the calendar event, you could try get the logs from Admin center from admin logs, which can be accessed using HTTP.
    I use this pretty often, I just have not tried for calendar events yet. 

     

    Simple description

     

     

    1. Create an enterprise app in Entra
    2. Assign API permission
    3. Grant admin consent
    4. Generate client secret
    5. Using HTTP generate a access token
    6. Register feed/subscription to get the needed logs
    7. In the feed logs are stored in blobs, so need to get the URL of all blobs and then access then one by one.
    8. Then just read the info and use as you need 
    9. Also you might need to filter out some items using Filter array

     

    But you need to take into account that the blobs are created with some time delay (few hours). 

     

    I can elaborate on this one if it would suits your needs. 

  • ericwhitley Profile Picture
    137 on at

    Michal, thank you for the feedback but we need to get the invitations immediately.

     

    Our current flow works fine most of the time, it just fails every few weeks and I would like to know why and how to prevent that.

  • ericwhitley Profile Picture
    137 on at

    The flow stopped running again today during work hours with the same "Bad Gateway" error.  

     

    Prior to the error we received over 500 triggers to the flow within a few minutes. Almost all of them are ActionType = deleted.

     

    A few hours before the error we received another error, but this didn't cause the flow to stop running:  "Too many requests sent to the service. Try again later."

     

    This is new error information:

     

    {
        "statusCode": 429,
        "headers": {
            "Cache-Control": "no-store, no-cache",
            "Pragma": "no-cache",
            "Retry-After": "32",
            "Set-Cookie": "ARRAffinity=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;Path=/;HttpOnly;Secure;Domain=office365-scus.azconn-scus-001.p.azurewebsites.net,ARRAffinitySameSite=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;Path=/;HttpOnly;SameSite=None;Secure;Domain=office365-scus.azconn-scus-001.p.azurewebsites.net",
            "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
            "x-ms-request-id": "5a8a2f13-fd8e-46d7-a4e5-4cde0cd3fb9f",
            "X-Content-Type-Options": "nosniff",
            "X-Frame-Options": "DENY",
            "x-ms-environment-id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "Timing-Allow-Origin": "*",
            "x-ms-apihub-cached-response": "true",
            "x-ms-apihub-obo": "false",
            "Date": "Mon, 24 Jun 2024 20:53:02 GMT",
            "Content-Length": "370",
            "Content-Type": "application/json",
            "Expires": "-1"
        },
        "body": {
            "status": 429,
            "message": "Too many requests sent to the service. Try again later.\r\nclientRequestId: 941fee4b-3aa6-46d2-a936-12525087aea9\r\nserviceRequestId: 5a8a2f13-fd8e-46d7-a4e5-4cde0cd3fb9f",
            "error": {
                "message": "Too many requests sent to the service. Try again later."
            },
            "source": "office365-scus.azconn-scus-001.p.azurewebsites.net"
        }
    }
     
    I still believe the problem is the flow is overtaxed.  How can this be prevented?  What are some workarounds?
     
    Thanks

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard