Hello @MrUnfreeze ,
What you need to do is what’s called a “setTimout”. We don’t have a native block for this but it’s just 2 one lines of Javascript. Let me break it down for you.
The workflow would look like this:
First you initialize a boolean variable that you can call `show_slow_request_message`
Then you add this JS Block (replace the `80f47088-f9b9-4a3a-b4ce-45ce814acc37` with the ID of your variable, I’ll explain in the video below how to find it):
wwLib.getFrontWindow().requestTimer = setTimeout(() => {
wwLib.wwVariable.updateValue('80f47088-f9b9-4a3a-b4ce-45ce814acc37', true);
}, 150000);
This Javascript will create a timer that will update the variable to TRUE in 150 secondes.
Then you add a Try/Catch branch. Here, the idea is to use the finally branch. Finally branch is super usefull for this usecase because this is where we will clear the timer when the request succeeds or fails.
Here is the code to clear the timer:
if (wwLib.getFrontWindow().requestTimer) {
clearTimeout(window.requestTimer);
}
You can also copy this code below and then “Paste workflow” to get started.
{"weweb":true,"type":"workflow","data":{"icon":"16/cursor","name":"Request possibly too long","type":"front","index":0,"actions":{"26e9207c-ea69-433f-8d4e-d1f7ce00b11a":{"id":"26e9207c-ea69-433f-8d4e-d1f7ce00b11a","code":"if (wwLib.getFrontWindow().requestTimer) {\n clearTimeout(wwLib.getFrontWindow().requestTimer);\n}","name":"Clear timeout timer","next":null,"type":"custom-js","__wwdescription":"<p>Clear the timeout to prevent the slow request message from showing if request completes in time</p>"},"5ee5f63f-7c18-4cfe-a4fb-f7dabce06e45":{"id":"5ee5f63f-7c18-4cfe-a4fb-f7dabce06e45","args":{"url":"https://api.spacexdata.com/v5/launches/latest","auth":{"type":null},"mode":"cors","cache":"default","retry":{"type":"linear"},"throw":true,"method":"GET","priority":"auto","keepAlive":false,"credentials":"same-origin"},"name":"HTTP Request - SpaceX Latest Launch","next":null,"type":"http-request/http-request","__wwdescription":"<p>Fetch latest SpaceX launch data</p>"},"641fa257-55d0-434a-a4de-d951de9194a0":{"id":"641fa257-55d0-434a-a4de-d951de9194a0","name":"Initialize timeout flag to false","next":"a007779d-6a66-4b00-b192-e4d34cded14a","type":"update-variable","varId":"80f47088-f9b9-4a3a-b4ce-45ce814acc37","varValue":false,"__wwdescription":"<p>Reset the show_slow_request_message variable to false at the start of the workflow</p>"},"73ef28c1-b646-4fe3-93f6-5ce8c098f116":{"id":"73ef28c1-b646-4fe3-93f6-5ce8c098f116","name":"Try/Catch - HTTP Request with Cleanup","next":null,"type":"trycatch","catch":false,"finally":true,"branches":[{"id":"a928fc8c-96ee-44f6-80d3-17d4c6ca3884","value":"try"},{"id":"26e9207c-ea69-433f-8d4e-d1f7ce00b11a","value":"finally"}],"__wwdescription":"<p>Wrap HTTP request in try-catch with guaranteed cleanup</p>"},"a007779d-6a66-4b00-b192-e4d34cded14a":{"id":"a007779d-6a66-4b00-b192-e4d34cded14a","code":"wwLib.getFrontWindow().requestTimer = setTimeout(() => {\n wwLib.wwVariable.updateValue('80f47088-f9b9-4a3a-b4ce-45ce814acc37', true);\n}, 15000);","name":"Start 150s timeout timer","next":"73ef28c1-b646-4fe3-93f6-5ce8c098f116","type":"custom-js","__wwdescription":"<p>Set global timer that updates variable after 150 seconds if request still pending</p>"},"a928fc8c-96ee-44f6-80d3-17d4c6ca3884":{"id":"a928fc8c-96ee-44f6-80d3-17d4c6ca3884","type":"wait","next":"5ee5f63f-7c18-4cfe-a4fb-f7dabce06e45","__wwdescription":"","value":16000}},"trigger":"click","version":2,"isSearched":false,"description":"On click","firstAction":"641fa257-55d0-434a-a4de-d951de9194a0"},"metadata":{},"timestamp":"2026-04-20T10:51:29.986Z"}
More details in this video.
I hope that helps!