ZenDesk API

Hi all, Hope someone can help.

I’m using the http request activity

I’m trying to Update a ticket by applying the changes a macro would make to a ticket, I’m using successfully this API call:
https://developer.zendesk.com/rest_api/docs/support/macros#show-changes-to-ticket

to show the changes a macro would make to a ticket:

{
“result”: {
“ticket”: {
“assignee_id”: “360063351XX9”,
“group_id”: 36000010XX58,
“status”: “open”,
“fields”: null,
“collaborator_ids”: ,
“follower_ids”: ,
“comment”: {
“body”: “

This ticket has been escalated from Robot

”,
“html_body”: “

This ticket has been escalated from Robot

”,
“public”: “false”
}
}
}
}

It states on ZenDesk API page:

You can use the response data in a subsequent API call to the Tickets endpoint to update the ticket.

I’m then using this API call: Tickets | Zendesk Developer Docs (/api/v2/tickets/{id}.json)

to Update the ticket I’m passing the end point “https://Subdomain.zendesk.com/api/v2/tickets/1336454.json
Method: PUT
with a valid Authorization header

and my result json as above,

any ideas where I am going wrong?

Error Message I’m getting:

{
“error”: {
“title”: “Invalid attribute”,
“message”: “You passed an invalid value for the ticket attribute. Invalid parameter: ticket must be a hash”
}
}

Hi,

Did you managed to solve it? I tested it with Postman API and seems like I need to pass it in JSON format.

In addition, we need to remove “result”: { } before passing it back

Yes, was trying to pass the JSON into a parameter but it needed to be sent in the body and it worked. I also found when applying a macro via api some mandatory custom fields were not included so I had to add these into the JSON before sending.

1 Like

Glad to know you managed to work it out. Do you happen to know how I can retrieve the values from selected ticket and custom fields from the Zendesk ticket?

Hi there!

May I know how you managed to connect Zendesk on UiPath? I could do so with Postman API but not with UiPath. Did you use HTTP Request or Zendesk Package?

Thank you, and look forward to hearing from you!

Hi I used the API call. feel free to upload an example xaml file and I can take a look.

Hi @cwedl, I managed to utilise HTTP Request to obtain access.

However, now I’m experiencing similiar issue; not able to pass the JSON parameter to the body. May I know how you did it?

I thought if my postman API is successful, I would be able to mimick it on UiPath. However, to no avail.

Bro, do you know how to upload an image attachment when updating a ticket via http request? Can you help me with this?