Does anyone have a functional demo creating a ServiceNow ticket in workflow? My prototyping is failing with essentially no debug info except for:
“error parsing the response body: invalid character ‘<’ looking for beginning of value”
I’m sure my configuration is lacking but documentation on this action is pretty limited. Hopefully the workflow team has future plans to leverage peoples existing investment in the ServiceDesk Ticketing integration.
I don’t think there’s anything you can do to resolve this. The workflow engine is having trouble parsing the response because it contains a character it didn’t expect. If you haven’t already, please open a support ticket and provide your workflow script so they can identify what is going on.
I was seeing this same problem and to be honest the documentation on the Manage ServiceNow Ticket node could use some attention. Some things I have discovered:
Manage ServiceNow Ticket is calling …/api/now/v1/table/incident behind the scenes. If that doesn’t match your requirements you’ll need to switch to using HTTP Request node(s)
If you switch to using HTTP Request node, be aware that the authentication provided by the HTTP Request node does not support a grant_type of ‘password’, which is required by the ServiceNow API. You will need to manually create 1 HTTP Request that authenticates to ServiceNow and then use the token from that request in a second HTTP Request that opens the ticket.
Having the same error, i’m unable to discern what the issue is as the json appears to be valid in my test cases. Was there ever any success in getting the Manage Ticket action to work?
Please check with your Service Now team whether they are blocking/white listing any IPs from creating tickets. In our case it worked once the IP was allowed access.
Hey @colin_mckibben@brad_grutsch
How to utilise HTTP action in workflow as two step process to achieve grant_type 'password' ?
Could you please help me with that? Should it be a custom authN and what will be the header key and value? All I have is client_id, username and password.
Thanks!
It doesn’t appear that our instance has any block or ip whitelisting rules for this - still getting the same error of “error parsing the response body: invalid character ‘<’ looking for beginning of value”
where would I find logs of this in servicenow to validate the attempted connection? i’m not seeing anything obvious and I’ve yet to successfully use this action, HTTP requests work fine, albeit a little extra work to setup.
You can ask Service Now team to check logs on their end for the request received and response being sent, that usually helps. Also, turn on ccg logging in IDN to see additional details for this request.
One note @Tellius is that the table name for the task table is just task, and sc_task is the Catalog Task table. Catalog tasks are typically child objects of Requested Items (sc_req_item), which are typically child objects of Requests (sc_request).
In my experience, it’s best practice not to create a service catalog task directly through the table API, but to submit a request for a catalog item using the Service Catalog API. The order now method is something we use.
The requested item workflow in ServiceNow will then typically create the Service Catalog task
Thanks @mcheek. I will definitely give that a go. My plan was to talk to my local experienced ServiceNow dev on the team when he was back on deck. Thanks for the assist!
Just a quick query @mcheek - have you got the Service Catalog Order now method working with the “Manage ServiceNow Ticket” action in Workflows or did you do it all via the HTTP action? I would love to see some of the configuration you did to get it working if you were up to sharing.
We aren’t actually entitled to the workflows feature, so I don’t have an example where we use this, so I’m not sure what attribute the “manage ticket” action is looking for in the payload