On and after Version 11.6 of Questetra which has been released March 2018, it has become capable of receiving webhook (with JSON data) from other services!
It is one of the features that I have expected personally. Including Backlog which I am introducing here, the webhook feature has been prepared in quite many Web services such as kintone, Paypal, and LINE.
- A webhook is a mechanism for sending HTTP request, and in many cases, JSON data is contained in the body part, generally.
- Receiving of webhook can be said to be what referred to as Incoming Webhooks of slack. Incidentally, Questetra was also able to receive HTTP request ever since, but it was impossible to receive JSON in the body until Ver.11.6.
Conversely, Questetra is capable of sending an HTTP request. «Throwing Message Intermediate Event (HTTP)» is used for that. This can be said to be what referred to as Outgoing Webhooks of slack.
I will explain how to configure so that those can be received.
1: Overview of the collaboration of Backlog and Questetra
In this case, we assume that Questetra’s business flow starts when a comment including a specific keyword is posted to slack.
Since it seems to be no feature of filtering in the backlog webhook such as including a specific keyword, so to be precise, Questetra’s business flow is started by Backlog’s webhook regardless of the presence or absence of a keyword, and filtered on the Questetra side.
Furthermore, if you set up so that the processing result in Questetra is returned back to Backlog, you can implement a series of processing such as;
Start processing from exchanges in Backlog→ approval processing in Questetra → return the result back to Backlog.
Even though I will not mention the returning part in this article, I suppose that the article which I wrote before will be helpful.
Questetra Staff Blog: Easy Way to Achieve Collaboration with backlog
2-1: Settings for Questetra
Prepare a Business flow that Starts with «Message Start Event (Webhook)» as the following figure.
It parses JSON data which has been received at Script Task of «Parse JSON», and judges whether processing is needed (includes the keyword) at the following gateway. On and after the «Request approval» Step, there is only a simple request/approval in this example, assuming that it will be changed according to the processing content.
Regarding the setting of «Message Start Event (HTTP)», as in the following figure, to receive data in «application/json», and store it in a String type Data Item.
The following is the Script for parsing JSON.
var json = engine.findDataByNumber("0"); var object = JSON.parse(json); out = object.content.comment.content; engine.setDataByNumber("1", out);
In the Script above, JSON data is stored in the Data Item of Data number «0», and stores what acquired from there to the Item of Data number «1». Practically, you review the logic of the third line depending on what you want to get.
2-2: Setings for Backlog
Referring to the following page, set it so that it goes webhook when commented on an issue.
Backlog Support Center: Adding Webhooks
To the setting of «Webhook URL», set «Incoming URL» (in the format shown below) indicated on «Property of Message Start Event (Webhook)» of Questetra.
I suppose you now understand that you can implement the collaboration easily although a preparation of a little Script, which is not so complicated, is required. If you want to link with other services, you can adapt it by revising the Script in according with the receiving JSON data format.
Please utilize «Message Start Event (Webhook)» for further efficiency and automation for improving your business.
Please feel free to contact us via the inquiry form if you have any questions.
Apply for Free trial (Starter Plan) of Questetra
When you apply from this web form, you can create a free account for Questetra. All functions including the above are available, so please try it.