Google Apps Script Slack Integration: Send Messages From Sheets (Webhook Tutorial)
Troubleshooting Common Issues
"Exception: Request failed" with no details You forgot muteHttpExceptions: true. Add it to your fetch options.
Script runs but no message appears in Slack Check that you're using an installable trigger, not a simple trigger. Simple triggers can't call external services. Also verify the webhook URL hasn't been revoked.
Messages show up with no formatting If you're using Block Kit, make sure your blocks array is at the top level of the payload, not nested inside text. And include the text field separately as a fallback.
"Exceeded maximum execution time" Apps Script has a 6-minute execution limit. If you're processing thousands of rows and sending messages, batch your data and send fewer, larger messages. Or split the work across multiple triggered runs.
429 Too Many Requests You're sending more than 1 message per second to the same channel. Add a Utilities.sleep(1100) between sends if you must send multiple messages, or (better) aggregate into one message.
Once this Google Apps Script Slack integration is running, you can layer on more complexity. Add conditional logic for different channels based on data values. Build approval workflows where a Slack button triggers an Apps Script callback. Combine webhook notifications with email alerts as a fallback. The notification layer you built here is the foundation for all of it.