Skip to content
Create a Custom Slackbot for your Coda Doc
Share
Explore

Getting Started

Introduction
Slackbots and custom Slack apps are a popular and useful application of Slack’s API. Using a Slackbot, you can send custom messages to your Slack instance from a non-user:

image.png

image.png

By combining this functionality with Coda, you can create a robust ecosystem between your operating system of docs and your Slack workspace.

In this guide, we’ll walk through how to set up the lowest-lift version of this solution. This current tutorial is limited in scope (see “Caveats” below), so make sure to evaluate whether this approach will work for your organization’s needs.

Caveats
There are some important caveats to remember about the approach currently outlined in this doc.
These instructions will help you set up a single Slack app that can be installed into your workspace and paired with a pack in a Coda doc to send messages as a bot.
Users in your workspace will not need to log in to Slack in order to install this pack in a doc.
While you can add further functionality after creating the new pack for your workspace, the provided code only offers two action formulas:
Send message lets you send a message as the bot to a specified public channel. This action will not let you send to a specific user.
Reply to thread lets you reply to a thread in a channel given the parent message’s timestamp.
This code will not pull autocomplete options (for example, the names of Slack channels available to post to). You’ll need to look up the ID for each channel you’d like to send information to, or use the Coda Slack Pack to pull in the list of channels in your workspace to use as a lookup table.
You will need to hard-code your bot’s API token into the pack’s code. Since all members of a workspace can see/edit that workspace’s packs, keep this in mind when you decide how and when to share your Slackbot Pack.

Ready to go? Open the


Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.