What's the proper way to let my backend send notifications to my users' Slack channels? - webhooks

I want any registered user of my site to be able to click an "enable Slack integration" button on the site which will turn on publication of notifications from the site to a Slack channel they own. Does this require that I submit a Slack app to the Slack App Directory and go through the Slack approval process? Or is there a better/simpler way?

Related

With a dialogflow chabot, are "actions on Google" available in Slack?

I did a bot that does a quiz. So far if I'm able to try talking to it through Dialogflow interface:
I need to click on "actions on Google".
But I am not able to do retrieve the same answers in Slack.
I did the following:
In the Slack app, go to the 'Bot users' section and click the 'Add a Bot User' button.
In the Slack app ‘Basic Information’ section, copy the 'Client ID', 'Client Secret' and 'Verification Token' and paste their values into the respective fields below.
Start the bot.
Copy the 'OAuth URL' value below and paste it into the 'Redirect URL(s)' field from the ‘OAuth & Permissions’ section of your Slack app settings. Save URLs.
Copy Events Request URL from the field below and paste it to Request URL in the ‘Events Subscription’ section of your Slack app.
Enable events in the ‘Event Subscriptions’ section.
Select necessary events in "Subscribe to Bot Events" section for example message.im, message.group, message.channel, im_created. These events will define which message types (direct, in channel, etc.) your bot will react to. Save changes. I selected message.im, message.groups, message.channels, im_created
In the Slack app settings, go to 'Manage Distribution' and add the bot to your Slack team using the 'Add to Slack' button.
In Slack I added on the left bar Dialogflow bot.
Are actions in Google used for a dialogflow chabot available when talking to it in Slack?
No, actions on google features are not available in Slack. This is because actions on google are features are used to create a chatbot for Google Assistant. Each time you select Actions on Google in the chat window of Dialogflow, you preview what your conversation looks like for Google Assistant conversations.
Since you have already created a Slack bot and integrated it with your Slack channel, so you should be able to send any responses that you create in the Default or Slack tab of the responses to your bot. Just click on the + sign in the response tab and add Slack as a channel of your bot, then click on Add Response to start creating responses just for Slack using Dialogflows UI.
If you want to use other message types in Slack using Dialogflow, have a look at the docs. It lists how you can create Rich responses for Slack bots.

Enable webhooks in hangout chat room

I want to create a simple webhook to a chat room in chat.google.com. I am unable to see menu option to configure webhooks. What do GSuite admins have to do to enable webhooks?
Read the documentation, specially the part about limitations.

Sending Push Notifications to Web Application without user consent

I want to send push notifications to my web application users on the occurrence of certain events by updating an icon with a red dot. This is similar to Facebook updating the "notification bell" icon with a dot, on receiving a message or getting a new friend request
LINK TO EXAMPLE IMAGE
I have tried to send notifications to the web app, but it requires the user to "allow notifications" before sending it.
Note that, Facebook/Twitter or any other social media sites can notify users even if the user explicitly blocks all the notifications for the website.
Socket.io is quite handy for this. You can just listen/emit some events at both client and server and act accordingly (in your case, updating the "notification bell" icon)

Change bot user name in slack for dialogflow bot

I am recently working on dialog flow bot (API.ai)
I have integrated my chatbot with slack from API.ai. When I start conversation and continue chatting, I found that bot username displayed in slack shown as Dialog flow Bot. But I have configured the name as treselle. How to change it?
Please find the screenshot below:
Yes! you can change it.
Go to your slack chatbot application.
Click on about tab.
enter image description here
Click on settings button.
Below "Bot user", select edit bot name button beside the bot name.
I'm not sure it's possible or at least I couldn't make it neither.
If you're a developer too, here is what you can do:
create a Slack app and bot, with enabled events subscriptions that will call your application webhook each time a message is sent to your bot
create a DialogFlow agent that you will call using 'query' API
create your own web application with a webhook route called by Slack, from which you can call DialogFlow API
This way you'll be able to customize every single details, including username, description, icon of the Slack bot, and send messages with rich content!
Here are more details: https://blog.eleven-labs.com/en/en/replace-erp-by-slack-bot-with-dialogflow-and-symfony/
I was wondering the same thing. Apparently you can't change the name of the bot until it is public. Here's a quote from the documentation...
Once logged in, navigate to the instance and locate the bot user called #dialogflow-bot.
Note: In order to change the name of the agent or add a logo, you'll need to make the bot public.
https://dialogflow.com/docs/integrations/slack

Can I create auto reply bot in Slack just using "Bot Users" without slack app?

I want my bot to reply to particular keywords. As per the https://api.slack.com/bot-users, we can create custom bot without slack app. But how do I get OATH tokens without an app but just Customer Bot User?
That works. After installing a Custom Bot you automatically get the corresponding OAUTH token for that bot. Just go to "Manage Apps" / "Custom Integrations" / "Bots". Then click on your settings for your bot to get your token.

Resources