Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (1)
Super 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.

2,598 Views
Comments
New Contributor

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

Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
2 of 2
Last update:
‎08-17-2019 11:20 AM
Updated by:
 
Contributors
Top Kudoed Authors