Improve your AI-powered IoT development toolchain at "AI-Ready IoT" on June 24th

Blues Developers
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
Button IconHelp
Notehub StatusVisit our Forum
Button IconSign In
Sign In
Sign In
Docs Home
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
Notehub
Notehub Walkthrough
Notehub API Reference
Routing Tutorial
Host Firmware Updates
Host DFU Overview
Notecard Outboard Firmware Update
IAP Firmware Update
Notehub API Requests for DFU
Notecard API Requests for DFU
Environment Variables for DFU
Configuring a Slack Route
Configuring the RouteTesting the Route
Configuring an Amazon S3 Route
Configuring a Snowpipe Route
homechevron_rightDocschevron_rightNotehubchevron_rightConfiguring a Slack Route

Configuring a Slack Route

Notehub allows you to route data to Slack , making it easy to send chat messages for some or all of your events. Let's look at how it works.

note

To route events to Slack you must have admin access to a Slack channel, and have created a Slack app. If you haven't built a Slack app before, you can start a new one here .

Configuring the Route

To create a Slack route, open your Notehub project, head to the Routes tab, click the Create Route button, and then find the Slack option. Click Select to get started.

Slack route option

On the next screen you'll be asked to provide a variety of values to configure your route.

  1. The Route name controls the name of your route within Notehub.

  2. The Slack Route Type lets you choose between two different ways to interact with the Slack API.

    • (Recommended) A type of Webhook is the easiest way to interact with Slack. If you choose this option you'll create a webhook URL that can post to a single Slack channel.

    • A type of Bearer uses OAuth authentication to allow your Slack app to send messages. With this option you'll need to generate an OAuth token and add permissions to your app, but you'll be able to send Slack messages to different channels.

Webhook Routes

Complete these steps if you're using a Slack Route Type of Webhook.

  1. To find your WebhookURL, select your Slack app on api.slack.com/apps , select Incoming Webhooks in the menu, and enable the Activate Incoming Webhooks switch.

  2. After you activate incoming webhooks, scroll down the same page and find the Add New Webhook to Workspace button. Click that button and complete the subsequent steps to generate a Webhook URL. Copy that URL and paste it in the WebhookURL on your Notehub route.

    Webhook URL location

  3. Skip ahead to these instructions.

Bearer Routes

Complete these steps if you're using a Slack Route Type of Bearer.

  1. Provide the Channel ID you would like to send your messages to. The easiest way to get your channel ID is to right click on a channel within Slack, select Copy, and then Copy Link. The channel is in the URL you just copied, and is in the format CXXXXXXXXXX.

    Slack Channel ID location

  2. To generate a Bearer Token, select your Slack app and click the OAuth & Permissions menu. Scroll down and find the OAuth Tokens for Your Workspace heading. Click the Install to Workspace button and complete the subsequent steps. When you're done use the Copy button to get the token you need for your Notehub route.

    OAuth token location

In order to successfully use your token to post to a channel you'll need to complete a few additional steps.

  1. While still on the same OAuth & Permissions settings page, scroll down to the Scopes section, click the Add an OAuth Scope button, and add the chat:write permission. You'll likely be prompted to restart your app for the permission change to take effect.

  2. In your Slack client, you need to invite your app to every channel you intend to send messages to. The easiest way to do this is with the /invite command.

    Inviting an app to Slack

All Route Types

  1. For Message Type you can select either Text or Blocks. Selecting Text allows you to provide simple strings. Use Blocks if you need to generate richer Slack messages, and use the Slack Block Kit Builder to generate the syntax you need.
note

You can use placeholder variables to include event-specific information in your messages. If you're building a Slack route for the first time, try using [.body] as Text, as it sends your Note's body as your message.

  1. Scroll to the Filters section, set the Notefiles dropdown to Selected Notefiles, and select the Notefile you want to use this route for.

    route filters

  2. When you're all set, click the Create Route button to save your new route.

Testing the Route

With the route created you're now ready to test it out. The easiest way to make sure everything is working is by sending a Note using the Notecard's In-Browser Terminal.

  1. Use the In-Browser Terminal to connect to your Notecard via USB. (If you're unsure how to do this check out the Notecard quickstart.)

    Notehub.io: Web Console Button

  2. Once connected, associate your Notecard with a Notehub project (if it isn't already).

    {
      "req": "hub.set",
      "product": "com.example.yourname:yourproject"
    }
  3. Next, run the command below to queue a Note onto the data.qo Notefile. You may wish to change the file and body of your command, depending on how you configured your route.

    {
      "req": "note.add",
      "file": "data.qo",
      "body": {
        "temp": 22
      }
    }
  4. Finally, run the hub.sync request to send this data to your Notehub project.

    {
      "req": "hub.sync"
    }

When the data reaches your Notehub project, Notehub will automatically route your sensor data to Slack. And if all goes well, you should see your message appear in your channel. For example, if you use a Text of [.body], you should see a message that looks like this.

Data within Slack

Can we improve this page? Send us feedback
© 2025 Blues Inc.
© 2025 Blues Inc.
TermsPrivacy
Notecard Disconnected
Having trouble connecting?

Try changing your USB cable as some cables do not support transferring data. If that does not solve your problem, contact us at support@blues.com and we will get you set up with another tool to communicate with the Notecard.

Advanced Usage

The help command gives more info.

Connect a Notecard
Use USB to connect and start issuing requests from the browser.
Try Notecard Simulator
Experiment with Notecard's latest firmware on a Simulator assigned to your free Notehub account.

Don't have an account? Sign up