Is it possible to add some custom data to the event payload body or headers sent to a Bitbucket webhook? - bitbucket

I want to add a few strings to the existing event payload that is delivered to a webhook. It doesn't matter if i can send them in the payload body or as Custom HTTP Headers.
I've checked the documentation of the event payload and I've checked my webhook settings but i'm not able to find any clues which would allow me do such a thing so I'm wondering if it is even possible.
I'm using Bitbucket cloud.

Related

Do WooCommerce Webhooks send X-WC-Webhook-Signature header on save?

I'm trying to add a WooCommerce Webhook to hit an endpoint on my Ruby on Rails API. I can see in the logs that it is hitting the endpoint when I save the Webhook in the WP dashboard, but when I inspect said request I don't see the X-WC-Webhook-Signature header included with the other headers.
Does this header not get sent when it does the trial ping on save, and only when it is actually triggered by the Webhook's topic?
WooCommerce does not send the X-WC-Webhook-Signature header when the webhook is saved (see links below, courtesy of Kaperto).
deliver_ping is called when a webhook is saved)
and
deliver is called when the webhook is actually triggered)

Can I trigger an API call?

My boss tells me we're getting Zendesk. I have no experience with it. We want to have it notify our system, e.g. via a call to an API which our system could expose.
Can this be done? Would I instead have to poll the Zendesk API?
Push notifications in web-applications are also known as "Webhooks". Zendesk does have a Webhook API, documented here:
https://developer.zendesk.com/embeddables/docs/android/handle_push_notifications_wh
and
https://developer.zendesk.com/embeddables/docs/ios/handle_push_notifications_wh
(Ignore the iOS and Android references - it's platform agnostic)
You can set up a combination of a Trigger and and External HTTP Target that sends an HTTP request to your API.
It will basically works like this:
You configure the external target to direct requests to the url of your API.
You configure the trigger with:
some conditions to look for (such as a ticket being updated with a specific tag), and
an action to perform when the conditions are met. In this case the action will be to send an HTTP request (with a JSON body) to the external target mentioned above.
Then, when the trigger's conditions are met, the trigger will send an HTTP request to your API endpoint.
You can add dynamic data to the JSON body of the request, such as the ticket number, user data, etc.
This article also might be helpful:https://support.zendesk.com/hc/en-us/articles/204890268
Note: External Targets are not currently available on the "Essential" Zendesk product, only "Team", "Professional", and "Enterprise."

Mandrill Status: queued

I'm testing the Mandrill API and sent an email to my GMail account. In the API logs, it says:
"status": "queued"
According to https://mandrill.zendesk.com/hc/en-us/articles/205582717-Why-does-a-delivered-message-say-queued- :
most times Mandrill can send email much faster than recipient servers
are able to accept or process it
GMail is not able to handle my one email that I sent?
A queued response in the Mandrill API is not the same as a queued response from a recipient server.
When you send a message through Mandrill, you first relay it to Mandrill, Mandrill processes it, and then Mandrill relays it to the recipient server. This all happens quite quickly, but the two relaying steps are separate and distinct. The KB article you've linked to is providing additional details on that last step, relaying to recipient servers, not a queued status for the Mandrill API.
There are a number of reasons the Mandrill API may respond with queued including if you've added attachments or if you're sending to a bunch of recipients in a single API call.
Without seeing the actual API call that's being made, it's hard to say why you're getting a queued response. But if you're using the sample messages/send API call, you'll want to remove all of the optional parameters that you're not actually setting. For example, the sample has fake attachments, and a subaccount specified. The attachment will cause the call to be processed async. The subaccount probably doesn't exist, and would then cause the call to fail. So if that's the case, try removing all of those optional params. If not, please provide the API call you're making with sensitive data redacted (API key, actual email addresses).
The reason might be either hourly/monthly quota is over or you are using same multiple accounts for single public ip server.

Using Twilio to respond to an SMS with a http redirect to an external webapp

so, when i send a text message to twilio number, i want it to trigger a specific event in the webapp via http POST. For example, by making a http call to the webapp URL (http://webapp.com/triggerA) which it process to trigger an event A in the webapp.
Can I do this with twilio? If,so is there a sample piece of code which I can refer.
From what I understand from your question, I think you can do the following.
With Twilio, when you login into here
https://www.twilio.com/user/account/phone-numbers/incoming
You will find a list of your incoming numbers, I am assuming that you have already purchased a number. Once you click on a number in the list, you will find a page that where you can view and set various properties for the number you are looking at.
You will see a header called Messaging. Under that menu you will see a request Url.
you can set this to http://webapp.com/triggera as per your example. you can also choose whether you would like to use a http post or a http get request type.
the link below, will help you further for handling the data that Twilio passes your application.
https://www.twilio.com/docs/api/twiml/sms/twilio_request
Louis

How to correctly indent original mails with ActionMailer/Mailgun

I'm currently receiving emails with Mailgun API and I'd like to automatically respond to any received email.
I've already defined the header params In-Reply-To and References in the autorespond emails and that kinda does the job, but I'd also like to indent/quote original text below my reply for other mail clients (like Mail.app on the iPhone) which don't stack emails correctly.
Any suggestions/tips on how I can accomplish that?
Thanks.

Resources