I know exactly what I want to achieve, but need some help to be able to start.
Flow:
Automatic periodic checking of my gCalendar to see if I just finished a meeting
Sending message to Slack with question "What is to-do list after the meeting?"
User writes a response.
Response get stored in Google Sheet.
My main concern right now are steps 1 and 2: is Api.ai capable of automatic periodic checking of my gCalendar by itself, so when my meeting is over, I get message in Slack and then I can continue normal communication with the Api.ai bot?
The problem I see here is that I expect Api.ai to push a message to Slack after some external trigger instead of waiting trigger from me as a Slack user.
If you haven't done so, you may want to check Bot Users which enable teams to conversationally interact with external services or your custom code by building bot users.
What can bot users do?
The primary way bot users interact with people on a given team is by connecting to the Real Time Messaging API (RTM API for short) and opening up a websocket connection with Slack.
The Events API is an alternative way to receive and respond to events as a bot user contained within a Slack App. Instead of connecting over a websocket, you subscribe to specific events and messages and Slack sends them to your server.
Secondly, you may want to also check the Bot implementation given in this GitHub post or you may try to customize your bot behavior using the following steps:
Clone the repository https://github.com/api-ai/api-ai-slack-bot
Change the code to index.js
In the Docker, use the run command specifying the full path to the directory containing the index.js file:
run command:
docker run -d --name slack_bot \
-e accesstoken="Api.ai client token" \
-e slackkey="Slack bot user key" \
-v /full/path/to/your/src:/usr/app/src \
speaktoit/api-ai-slack-bot
Lastly, for additional information, please also see Slack Integration documentation wherein it gives guidelines on how you can set up Slack Integration in API.AI. Please also see Slack Help Center for ways on how you can connect Google Calendar to Slack.
Related
I want to send slack notification (message as an app to another workspace).
I have created a slack app as slack_app
I have installed slack_app into my own_workspace as own_ws.
A external users say user_x has installed my slack app into their workspace.
I want to automate this sending notification business using third parties for example, using courier or using something else library.
I have webhook url of user_x's slack workspace which i caught during oauth installation and that is something can be used to send messages but how to automate this sending notification via some third party.
How we can send notification/message into another workspace ? I did research a bit but could not find relevant information anywhere.
I want to have my website online on ngrok 24/7, but it's session will expire after 2 hours. Is there any way to have it run forever, or any alternative software that I should use?
If you sign up for an account on ngrok.com, whether free or paid, you will have tunnels that run with no time limit (aka "forever").
If you don't care about domain address persistence and you use Discord and you want to use it just for testing, sharing it for friends to view you can use this:
https://github.com/winter-b/ngrok-bot
It's a Discord bot which executes shell commands every two hours to restart ngrok tunnel, get the url, and send it to the specified Discord channel.
First create a Discord bot, how to here https://discord.com/developers/docs/intro, get the bot token, put the bot in your Discord server, get the channel id you want to send url's to, put the discord bot token and channel id in settings.json
run in directory
npm install
npm start
it's not perfect, but gets the job done for particular scenarios
I am working on AWS Codepipeline, How to set up e-mail notifications for developer did last commit and build was failed. Now identify the user and send automatic email for the developer along with manager. Can anyone please help on this
Thanks in Advance
You can use notification rules to notify users of important changes, such as when a pipeline starts execution. Notification rules specify both the events and the Amazon SNS topic that is used to send notifications. On the SNS topic, a subscription could be a User/Manager email address. Details here: [0]
Currently the notification message that is sent in case of, for example, pipeline success, does not include the Commit id or the Committer information [1].
As a work-around I suggest to implement additional stages within the pipeline that would Invoke a Lambda Function. The Lambda Function can then be programmed to publish the detailed event message [2] to the SNS using AWS SDKs. Detailed instructions for this set-up are documented at [3].
References:
[0] https://docs.aws.amazon.com/codebuild/latest/userguide/notification-rule-create.html
[1] https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html#codepipeline_event_type
[2] Example JSON Event - https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html#actions-invoke-lambda-function-json-event-example
[3] Invoke an AWS Lambda Function in a Pipeline in AWS CodePipeline - https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html
I know that Firebase has recently added support for Push Notifications and while this is a great thing, I only seem to be able to send push notifications manually via the Notifications Panel.
What I'd like to do is to send push notifications within a user scope...Let me explain that. Each User in my App has an account and then each user can join a group. Within this group the user can perform tasks and has a list of chores to do. Now when certain tasks are due for example I want to remind the user of doing it with a push notification. For 1-10 I might be able to pull this off manually, but is there a way to dynamically based on the data in the Database send out Push Notifications?
I know that certain Push Notifications can be created using the Analytics tool such as "Hey you have not visited for 3 days, please come back whatever"... but I'd like to register push notifications such as "I just created a task, this task needs to be done within 3 days. Remind me in 3 days if the task is still not done".
Is this possible with Firebase or do I need to have my own server connecting to Firebase and handling those events?
-xCoder
You need to implement FCM in your client and in a server. Let me put this straight:
First, you need that your client, or app, to register into FCM and get a FCM token that will be used to identify that device uniquely.
Then, store that token wherever you like. It can be into firebase database or other server you may like. I recommend you to store it into firebase if you are using it as a database for your users; that's my case.
Also, you need to implement a http or xmpp server in order to send FCM messages to your registered devices containing the data you are interested in. For example, you can implement a Google App Engine endpoint (can be done with Android Studio and Java) that is quite simple or a NodeJS module, depending on your preferred language.
If you are using Firebase as database you can connect from your server with the appropriate SDK and get the FCM tokens you want from your users, and then send the message to those with data. Don't forget to secure your serve.
The way you implement your server algorithm to send FCM messages depends on your app purposes.
Hope it is clear enough for you. Also you can find all the documentation with a short video that explains the general structure here: https://firebase.google.com/docs/cloud-messaging
You can use cloud functions to trigger on any create, update or delete operation in your database and in the trigger event, you can choose to send in FCM push notifications to the devices of your choice.
Here is the documentation regarding the use and structure of a cloud function: https://firebase.google.com/docs/firestore/extend-with-functions
Hope this helps!
I've recently started using application insights with a web api.
It will be really helpful to configure app insights to post error messages in a slack channel.
I've seen there is a slack connector but I am not sure how to use it, my guess is that this can be solved with the slack connector and a azure logic app, any tips? tutorials?
You may have a look at this link: https://github.com/Azure/azure-quickstart-templates/tree/master/demos/alert-to-slack-with-logic-app. I followed the instruction and it worked for me.
The tricky part is you need to click the "Deploy to Azure" button on this link page. It would redirect you to Azure Portal, and you will need to specify which channel you want the alert message to be sent e.g. #somechannel. Don't use direct message like #yourname, it has some problem with that and the logic app couldn't deploy for me.
Then you just follow the instruction to find the deployed logic app and authenticate it by logging into slack. And you also need get the logic app URI from the deployment output as in the instruction. Once you put the URI into the alert webhook, you are ready to go!
It's relatively easy to set up a slack webhook.
There's a pretty good C# nuget package for this at https://github.com/nerdfury/Slack.Webhooks
Although you'd need to set up a seperate service to poll and route the app insights data.
There's also commercial options.
getcloudbot.com allows you to hook your Azure Application Insights bundle directly into your slack channel. It's good at staying on top of your services.
Disclaimer : I run it.
You can configure an alert for your error messages https://azure.microsoft.com/en-us/documentation/articles/app-insights-alerts
And then configure sending to Slack using web hooks: https://code.msdn.microsoft.com/Create-Azure-Alerts-with-b938077a
Another quick solution to this, which doesn't involve additional code or a logic app, is to set up a Slack email integration, which provides you an inbound email address for a given channel. You can use that in Application Insights in the "Additional administrator email(s)" field.
This isn't perfect, as you don't really get a lot of details in the post to slack, but it will notify you and provide the name of the alert.
The most easiest path that I found to integrate was using an app named Slack Email which sends email alerts to slack. Once you subscribe this email id to alerts in Application Insights it will start sending the messages on the specific channel you have linked the email to.
https://teamesub.slack.com/apps/A0F81496D-email