cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lim_w
New Member

Flow stopped working after a year - Outlook Bad Gateway 504 Request Failed

So my flow has been working daily fine for over a year and has been failing for a week with the GatewayTimeout BadGateway 504 Request Failed Try again later response.

 

The flow runs on a scheduled trigger and gets emails (v2) based on criteria in the inbox folder; saves the attachments to sharepoint; marks email as read and then moves the email to a processed folder.

Recreating it with get emails v3 has failed, recreating it with another users login in the outlook connector has failed. Runs at different times don't work. I have also recreated the get email criteria as $searchQuery and it still fails.

 

I found a minor work around in that if I switch the toggle the 'Fetch Only Unread Messages' to 'Yes' instead of 'No' the flow will work.  If I switch it back to 'No' the timeout returns. 

 

Any idea on root cause? Is there an issue with the unread emails only toggle?

1 ACCEPTED SOLUTION

Accepted Solutions
lim_w
New Member

Well I've managed to stumble upon my own solution which can apply to any connector that suddenly starts giving a bad gateway timeout.  Presumably as my inbox got bigger over years the search for emails eventually hit the default timeout - what ever that was.
Each connector has a timeout duration that can be adjusted as below using:
   ellipsis ... > settings > Timeout as PTnS (ie Period Time n Seconds, i set it to 30 seconds ie PT30S, can also use PnYnMnDTnHnMnS to set longer year month day hour minute second durations)
The flow now runs without fail.  This solution can probably be extended when sharepoint lists get too long etc

lim_w_0-1614832842525.png

 

View solution in original post

2 REPLIES 2
jinivthakkar
Memorable Member
Memorable Member

@lim_w its really strange, why don't you save your existing flow with another name and then try running the new flow.

 

--------------------------------------------------------------------------------

If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

lim_w
New Member

Well I've managed to stumble upon my own solution which can apply to any connector that suddenly starts giving a bad gateway timeout.  Presumably as my inbox got bigger over years the search for emails eventually hit the default timeout - what ever that was.
Each connector has a timeout duration that can be adjusted as below using:
   ellipsis ... > settings > Timeout as PTnS (ie Period Time n Seconds, i set it to 30 seconds ie PT30S, can also use PnYnMnDTnHnMnS to set longer year month day hour minute second durations)
The flow now runs without fail.  This solution can probably be extended when sharepoint lists get too long etc

lim_w_0-1614832842525.png

 

View solution in original post

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Automate User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (36,954)