You can use the Slack pack to send messages directly from your Coda doc with the click of a button. This makes managing tasks and your team even easier. Before you begin, install the Slack pack to your Coda doc. Visit our Using the Slack pack article for instructions on how to install.

Getting started

Once you've authenticated with the Slack pack, you can send messages directly from inside your doc.

To do so, insert a button in the canvas or within a column (column type 'button'), and select 'Slack' > 'Post message' as the button type. Then fill out each field in the button configuration.

To point the button to a slack channel, enter # and the channel name in the field.

To point to a specific person, you can use their email address directly in the field. If you have a people column in the same table, you can point the field to "[Person].[Email]" as in the example below.

One thing to note: the Slack message will come from whichever Slack account is listed in the Account field of the button. If you're sending a message to yourself from your own Slack account, you won't receive any notification in Slack.

Send a Slack message to multiple people

Imagine you have a table that contains a list of tasks. In this table, you have the following columns for each task listed: Task, Assigned, and Due date. We can achieve this with a button press using the Slack pack and formulas in Coda.

image.png

To send a Slack message to all members mentioned in the Assigned column (assuming this is a People column format), we’ll take advantage of the email addresses associated with every Coda profile to send notifications directly to each assignees’ DMs.

To begin, add a new button to the table. Then, click the f button to bypass the formula builder and add your own custom formula. If you opt to copy & paste the formula below, be sure to update inputs like the User's private Slack account authentication key and any column references that don't exactly match up.

thisRow.Assigned.Email

.FormulaMap(

RunActions(

Slack::PostMessage(

[User's private Slack account],

"Your assigned task, " + thisRow.Task + ", is due on " + thisRow.[Due date] +

".",

CurrentValue

)

)

)

This will send a direct message to each Assignee stating “Your assigned task, ____, is due on _____.”

image.png

If you want your notifications to be more complex than this without sacrificing readability, try using the Format() formula to create your message template instead of the Concatenate() or + symbol formula used in our example.

Slack text styling and @-mentioning

Using a few simple tricks, you can apply some styling to your Slack messages and even @-mention particular teammates to grab their attention. Check out this helpful published doc from one of our very own to learn more!

Hyperlinks

Sending hyperlinks in your Slack messages takes a bit of formatting. You'll need to use the < url | title > syntax. For instance: < https://coda.io/docs | Coda Doc List>. You can read more about formatting Slack messages here.


Related Articles

  1. Using the Slack pack

  2. How do I use FormulaMap()?

  3. People column format

Did this answer your question?