zapier is unable to send challenge value to enable slack event api - slack

I'm using zapier with slack and want to catch an event when message_replied event was created as referred here.
To use event API, it needs URL verification, which is unable on zapier webhook catching. The following error occurs repeatedly; Request URL Your URL didn't respond with the value of the challenge parameter.
Are there any workarounds?
I'd really appreciate any help you can provide.
some related informations:
app used in zapier : Webhooks by Zapier
Event in zapier : Catch Hook
feature used in slack bot : Event Subscriptions

This is not currently possible. "Webhooks by Zapier" will only respond with the default "success" response because it's intended to be used with any incoming webhook. For that product, there's not special cases for any particular service.
If you're trying to integration with the Slack Events API (something I implemented at Zapier), then I recommend writing your own web service to catch Slack hooks, do business logic, and then send relevant webhooks onto Zapier as needed. This will afford you much more control over the process.

Related

Azure bot responses to webhook

Is there a way for bot to send responses to my webhook?
Direct-line channel works fine but communication is done via websockets or via polling. I would like to have an option where bot sends responses to my rest api endpoint.
I've tried to create an adapter but in that case I have to manage all the conversations logic and incoming/outgoing messages.
What would be the best solution for this?
ps. I'm using bot composer to create bot.
There is no out-of-box way to additionally send responses to your endpoint with Composer. You can use the Send an HTTP action in composer, but that is for specific and isolated calls.
What would be the best solution for this?
Are you wanting to send all responses to your webhook? or just make calls to your webhook under certain scenarios?
I'm not sure i'm understanding the ask entirely, but if you are just wanting to send responses additionally to your endpoint (not changing the response back to the channel connector and client, etc), you could create middleware. Depending on your specific needs, you might even be able to utilize/inherit/customize the inspection middleware.

How to make Slack app send a private message via an incoming webhook to someone specific?

I created a Slack app that sends a series of interactive messages to a channel. In my Slack API dashboard, I see that I can create and remove hooks. Right now the hook url that I have set up in my code is the one for the Slackbot channel.
But the problem is that such a message only gets sent to me.
I want to send the Slackbot messages to Alice in situation A, and to Bob in situation B. Not just to myself, the guy who configured the app.
What's the best way to do this?
I would suggest that you should not use hooks for this. A more sane way to do this right would be via chat.postMessage Web API method which is documented here!
This is because hooks are tied to specific conversations and that approach quickly hits a wall on what it can really achieve, especially messaging different people. Once you start using the web API it's pretty simple. Just ask for the scope during app installation (remember to add that scope in your dashboard), subscribe to the event in your API dashboard and then you are good to go.
Everytime you send a message via that method, Slack will send you a payload which you can use for testing and logging etc.
You can see all the different ways to message programmatically inside Slack here.

How to get message events published on a Web API endpoint and feed it to bot framework v4 (C#, .Net Core Bot)?

I am using a third party API to provide Agent Handover (human chat) capabilities to my v4 based bot. The API requires a call back hook/ endpoint where it can send the messages/events back from the agent, and I have to get messages from it and display to users. When ever a new chat session is established a new session id is generated. And thus Session Id is passed back in all messages and events. Essentially they are sending events as Fire&Forget with a retry on failure.
For now I had implemented an eventstore (in Cosmos dB) to store events/messages and then poll Cosmos periodically display message back to user and mark them processed.
Is there any way to make it more real time or pub-sub kind of analogy?
I would like to know if some one have already implemented scenario like this. What should be the way to respond the incoming messages from agent to bot user.
Please suggest.
I would recommend creating a client using the Direct Line API to handle routing messages between the third party agent handover and the bot. Then in the bot you can pair the third party Direct Line conversation references with the user's conversation reference to forward the messages accordingly with proactive messages. For more details take a look at this Stack Overflow question.
Hope this helps!

How to make Slack Bot not respond to all the messages in the private group?

I want my bot to respond only if anyone mentions its name like #mybot.
How to achieve this?
For that you need to use the Events API and subscribe to the event app_metion.
That way your app will receive all message that directly mention your bot with #mybot.
Those messages will be sent as request from Slack to the endpoint provided for receiving events.

Regarding uable to trigger Paypal REST API webhook events from developer sandbox

What is wrong with my Paypal sandbox account process
to receive webhook notifications? We are unable to receive webhook event on
my URL.
URL working with "Webhooks simulator". Please let me know what
should I do for receive webhook event on above URL.
Webhooks simulator sends sample payloads for the events you configured. It does not send a notification on triggering of an actual event.
If you are getting notification via Webhooks Simulator, it means the URL configured by you is able to intercept POST requests.
Now for the "Paypal sandbox account unable to process to receive Webhook notifications" part, please check if the transaction is actually created at https://developer.paypal.com/developer/dashboard/sandbox/ . If the transaction you are looking for is not present there, there won't be any notification generated. In case transaction is present there and still you are not getting any notifications, please share debug id.
Here is a silly thing that I overlooked in the documentation and only found out after contacting support.
After you've followed the approval url and gave your approval, dit you execute the payment with the REST API?
https://developer.paypal.com/docs/api/payments/#payment_execute
Webhooks are only called after you've executed the payment.
The confusing part is; there is no webhook being called, when a user approves or cancels a payment. There is only a redirect back to a return url or cancel url. So you either need to monitor the redirect back to your site and trigger the execute call then, or find another way (like polling the payment) to see the status change before calling the execute call.

Resources