Blog

Post To Slack From Your IoT Projects Using Wia

Hi All,
Today we're going to look at the latest edition to our IoT integrations by posting messages to your Slack channel from any IoT device using Wia.

Create Your Wia Account

If you haven't already got one, click here to sign up.

Setup a Space

Once logged in, setup a new Space for your devices. I'm going to call mine My Devices. When your Space is ready, you should see a screen like the one below.

Screen Shot 2018-01-01 at 12.38.44

Start Setting Up Integration

Open the Space dropdown, by clicking on the Space name in the top left corner, and click Settings. Select Integrations in the sidebar.

Screen Shot 2018-01-01 at 12.50.12

On the Slack row, click Setup to begin setting up the integration.

post-to-slack-img-1

Click Add to Slack. You will then be redirected to the Slack authorization page. Here, select the channel you wish to post to and click Authorize.

post-to-slack-img-3

Create a Flow

  • Go to the Flows and click Create Flow.
  • Enter a name for your Flow. I'm going to call mine Post To Slack When Temperature Received.
  • You will then be redirected to the Flow Studio.

post-to-slack-img-4

Add a Trigger Node

  • In the Flow Studio, drag over an Event trigger node from the panel on the left.
  • Select the node, enter temperature as the name of the Event in the panel on the right and click Update.

post-to-slack-img-5

Add an Output Node

  • Drag over a Message output node from the Slack section in the panel on the left.
  • Select the node, then on the panel on the right, enter Temperature is ${event.data} as the Message Text.
  • Click Update to save your changes.
  • Click on the white circle shape at the bottom of the Event node and drag the line to the input of the Output node.

post-to-slack-img-6

Add Flow to Your Device

  • Go to Devices and select the Device your would like to add the Flow to.
  • Click on Flows in the subnav then click on Enable beside the Flow.

post-to-slack-img-7

Run the Flow

Publish an Event from your Device and you will see a message come through to your Slack channel.

post-to-slack-img-9

That's all folks!

P.S. If you need any help with getting setup, tweet us or email support@wia.io

References
Slack They are building the platform that connects teams with the apps, services, and resources they need to get work done. Launched in 2014, Slack is the fastest growing business application in history. Millions of people around the world use Slack to bring their teams together, make sense of their work, and drive their business forward.


Recommended article

Ready to get started?
Talk to our sales team or setup an account.