Widgelix
  • Introduction
  • Get Started
    • Device Types
      • Repository
      • Create from scratch
    • Devices
      • Dashboard
      • History
      • Downlinks
      • Events
      • Settings
    • Global Map
    • Widgets
      • Gauge
      • Battery
      • Map
      • Chart
      • Digital
      • Level
      • Header
      • Image
      • Boolean
      • Scatter Plot
      • Math
      • Floor Plan
      • Asset Map
      • Heat Map
      • Log Chart
      • Downlink Button
      • Sankey
      • Report
      • Table
    • Organization
    • Global Dashboard
    • Rule Engine
  • Connectivity Integrations
    • Introduction
    • Options
      • GreenMesh LoRaWAN
      • Actility ThingPark
      • The Things Stack
      • Helium
      • Melita.io
      • LORIOT
      • Zenner
      • ChirpStack
      • Milesight
      • Senet
      • Sensoterra
      • Loxone
      • Sigfox
      • Webhook
  • Rule Engine
    • Introduction
      • Create Rule
      • IF Block
      • IS Block
      • THEN Block
      • Execution Options
    • Comparison Equations
    • Types
      • Compare with constant
      • Compare with device measurement
      • Geofences
  • Notifications
    • Introduction
    • Types
      • Slack
      • Discord
      • Email
      • SMS
  • Useful Tips
    • List of tips
  • Device Repository
    • Supported Devices
Powered by GitBook
On this page
  • Sending messages using incoming webhooks
  • Create a Slack app (if you don't have one already)
  • Enable incoming webhooks
  • Create an incoming webhook
  • Using webhook URL in you Widgelix's Rule
  1. Notifications
  2. Types

Slack

PreviousTypesNextDiscord

Last updated 6 months ago

Sending messages using incoming webhooks

Incoming webhooks are a way to post messages from Widgelix into Slack. Creating an incoming webhook gives you a unique URL to which you send your notifications. You can use all the usual to make the messages stand out.

The setup is straightforward - you create a Slack App and then use it to generate a unique webhook URL. Follow the steps in this article to obtain the URL for Slack notifications.

Create a Slack app (if you don't have one already)

Pick a name, choose a workspace to associate your app with (bear in mind you'll probably be posting lots of test messages, so you may want to create a channel for sandbox use), then click Create New App and choose from scratch. If you've already created an app, you can use that one.

Enable incoming webhooks

From here, select Incoming Webhooks, and toggle Activate Incoming Webhooks to on.

Create an incoming webhook

Now that incoming webhooks are enabled, the settings page should refresh and some additional options will appear. One of those options is a very helpful button called Add New Webhook to Workspace — click it!

What this button does is trigger a shortcut version of the installation flow for Slack apps, one that is completely self-contained so that you don't have to actually build any code to generate an incoming webhook URL. You'll see something like the following:

Go ahead and pick a channel that the app will post to, then select Authorize. If you need to add the incoming webhook to a private channel, you must first be in that channel.

You'll be sent back to your app settings, where you should see a new entry under the Webhook URLs for Your Workspace section. Your webhook URL will look something like this:

https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

That URL is your new incoming webhook, one that's specific to a single user and a single channel.

Let's see how you can actually use that webhook to post a message.

Keep it secret, keep it safe. Your webhook URL contains a secret. Don't share it online, including via public version control repositories. Slack actively searches out and revokes leaked secrets.

Using webhook URL in you Widgelix's Rule

Go to your created rule, and paste your Slack Webhook URL into URL field of Slack notification option:

You'll be redirected to the settings page for your new app (if you're using an existing app, you can load its settings via your ).

app's management dashboard
formatting
Create your Slack app