How can I send a welcome message when a bot is added to slack ? Is there any event triggered when bot is added ?
Perhaps one of the other activity types i.e. conversationUpdate?
https://docs.botframework.com/en-us/csharp/builder/sdkreference/activities.html
Will's correct, conversationUpdate is used for this notification.
No, I tried using conversationUpdate and contactRelationUpdate both activities, but It does not work.
conversationUpdate works only if you invite the bot into a group conversation. What I am looking for is different, I want to send a welcome message as soon as any one add my bot to his slack.
We don't currently have an event of that type. In most channels, adding the bot to the service is the same as adding it to a group or individual chat.
How do you intend to use this differently? Which slack channel would you expect the message would be sent to?
I want to send a message on this event. https://api.slack.com/events/bot_added
Thanks @somprabhsharma . I'll add that to the list of things we're looking at for future extensions to the Bot Framework protocol/schema. Right now we don't expose that event and it wouldn't map neatly into the other events we already have, though I can see use for it.
Hi there! I'm experiencing the same issue. As a possible fix can we get the API key when the bot is added to the Slack team at the authentication point? The Bot Framework could send the event i.e. "bot registered" with API key and bot Slack ID.
We will look at this as a feature request; however right now it's not in our API Schema or protocol so it would take multiple updates and not something we will do as a trivial change. Can you clarify more the scenario you're trying to solve by doing this (so I can reflect priority)?
Hey @jameslew - sure thing!
The scenario we're aiming to solve occurs when a user first installs the bot into their team.
The bot we've built operates via direct message instead of a channel - useful for having discrete conversations. However, beta testing has found that most users won't raise a Direct Message conversation unless the bot does so first.
Therefore, we need to know two things - when the bot is installed and which team member installed it - then the bot can launch the on boarding dialogue. Without these, we don't have a native way to onboard users so user adoption is very low and it's impacting our submission to the Slack App Directory.
Hope that helps clarify - let me know if you need more detail!
Thanks @hughcameron I'll get that into the enhancement request. I can certainly see the value there.
Did this ever get resolved @jameslew? I'm facing the same issue on Slack as well
I'm curious to know if this can be addressed using BotKit. Whilst support Botkit was deprecated in Bot Framework V3 it seems there have been some changes from Botkits side since then: https://github.com/howdyai/botkit/blob/master/readme-botframework.md - with contributions by @Stevenic
Are bots built Bot Framework able to leverage these updates?
So I'm guessing that this issue wasn't resolved @hughcameron? That Botkit really looks promising
Not at this stage @stanleycyang - the workaround we've set up is to redirect the user to a post-install page on our site that reiterates the activations instructions. The user needs to make the first move so we show them how. This post-install page is required for bots in the Slack App Directory anyway.
To set up the post-install page follow these steps (thanks to @dandriscoll): https://github.com/Microsoft/BotBuilder/issues/1316
Even if the bot were to introduce itself in future we'd take full advantage this step in the install journey - it's a great touchpoint to educate users.
If we ever find another way around I'll drop a note here!
Also, by way of background, we tried another method to get the bot to say 'hi' - it involved a double authentication. This wasn't a good solution - users found it odd and Slack outlined that it would open up a number of other problems. We quickly moved away from that solution.
That's pretty great - I'll take a look into it @hughcameron. My issue really is with deploying to the slack app directory. It's absolutely necessary to introduce the user to the bot on installation, that's why I'm really curious why it hasn't already been resolved. All the issues I saw relating to this were all closed but I didn't see any PRs closing them
@jameslew
Is it possible to add an optional http callback as part of the slack setup and the botframework server invokes the callback with the auth token granted by slack whenever someone installs the bot (i.e. after completing the oauth)?
Any progress on this issue... I there a way to Send welcome message... I am using Event subscription url...
Most helpful comment
Any progress on this issue... I there a way to Send welcome message... I am using Event subscription url...