This doc said I could use card/image/mention response using outgoing webhook but there is no example other than simple reply.
I also tried json response
But my bot says
Sorry, there was a problem encountered with your request
This works!
Any other examples...?
Related
I am trying to replicate the FYI bot and I am stuck at the below step. I need help with the code on how to send a post request to irccat.etsy.com using slack outgoing webhook.
I was able to create outgoing webhook but I am not sure what to keep in URL and also how to send a post request to irccat.etsy.com
Step I am trying to implement:
"When the :fyi: reacji is added to a Slack message (or the ?fyi irccat command is used), an outgoing webhook sends a POST request to irccat.etsy.com with the message details. This triggers a PHP script to save the message text to a SQLite database, and sends an acknowledgement back to the Slack incoming webhook endpoint. The acknowledgement says “OK! Added your FYI”, so the user knows their FYI has been successfully added to the database.
This App cannot be implemented using Events API so below is how I configured the Outgoing webhook. Outgoing Webhook
I need lead to use URL of outgoing Webhook and generate a post request to irccat.etsy.com
you can refer this: https://realpython.com/getting-started-with-the-slack-api-using-python-and-flask/
its like:
Add a new function under channel_info named send_message:
def send_message(channel_id, message):
slack_client.api_call(
"chat.postMessage",
channel=channel_id,
text=message,
username='pythonbot',
icon_emoji=':robot_face:'
)
send_message takes in the ID for a channel, then posts a message from our “Python bot” to that channel. In addition, modify the main function so that when we run this file, main will call our new send_message function:
I want to trigger an intent/event in Dialogflow [from my webhook/server] and have Dialogflow send a request to my /webhook instead of just responding to the POST request that I made which triggered the event. Is that possible? I want to send the user a message based on their input in our web application, but the response types could vary greatly so I can't define the message and payload in the DF web panel.
edit: [in brackets]
Yes, Dialogflow can send information to a webhook - it refers to this as fulfillment.
Keep in mind that the JSON sent by Dialogflow will be in its format, not yours, and it expects a reply in its format as well. This reply will include the message to be sent back to the user (the response to the original POST request).
I want to forward any sms messages incoming to my Twilio (virtual) number to an email address using Twilio functions. How would I go about that?
Twilio developer evangelist here.
You absolutely can forward incoming SMS messages to email using Twilio Functions. I actually wrote a blog post on how to forward SMS as email. This particular post uses the SendGrid API to send the message, the full code is available, with instructions, on GitHub.
If you wanted to use a different service to send the email you can. There is a pull request right now that I need to review where someone added SparkPost support. As long as you have a service that you can call as an HTTP API, then you can use the code and just adjust the payload.
Let me know if that helps at all.
So, I've been making some research on this, and found these info:
Whenever a message is sent to a twilio number, also an http request is sent to the twilio server, and this server saves the message that was sent to the number.
To access that message that server is holding
We are using this code down below.
const MessagingResponse = require('twilio').twiml.MessagingResponse;
const response = new MessagingResponse();
const message = response.message();
message.body('Hello World!');
response.redirect('https://demo.twilio.com/sms/welcome');//you need to have your own document
console.log(response.toString());
The message is being redirected to the link that we have specified there, and it must be a twilio link, you can create a link from here
And all you have to do is read the message and enjoy it! For more info, please see https://www.twilio.com/docs/api/twiml/sms/your_response
I set the webhook of my Telegram Bot and it seems to work fine, but the bot doesn't reply when I try to write him. The code of the file I indicated as webhook is correct (I checked it with getupdates method) and the server where it's hosted has the SSL certificate.
Trying to see the result of the method getWebhookInfo I checked up that the error was "Wrong response from the webhook: 410 Gone".
Anyone could help me to find out where the problem is?
I recommend you to copy the url you received from getWebhookInfo and then POST some valid JSON to it (e.g. on linux with curl, examples here: Telegram Guide).
WRON RESPONSE FROM WEBHOOK indicates that there is a problem with your web server configuration or something elso on the way in.
"410 Gone" is returned by your webserver, so maybe your .httaccess config is wrong (if using Apachee).
I'm writing a mobile notification system using twilio in node.js and I am currently able to send SMS messages to users. But I would like users to reply back with a response. I would need to gather the phone number the user sent the text from as well as the contents of the message (to query my mongoosedb)
I couldn't find much info on this so any help is appreciated.
Twilio evangelist here.
Check out this blog post which introduces you to our Node helper. If you scroll down to the section titled "Generating TwiML to handle inbound calls and SMS", it will walk you through receiving an SMS message from Twilio.
The basic idea is that when your user replies to your message, Twilio is going to tell you that by making an HTTP request to some URL that you have configured for your Twilio phone number. That URL is some endpoint that you have created in your Node app.
As part of that request, Twilio is going to pass some form parameters to you. In your going to use the request object that is passed into the POST function to get the parameters that Twilio passes you:
console.log(request.body.from);
console.log(request.body.to);
Heave over to this page on our website to see all of the parameters Twilio will send you when we
Hope that helps.