Google-sheets – How to post a value from Google Spreadsheets to Slack twice a day at preset times

google sheetsslack

I have a Google spreadsheet that I constantly update and I'd like to set certain times of the day, say 8am and 4pm, to automatically read the value in certain cells and post them to a channel on Slack? Is this possible? If so, how would I go about setting up this integration?

I've already seen integrations to update a channel every time a certain row is updated, but that would be too noisy. I can't seem to find a way to schedule checking a value in a cell and posting that to Slack only at certain times of the day.

Best Answer

I think the simplest path is to set an incoming webhook and trigger it with Cron. I believe you could do it all in Google Scripts if you don't mind a little lack of control with the time of the trigger (roughly 1 hr spans).