Get ticket body as HTML via API | Community
Skip to main content

Get ticket body as HTML via API

  • December 1, 2022
  • 6 replies
  • 0 views

Oriol11

Hello,

We receive emails from providers which create a ticket in Zendesk. I am looking for a way to obtain that original email's body as HTML via API. 

I can get the ticket's description but that gives me the contents of the ticket as plain text, but not the HTML.

Another option would be to have a trigger that can call an external endpoint, and include that HTML body in the call's payload, but I couldn't find this either.

Is there any way to do this?

Thank you

6 replies

Eric27
  • December 1, 2022
Hey Oriol,

Can you explain more about your use case? At this time there isn't a way for you to pull the emails html via api. 
 
Sorry for the inconvenience, 

  • December 2, 2022

Hi Eric,

My goal is to append the HTML of the original email and insert it into a new email of my own. This will be used to notify someone that we received information for them.

Thanks


Eric27
  • December 2, 2022
Hey there,

You could use our native trigger feature to accomplish this. This combined with simplified email threading sounds like it's exactly what you're looking for. 
 
Hope this helps,

  • December 5, 2022

Hi Eric,

This looks good, we will give it a go. Thank you!


  • February 27, 2023

Hello,

We would like to be able to pull the ticket body as HTML as well.

Our use case is that we're using the Zendesk connector in Microsoft Power Automate to create a ticket in Azure DevOps.  The ticket contains the ticket body (description), but it's in plain text as Oriol mentioned.  The customer support reps then have to format the Azure DevOps ticket manually, which adds extra time.

Are there any plans to add this functionality to the Zendesk API anytime soon?

Thank you.


  • February 28, 2023

@oriol11

You could query the Ticket Comments endpoint.  It returns an array.  You could grab the first element in the array, and then grab the `html_body` property.

https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/#list-comments