Create Jira ticket when responses is received - via API/WebTask workflow | XM Community
Skip to main content

Hello everyone,

I’m having an issue setting up API calls from Qualtrics using Workflows and Web Service Task to create a Jira ticket once response is received.

We can’t use Jira extension, because we have standalone Jira installation that is not connected to the Atlassian login page, therefore we have to use API calls.

I have a project created in Jira, service bot created, API token generated, when I run plain API call like this one:
 

curl -D- -H "Authorization: Bearer <token>" -H "Content-Type: application/json" -X POST --data "fields.txt" https://our_jira/rest/api/2/issue/

 

Fields:

{"fields": {
       "project":
       {
          "key": "<projectname>"
       },
       "summary": "REST ye merry gentlemen",
       "description": "Creating of an issue using project keys and issue type names using the REST API",
       "issuetype": {
          "name": "Bug"
       }
}
}

 

This results into successfull creation of a new Jira ticket.

When I try to set it up in Qualtrics:

  • Create New Workflow, based on event - new response, Web Service Task - authenticated, API token - and I paste my token

  • in Web Service:

    • Request - POST

    • URL - the same URL as I used above

    • Headers: 

      • Content-Type – application/json

    • Body: Json – Key-value pairs

      • project – the same project name as above

      • description – whatever text

      • summary – whatever text

      • issuetype – Bug

    • All values in Body are either system default or string

  • Then I run Test and get following (that does not tell you anything):

  • Status: 500 Internal Server ErrorTime: 693 ms

  • {"errorMessages":r"Internal server error"],"errors":{}}

 

I’m quite new to setting up API calls, please bear with me. However, I think I’ve „parsed“ all the values from original API call to the Qualtrics UI as I was supposed to. Or am I missing something?


 

Thank you.

I would suppose that Qualtrics passes the API token on it’s own so I don’t have to use it in Headers like “X-API-TOKEN” and piped text. 

Little correction, the original API call is:
“curl -D- -H "Authorization: Bearer <token>" -H "Content-Type: application/json" -X POST --data "@fields.txt" https://our_jira/rest/api/2/issue/” that works (I forgot to type  @ here).


Leave a Reply