r/GoogleAppsScript • u/Small-Position4482 • Feb 23 '26
Question Google apps script pushes slack app button press in timeout.
Hi,
i'm not sure if this is the place to ask this, but I'm building a Food ordering reminder app as a fun side project for my colleagues. To remind them to order lunch and dinner at the office and to be able to order this from within slack. (not to go to another location as it gets forgotten and also to help my lovely kitchen team colleagues in the process).
Every order should add the order to a google sheet (hence the google apps script.)
(google sheets are necessary to also calculate cost...)
I've tried so many arrangements, but I keep getting a 3s timeout in slack. Whatever changes I do.
I'm hitting Slack’s 3-second acknowledgement rule for interactive components.
When a user clicks a button, Slack expects your endpoint to return an HTTP 200 OK within 3 seconds — otherwise Slack shows:
I suppose the biggest issues are in these functions:
handleButtonClick()
openOrderModal()
getMenu()
SpreadsheetApp calls
UrlFetchApp.fetch()
I would be stoked if someone could guide me in the right direction.
You can find the script here.
But would understand if this is too much to ask.
Thanks in advance,
Dries
3
u/zmandel Feb 24 '26
3 seconds is not a realistic time for apps script. it tends to be slow specially when its not "warm".
try writing a trivial, empty handler and time it, even empty it might go over the 3s.
2
u/WicketTheQuerent Feb 23 '26
The link requires people to ask for access. This discourages me and others from looking.
Please consider making a version that you can share with anyone with the link as viewers.