Power Automate · Power Apps calling a flow
ResponseTimeout (504 BadGateway) when Power Apps runs a flow
ResponseTimeout with a 504 BadGateway when a Power App runs a flow means the synchronous flow run took longer than the 120-second limit. Find the slow runs and optimize the actions so the flow responds within 120 seconds.
VerifiedLast verified
01Error text
ResponseTimeout
BadGateway
The server did not receive a timely response from the upstream server. Request tracking id '<some_tracking_id>'.02Likely causes
- A synchronous flow run called from Power Apps exceeded the 120-second limit.
03How to fix it
- Find the slow runs in the flow's run history.
- Optimize the actions so the flow finishes within 120 seconds.
04Fix it with AI
Copy this prompt into Claude Code, ChatGPT or any AI assistant. It already holds the error, the likely causes and the fix steps, so the assistant starts from what is known instead of guessing.
I'm getting this error in Microsoft Power Automate (Power Apps calling a flow):
ResponseTimeout
BadGateway
The server did not receive a timely response from the upstream server. Request tracking id '<some_tracking_id>'.
What it usually means: ResponseTimeout with a 504 BadGateway when a Power App runs a flow means the synchronous flow run took longer than the 120-second limit. Find the slow runs and optimize the actions so the flow responds within 120 seconds.
Likely causes:
- A synchronous flow run called from Power Apps exceeded the 120-second limit.
Fix steps that usually work:
1. Find the slow runs in the flow's run history.
2. Optimize the actions so the flow finishes within 120 seconds.
Help me fix it. If you can read my project files, find where this error comes from. If not, ask me for what you need (the failing step, its input, the connection or config). Check the likely causes one by one, tell me which one it is and why, then give me the exact change to make. Do not change anything in production. Reference: https://ipaaserrors.com/power-automate/power-apps-flow-responsetimeoutNothing is sent anywhere from this page. Read what the assistant suggests before you apply it.
05Official documentation
→Related errors
- 502 Bad GatewayA 502 on a Power Automate action means the connection between Power Automate and the target service failed. It is usually transient, so enable retry on the action and check network or firewall settings if it keeps happening.
- Flow run timed out.This Power Automate message means the flow exceeded the 30-day maximum duration. Redesign long-running flows by using a child flow for the long-running part, or split the work into multiple flows with a status flag.
Test every fix in a non-production environment before you apply it to production. See how entries are verified.
More for Power Automate work:Open Power Automate jobsPower Automate pay estimates