-
Processors
- AttributeRollingWindow
- AttributesToCSV
- AttributesToJSON
- CalculateRecordStats
- CaptureChangeMySQL
- CompressContent
- ConnectWebSocket
- ConsumeAMQP
- ConsumeAzureEventHub
- ConsumeElasticsearch
- ConsumeGCPubSub
- ConsumeIMAP
- ConsumeJMS
- ConsumeKafka
- ConsumeKinesisStream
- ConsumeMQTT
- ConsumePOP3
- ConsumeSlack
- ConsumeTwitter
- ConsumeWindowsEventLog
- ControlRate
- ConvertCharacterSet
- ConvertRecord
- CopyAzureBlobStorage_v12
- CopyS3Object
- CountText
- CryptographicHashContent
- DebugFlow
- DecryptContentAge
- DecryptContentPGP
- DeduplicateRecord
- DeleteAzureBlobStorage_v12
- DeleteAzureDataLakeStorage
- DeleteByQueryElasticsearch
- DeleteDynamoDB
- DeleteFile
- DeleteGCSObject
- DeleteGridFS
- DeleteMongo
- DeleteS3Object
- DeleteSFTP
- DeleteSQS
- DetectDuplicate
- DistributeLoad
- DuplicateFlowFile
- EncodeContent
- EncryptContentAge
- EncryptContentPGP
- EnforceOrder
- EvaluateJsonPath
- EvaluateXPath
- EvaluateXQuery
- ExecuteGroovyScript
- ExecuteProcess
- ExecuteScript
- ExecuteSQL
- ExecuteSQLRecord
- ExecuteStreamCommand
- ExtractAvroMetadata
- ExtractEmailAttachments
- ExtractEmailHeaders
- ExtractGrok
- ExtractHL7Attributes
- ExtractRecordSchema
- ExtractText
- FetchAzureBlobStorage_v12
- FetchAzureDataLakeStorage
- FetchBoxFile
- FetchDistributedMapCache
- FetchDropbox
- FetchFile
- FetchFTP
- FetchGCSObject
- FetchGoogleDrive
- FetchGridFS
- FetchS3Object
- FetchSFTP
- FetchSmb
- FilterAttribute
- FlattenJson
- ForkEnrichment
- ForkRecord
- GenerateFlowFile
- GenerateRecord
- GenerateTableFetch
- GeoEnrichIP
- GeoEnrichIPRecord
- GeohashRecord
- GetAsanaObject
- GetAwsPollyJobStatus
- GetAwsTextractJobStatus
- GetAwsTranscribeJobStatus
- GetAwsTranslateJobStatus
- GetAzureEventHub
- GetAzureQueueStorage_v12
- GetDynamoDB
- GetElasticsearch
- GetFile
- GetFTP
- GetGcpVisionAnnotateFilesOperationStatus
- GetGcpVisionAnnotateImagesOperationStatus
- GetHubSpot
- GetMongo
- GetMongoRecord
- GetS3ObjectMetadata
- GetSFTP
- GetShopify
- GetSmbFile
- GetSNMP
- GetSplunk
- GetSQS
- GetWorkdayReport
- GetZendesk
- HandleHttpRequest
- HandleHttpResponse
- IdentifyMimeType
- InvokeHTTP
- InvokeScriptedProcessor
- ISPEnrichIP
- JoinEnrichment
- JoltTransformJSON
- JoltTransformRecord
- JSLTTransformJSON
- JsonQueryElasticsearch
- ListAzureBlobStorage_v12
- ListAzureDataLakeStorage
- ListBoxFile
- ListDatabaseTables
- ListDropbox
- ListenFTP
- ListenHTTP
- ListenOTLP
- ListenSlack
- ListenSyslog
- ListenTCP
- ListenTrapSNMP
- ListenUDP
- ListenUDPRecord
- ListenWebSocket
- ListFile
- ListFTP
- ListGCSBucket
- ListGoogleDrive
- ListS3
- ListSFTP
- ListSmb
- LogAttribute
- LogMessage
- LookupAttribute
- LookupRecord
- MergeContent
- MergeRecord
- ModifyBytes
- ModifyCompression
- MonitorActivity
- MoveAzureDataLakeStorage
- Notify
- PackageFlowFile
- PaginatedJsonQueryElasticsearch
- ParseEvtx
- ParseNetflowv5
- ParseSyslog
- ParseSyslog5424
- PartitionRecord
- PublishAMQP
- PublishGCPubSub
- PublishJMS
- PublishKafka
- PublishMQTT
- PublishSlack
- PutAzureBlobStorage_v12
- PutAzureCosmosDBRecord
- PutAzureDataExplorer
- PutAzureDataLakeStorage
- PutAzureEventHub
- PutAzureQueueStorage_v12
- PutBigQuery
- PutBoxFile
- PutCloudWatchMetric
- PutDatabaseRecord
- PutDistributedMapCache
- PutDropbox
- PutDynamoDB
- PutDynamoDBRecord
- PutElasticsearchJson
- PutElasticsearchRecord
- PutEmail
- PutFile
- PutFTP
- PutGCSObject
- PutGoogleDrive
- PutGridFS
- PutKinesisFirehose
- PutKinesisStream
- PutLambda
- PutMongo
- PutMongoBulkOperations
- PutMongoRecord
- PutRecord
- PutRedisHashRecord
- PutS3Object
- PutSalesforceObject
- PutSFTP
- PutSmbFile
- PutSNS
- PutSplunk
- PutSplunkHTTP
- PutSQL
- PutSQS
- PutSyslog
- PutTCP
- PutUDP
- PutWebSocket
- PutZendeskTicket
- QueryAirtableTable
- QueryAzureDataExplorer
- QueryDatabaseTable
- QueryDatabaseTableRecord
- QueryRecord
- QuerySalesforceObject
- QuerySplunkIndexingStatus
- RemoveRecordField
- RenameRecordField
- ReplaceText
- ReplaceTextWithMapping
- RetryFlowFile
- RouteHL7
- RouteOnAttribute
- RouteOnContent
- RouteText
- RunMongoAggregation
- SampleRecord
- ScanAttribute
- ScanContent
- ScriptedFilterRecord
- ScriptedPartitionRecord
- ScriptedTransformRecord
- ScriptedValidateRecord
- SearchElasticsearch
- SegmentContent
- SendTrapSNMP
- SetSNMP
- SignContentPGP
- SplitAvro
- SplitContent
- SplitExcel
- SplitJson
- SplitPCAP
- SplitRecord
- SplitText
- SplitXml
- StartAwsPollyJob
- StartAwsTextractJob
- StartAwsTranscribeJob
- StartAwsTranslateJob
- StartGcpVisionAnnotateFilesOperation
- StartGcpVisionAnnotateImagesOperation
- TagS3Object
- TailFile
- TransformXml
- UnpackContent
- UpdateAttribute
- UpdateByQueryElasticsearch
- UpdateCounter
- UpdateDatabaseTable
- UpdateRecord
- ValidateCsv
- ValidateJson
- ValidateRecord
- ValidateXml
- VerifyContentMAC
- VerifyContentPGP
- Wait
-
Controller Services
- ADLSCredentialsControllerService
- ADLSCredentialsControllerServiceLookup
- AmazonGlueSchemaRegistry
- ApicurioSchemaRegistry
- AvroReader
- AvroRecordSetWriter
- AvroSchemaRegistry
- AWSCredentialsProviderControllerService
- AzureBlobStorageFileResourceService
- AzureCosmosDBClientService
- AzureDataLakeStorageFileResourceService
- AzureEventHubRecordSink
- AzureStorageCredentialsControllerService_v12
- AzureStorageCredentialsControllerServiceLookup_v12
- CEFReader
- ConfluentEncodedSchemaReferenceReader
- ConfluentEncodedSchemaReferenceWriter
- ConfluentSchemaRegistry
- CSVReader
- CSVRecordLookupService
- CSVRecordSetWriter
- DatabaseRecordLookupService
- DatabaseRecordSink
- DatabaseTableSchemaRegistry
- DBCPConnectionPool
- DBCPConnectionPoolLookup
- DistributedMapCacheLookupService
- ElasticSearchClientServiceImpl
- ElasticSearchLookupService
- ElasticSearchStringLookupService
- EmailRecordSink
- EmbeddedHazelcastCacheManager
- ExcelReader
- ExternalHazelcastCacheManager
- FreeFormTextRecordSetWriter
- GCPCredentialsControllerService
- GCSFileResourceService
- GrokReader
- HazelcastMapCacheClient
- HikariCPConnectionPool
- HttpRecordSink
- IPLookupService
- JettyWebSocketClient
- JettyWebSocketServer
- JMSConnectionFactoryProvider
- JndiJmsConnectionFactoryProvider
- JsonConfigBasedBoxClientService
- JsonPathReader
- JsonRecordSetWriter
- JsonTreeReader
- Kafka3ConnectionService
- KerberosKeytabUserService
- KerberosPasswordUserService
- KerberosTicketCacheUserService
- LoggingRecordSink
- MapCacheClientService
- MapCacheServer
- MongoDBControllerService
- MongoDBLookupService
- PropertiesFileLookupService
- ProtobufReader
- ReaderLookup
- RecordSetWriterLookup
- RecordSinkServiceLookup
- RedisConnectionPoolService
- RedisDistributedMapCacheClientService
- RestLookupService
- S3FileResourceService
- ScriptedLookupService
- ScriptedReader
- ScriptedRecordSetWriter
- ScriptedRecordSink
- SetCacheClientService
- SetCacheServer
- SimpleCsvFileLookupService
- SimpleDatabaseLookupService
- SimpleKeyValueLookupService
- SimpleRedisDistributedMapCacheClientService
- SimpleScriptedLookupService
- SiteToSiteReportingRecordSink
- SlackRecordSink
- SmbjClientProviderService
- StandardAsanaClientProviderService
- StandardAzureCredentialsControllerService
- StandardDropboxCredentialService
- StandardFileResourceService
- StandardHashiCorpVaultClientService
- StandardHttpContextMap
- StandardJsonSchemaRegistry
- StandardKustoIngestService
- StandardKustoQueryService
- StandardOauth2AccessTokenProvider
- StandardPGPPrivateKeyService
- StandardPGPPublicKeyService
- StandardPrivateKeyService
- StandardProxyConfigurationService
- StandardRestrictedSSLContextService
- StandardS3EncryptionService
- StandardSSLContextService
- StandardWebClientServiceProvider
- Syslog5424Reader
- SyslogReader
- UDPEventRecordSink
- VolatileSchemaCache
- WindowsEventLogReader
- XMLFileLookupService
- XMLReader
- XMLRecordSetWriter
- YamlTreeReader
- ZendeskRecordSink
ListenSlack 2.0.0
- Bundle
- org.apache.nifi | nifi-slack-nar
- Description
- Retrieves real-time messages or Slack commands from one or more Slack conversations. The messages are written out in JSON format. Note that this Processor should be used to obtain real-time messages and commands from Slack and does not provide a mechanism for obtaining historical messages. The ConsumeSlack Processor should be used for an initial load of messages from a channel. See Usage / Additional Details for more information about how to configure this Processor and enable it to retrieve messages and commands from Slack.
- Tags
- command, event, listen, message, real-time, receive, slack, social media, team, text, unstructured
- Input Requirement
- FORBIDDEN
- Supports Sensitive Dynamic Properties
- false
-
Additional Details for ListenSlack 2.0.0
ListenSlack
Description:
ListenSlack allows for receiving real-time messages and commands from Slack using Slack’s Events API. This Processor does not provide any capabilities for retrieving historical messages. However, the ConsumeSlack Processor provides the ability to do so. This Processor is generally used when implementing a bot in NiFi, or when it is okay to lose messages in the case that NiFi or this Processor is stopped for more than 5 minutes.
This Processor may be used to listen for Message Events, App Mention Events (when the bot user is mentioned in a message) or Slack Commands. For example, you may wish to create a Slack App that receives the
/nifi
command and when received, performs some task. The Processor does not allow listening for both Message Events and Commands, as the output format is very different for the two, and this would lead to significant confusion. Instead, if there is a desire to consume both Message Events and Commands, two ListenSlack Processors should be used - one for Messages and another the Commands.Note that unlike the ConsumeSlack Processor, ListenSlack does not require that a Channel name or ID be provided. This is because the Processor listens for Events/Commands from all channels (and “channel-like” conversations) that the application has been added to.
Slack Setup
In order use this Processor, it requires that a Slack App be created and installed in your Slack workspace. Additionally, the App must have Socket Mode enabled. Please see Slack’s documentation for the latest information on how to create an Application and install it into your workspace.
At the time of this writing, the following steps may be used to create a Slack App with the necessary scopes. However, these instructions are subject to change at any time, so it is best to read through Slack’s Quickstart Guide.
- Create a Slack App. Click here to get started. From here, click the “Create New App” button and choose “From scratch.” Give your App a name and choose the workspace that you want to use for developing the app.
- Creating your app will take you to the configuration page for your application. For example,
https://api.slack.com/apps/<APP_IDENTIFIER>
. From here, click on “Socket Mode” and flip the toggle for “Enable Socket Mode.” Accept the default scope and apply the changes. From here, click on “Event Subscriptions.” - Flip the toggle to turn on “Enable Events.” In the “Subscribe to bot events” section, add the following Bot User
Events:
app_mention
,message.channels
,message.groups
,message.im
,message.mpim
. Click “Save Changes” at the bottom of the screen. - Click on the “OAuth & Permissions” link on the left-hand side. Under the “OAuth Tokens for Your Workspace” section, click the “Install to Workspace” button. This will prompt you to allow the application to be added to your workspace, if you have the appropriate permissions. Otherwise, it will generate a notification for a Workspace Owner to approve the installation. Additionally, it will generate a “Bot User OAuth Token”.
- The Bot must then be enabled for each Channel that you would like to consume messages from. In order to do that, in
the Slack application, go to the Channel that you would like to consume from and press
/
. Choose theAdd apps to this channel
option, and add the Application that you created as a Bot to the channel. - Additionally, if you would like your Bot to receive commands, navigate to the “Slash Commands” section on the
left-hand side. Create a New Command and complete the form. If you have already installed the app in a workspace, you
will need to re-install your app at this time, in order for the changes to take effect. You should be prompted to do
so with a link at the top of the page. Now, whenever a user is in a channel with your App installed, the user may send
a command. For example, if you configured your command to be
/nifi
then a user can trigger your bot to receive the command by simply typing/nifi
followed by some text. If your Processor is running, it will receive the command and output it. Otherwise, the user will receive an error.
Configuring the Tokens
Now that your Slack Application has been created and configured, you will need to provide the ListenSlack Processor with two tokens: the App Token and the Bot token. To get the App Token, go to your Slack Application’s configuration page. On the left-hand side, navigate to “Basic Information.” Scroll down to “App-Level Tokens” and click on the token that you created in the Slack Setup section above. This will provide you with a pop-up showing your App Token. Click the “Copy” button and paste the value into your Processor’s configuration. Then click “Done” to close the popup.
To obtain your Bot Token, again in the Slack Application’s configuration page, navigate to the “OAuth & Permissions” section on the left-hand side. Under the “OAuth Tokens for Your Workspace” section, click the “Copy” button under the " Bot User OAuth Token" and paste this into your NiFi Processor’s configuration.
-
App Token
The Application Token that is registered to your Slack application
- Display Name
- App Token
- Description
- The Application Token that is registered to your Slack application
- API Name
- App Token
- Expression Language Scope
- Not Supported
- Sensitive
- true
- Required
- true
-
Bot Token
The Bot Token that is registered to your Slack application
- Display Name
- Bot Token
- Description
- The Bot Token that is registered to your Slack application
- API Name
- Bot Token
- Expression Language Scope
- Not Supported
- Sensitive
- true
- Required
- true
-
Event Type to Receive
Specifies the type of Event that the Processor should respond to
- Display Name
- Event Type to Receive
- Description
- Specifies the type of Event that the Processor should respond to
- API Name
- Event Type to Receive
- Default Value
- Receive App Mention Events
- Allowable Values
-
- Receive App Mention Events
- Receive Message Events
- Receive Commands
- Receive Joined Channel Events
- Expression Language Scope
- Not Supported
- Sensitive
- false
- Required
- true
-
Resolve User Details
Specifies whether the Processor should lookup details about the Slack User who sent the received message. If true, the output JSON will contain an additional field named 'userDetails'. The 'user' field will still contain the ID of the user. In order to enable this capability, the Bot Token must be granted the 'users:read' and optionally the 'users.profile:read' Bot Token Scope. If the rate limit is exceeded when retrieving this information, the received message will be rejected and must be re-delivered.
- Display Name
- Resolve User Details
- Description
- Specifies whether the Processor should lookup details about the Slack User who sent the received message. If true, the output JSON will contain an additional field named 'userDetails'. The 'user' field will still contain the ID of the user. In order to enable this capability, the Bot Token must be granted the 'users:read' and optionally the 'users.profile:read' Bot Token Scope. If the rate limit is exceeded when retrieving this information, the received message will be rejected and must be re-delivered.
- API Name
- Resolve User Details
- Default Value
- false
- Allowable Values
-
- true
- false
- Expression Language Scope
- Not Supported
- Sensitive
- false
- Required
- true
- Dependencies
-
- Event Type to Receive is set to any of [Receive Joined Channel Events, Receive App Mention Events, Receive Message Events]
Name | Description |
---|---|
success | All FlowFiles that are created will be sent to this Relationship. |
Name | Description |
---|---|
mime.type | Set to application/json, as the output will always be in JSON format |