In this article:

Send Daily KPI updates in Slack

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: https://www.lido.app/go/signup

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!

Automate repetitive tasks with Lido

Save hours on repetitive and tedious work. Lido is a new spreadsheet that connects your spreadsheets, forms, PDFs, and email inbox.

Trigger
Action
Select trigger
When a cell value in Google Sheets changes
Check Google Sheets for today's date
When a new row is added to Google Sheets
On new Google Form submission
Send me a daily reminder
On new Typeform submission
When a cell value in database changes
Check database for today's date
When a new row is added in database
When a new HubSpot customer is created
Select action
ADDCALENDAREVENT
Creates a one- or multiple-day calendar event with optional attendees
ADDHUBSPOT
Adds an object to Hubspot
ADDSLACKCHANNEL
Create a Slack channel, and optionally add a topic or members
CALLURL
Makes any HTTP request
CREATEGOOGLEDOC
Replaces [@column_name] values in a Google Doc with the corresponding table row's values
CREATEPDF
Replaces [@column_name] values in a Google Doc with the corresponding table row's values, then export it as a PDF
FETCH
Makes any HTTP request and returns the response
INSERTROWS
Inserts given array below defined values in given worksheet
SENDGMAIL
Sends an email using your Google account
SENDOUTLOOK
Sends an email using your Microsoft Outlook account
SENDSLACK
Sends a Slack message
SENDSMS
Sends an SMS message using your Twilio account
UPDATECELL
Updates cells with given values
UPDATEHUBSPOT
Updates a property of a Hubspot object
Trigger is required
Action is required
Get started