Slack

Slack

This feeder creates a stream using the Slack Events API.
In order to use this feeder, you need to create a Slack App, define its Bot Token scopes and finally enable the Event Subscriptions.
The feeder will start a webserver to receive the events, so it should be reachable by slack. If you are behind a NAT or Firewall, you can enable localtunnel.
Based on slack-go/slack

Parameters

ParameterTypeDefaultDescription
tokenSTRINGemptytoken Bot (starting with xoxb-*)
verification_tokenSTRINGemptytoken to verify the requests (you can find it in the Basic information section)
addrSTRING“:3000”address and port in the form IP:PORT
lt_enableBOOLfalseenable localtunnel for the server
lt_baseurlSTRINGhttps://localtunnel.meURL to the Proxy server
lt_subdomainSTRINGemptyspecify a subdomain to use with localtunnel
eventsSTRING*eventscomma separated event list to handle
ignore_botBOOLtrueif true the bot will ignore mentions and messages created by another bot

*events = “app_mention”,“app_home_opened”,“app_uninstalled”,“grid_migration_finished”,“grid_migration_started”,“link_shared”,“message”,“member_joined_channel”,“member_left_channel”,“pin_added”,“pin_removed”,“reaction_added”,“reaction_removed”,“tokens_revoked”,“file_shared”

... | <slack: token="xoxb-xxx", verification_token="xxxx", lt_enable="true", lt_subdomain="domaintesttt"> | ...

Output

The messages propagated by this feeder could contain different info and they depend from the type of the event it received.

Every propagated Message will have a type extra field with the name of the events (see the above list).

Event app_mention

The bot has been mentioned by someone.
The main field of the Message contain the text of the event.

NameDescription
typeit contain app_mention for this event
useruser who triggered the events
texttext of the message
timestamptimestamp
threadtimestamptimestamp of the thread
channelchannel name
eventtimestamptimestamp of the event
userteamfilled when a message comes from a channel that is shared between workspaces
sourceteamfilled when a message comes from a channel that is shared between workspaces
botidfilled out when a bot triggers the app_mention event

Event app_home_opened

User clicked into your App Home.
The main field of the Message contains the type name of the event.

NameDescription
typeit contain app_home_opened for this event
useruser who triggered the events
channelchannel name
eventtimestamptimestamp of the event
tabfilled when a message comes from a channel that is shared between workspaces

Event app_uninstalled

Your Slack app was uninstalled.
The main field of the Message contains the type name of the event.

NameDescription
typeit contain app_uninstalled for this event

Event grid_migration_finished

An enterprise grid migration has finished on this workspace.
The main field of the Message contains the type name of the event.

NameDescription
typeit contain grid_migration_finished for this event
enterpriseidenterprise id

Event grid_migration_started

An enterprise grid migration has started on this workspace.
The main field of the Message contains the type name of the event.

NameDescription
typeit contain grid_migration_started for this event
enterpriseidenterprise id

A message was posted containing one or more links relevant to your application.
The main field of the Message contains the shared URL.

NameDescription
typeit contain link_shared for this event
timestamptimestamp of the message
threadtimestamptimestamp of the thread
domaindomain of the shared link
linkshared link

Event file_shared

A message was posted containing one or more links relevant to your application.
The main field of the Message contains the text of the message used to share the file.

NameDescription
idid of the file upload
created
timestamptimestamp of the event
namename of the file
mimetypemimetype of the file
filetypeextension of the file
prettytype
useruser who triggered the event
sizesize of the file
urlprivatedownloadurl to download the file
imageexifrotation
originalwwidth of the file if it is an image
originalhheight of the file if it is an imange
permalink
permalinkpublic

Event message

A message was posted as direct message or in a channel/group.
The main field of the Message contains the text of the message.

NameDescription
typeit contain message for this event
timestamptimestamp of the message
threadtimestamptimestamp of the thread
botidfilled if the message has been sent by a bot
channelchannel id
channeltypetype of the channel (im, group, mpim, channel)
clientmsgidid of the message
subtypesub type of the message
texttext of the message
useruser who sent the message
usernamefilled if it is a bot_message
userteamfilled when the message comes from a channel that is shared between workspaces
sourceteamfilled when the message comes from a channel that is shared between workspaces

Event member_joined_channel

An user just joined in a channel or it has been invited.
The main field of the Message contains the type of the message.

NameDescription
typeit contain member_joined_channel for this event
useruser who has been invited
channelchannel id
channeltypetype of the channel (im, group, mpim, channel)
inviteruser who invited
teamfilled when the message comes from a channel that is shared between workspaces

Event member_left_channel

An user just left the channel.
The main field of the Message contains the type of the message.

NameDescription
typeit contain member_left_channel for this event
useruser who has been invited
channelchannel id
channeltypetype of the channel (im, group, mpim, channel)
teamfilled when the message comes from a channel that is shared between workspaces

Event pin_added / pin_removed

A pin has been added or removed.
The main field of the Message contains the type of the message.

NameDescription
typeit contain pin_added or pin_removed for this event
useruser who triggered the event
channelchannel id
eventtimestamptype of the channel (im, group, mpim, channel)
haspins
itemit contains the object slackevents.Item that can be used from the slack filter

Event reaction_added/reaction_removed

A member has added an emoji reaction to an item.
The main field of the Message contains the type of the message.

NameDescription
typeit contain reaction_added or reaction_removed for this event
useruser who triggered the event
itemuser
eventtimestamptimestamp of the event
itemit contains the object slackevents.Item that can be used from the slack filter

Examples