Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
Labels (1)
avatar
Master Guru

I just tried out the new NiFi 0.7.0 version's Slack.

Source

I used Twitter, since it has some fun data and gets you a nice big stream. Sometimes with Twitter Feeds will be limited and Twitter will give you the 420 Enhance Your Calm Message. https://httpstatusdogs.com/420-enhance-your-calm Usually you can just wait 5-20 minutes and you will be serving again. Sometimes you might need to use a different of your apps, reset the tokens in your app or create a new app (https://apps.twitter.com/).

Processing

Use the Pull Key Attributes, to Find Only Tweets (remove null)

Sink to Slack

5819-slack3.png

For the PutToSlack Processor

Set the Webhook URL to the URL generated by the incoming webhook page in slack.com.

Set the Webhook Text to ${twitter.msg}, this will send your Twitter message to slack.

Set the Channel to #general, or a channel of your choosing.

I created a slack board for receiving my messages, https://nifi-se.slack.com/messages/general/.

You can easily create your own (or using your existing Slack board). Just go to slack.com. You will need to create a webhook. To set it up, in the #general channel just type incoming webhook. You will get a link the screen to create one.

5821-slack2.png

5820-slack1.png

Apache NiFi 0.70 Final Flow

5822-slack4.png

Now you can start seeing tweets turn into slack messages.

5824-slack6.png

Apache NiFi 0.70 now has 155 processors!

5823-slack5.png

Let's explore some more.

5,251 Views
Comments
avatar

@Timothy Spann Could you please let me know is there any way to provide webhook url property value as a variable?

avatar
New Contributor

@TimothySpann Could you explain how you were able to convert the webhook text to ${twitter.msg} and have it work? I am trying to do a similar flow for AlphaVantage and I am having trouble with sending this step to slack. Thank you