In this article:

Send Daily KPI updates in Slack

May 14, 2024

This article will walk through how to automatically send daily KPI's that live in a Google spreadsheet to Slack.

This solution will use Lido, a new spreadsheet that lets you automate your work, to connect to your Google Sheets data and send messages in Slack on a schedule you set.

Let's get started!

1. Prepare your Google Sheet Data

For this example, we have a Google Spreadsheet that has some summary KPI data in some specific cells.

It is required that you have your data in a tabular format, with a row of column headers - even if its just one row of summary data.

A couple of additional formatting requirements: 

  1. Your column headers must be in the first row of your sheet - OR if not, be sure to select the specific cell range of just the headers and data when you get to that step below.
  2. Column headers cannot contain special characters, like quotes or brackets
  3. No empty columns or rows separating your spreadsheet data. Inside the table of data that you want to connect to Lido, make sure there are no things like empty, grouped, or hidden rows and columns, since these can cause problems. If Lido see's a blank row or column - it will stop the import there.

2. Connect your Google Sheet to Lido

We will use Lido, a new spreadsheet built to automate repetitive tasks, to connect to your Google Sheet and send out automated Slack messages. There is a free tier with paid plans as well. You can create a new account here:

Step 1. From the Lido Files page, click "New File"

Step 2. Click Connect Data and select Google Sheets.

Next, paste in your Google Sheet URL. If it's your first time connecting a Google Sheet to Lido, you'll need to authenticate into a Google account that has access to the sheet you're trying to connect.

Step 3: Select the specific range of KPI data in your spreadsheet.

For this example, we'll specify B4 through F5 so we grab just our KPI data, but include our header row as well. If your headers happen to be the top row of the sheet, you may not need to do this. Look at the Preview to make sure the correct data is showing.

Specify the cell range that includes your column headers and KPI data

Click Add Data.

Your Lido spreadsheet should now have connected data from your Google Sheet. It will look like this:

3. Add the SENDSLACK formula

We are now ready to add the formula to send the message to Slack. The formula is:

```=SENDSLACK(<sender-credential>, "slackchannel", "message", E5)```

Pick an empty cell that is not going to be overrun by other data (such as records that will be added to a table) and start typing =SENDSLACK.

Step 1: Add Slack Credential

Start typing the SENDSLACK formula in the cell. The first argument of the formula is your Slack credential. Click "Add Credential" and follow the prompt. This will give Lido the permission to send Slack messages on your behalf.

Add a Slack credential so Lido can send Slack messages on your behalf

A new tab will appear, where Lido App is requesting permission to access the workspace you set. Click Allow.

Lido requesting access to Slack

Step 2:  Add the Slack Channel name

Enclose this in double quotes. If you want to post to the #product channel, it would look like:

```=SENDSLACK(<sender-credential>,"product","Daily Signups: " & C5, D6)```

Step 3: Add the Slack message

Add the message that you would like to send through Slack. This can be a string such as "hello!", a cell reference such as C7, or any spreadsheet formula.

For our example, we will send a Slack message inline, with line returns (use <opt> + <Enter> or <alt> + <Enter> just as you would in Google Sheets to add a new line):

Formula with line returns to format a Slack message in the SENDSLACK formula.

4. Send a Test Slack message

If you haven't already sent a Slack test, choose "Run Action" in the cell menu where the SENDSLACK formula is. A Slack message will be sent to the channel you specify.

When the action runs successfully, you will get a notification in the Slack workspace!

7. Automate Sending to Slack

Now that you know how to manually send a Slack message based on data from your Google Sheet, if you want to automatically send a Slack message - do the following:

1. Right-click on the cell that has SENDSLACK in it and choose "Add cell automation"

2. Choose the interval that makes sense and click Save.

Now, at the interval you choose the following will happen:

  1. Lido will pull the latest data from Google Sheets
  2. LIdo will run the SENDSLACK action formula and a message will be send to Slack.

That's it!

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.
Get your copy of our free Google Sheets automation guide!
  • 27 pages of Google Sheets tips and tricks to save time
  • Covers pivot tables and other advanced topics
  • 100% free

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->