How to format a comment when using Notify active webhook action?

Respondido


Publicado 08 de set. de 2022

I'm hoping someone on the community has successfully done this and can give me some tips!

Objective: Using a trigger, we want to send automated messages to customers that include some text formatting (e.g. line breaks, bullet points, hyperlinked text, bold, italic, etc), and that it is visible as a public comment in the ticket.

What we've tried: We have used the "Email user" trigger action in the past, but this does not send a public comment in the ticket, only an email to the customer. This means the agent can't see it in the ticket (in Events they can see an email notification was sent, but the message itself is not visible in a readable way), and the customer can't see it in the Requests ticket page (https://{help center domain}/requests/{ticket-number}).

Where we're stuck: Using the "Notify active webhook" trigger action, we are able to send a public comment to the ticket, but it must be in JSON format. The blocker is we have not figured out a way to send "formatted" text via JSON and have Zendesk translate it to nicely formatted  text for customers.


1

11

11 comentários

Could you include the code example as text?

0


Thank you all for this thread, this just walked me through getting this setup for a similar solution.

0


Hi 1263213551449 👋

Glad you were able to work it out with 1263213544949!
Ironically, my message was stuck in moderation, so it showed up late to the party.

0


1263169425010! Not sure how I missed your message. Thank you for including that! I had done some digging in HTML > JSON conversion and came across the whole "escaping" characters. The article you linked was much friendlier, I'll keep it in mind for another use case. For this particular one, I'd recommend Lou's alternative. 

0


1263213551449

That's awesome. I'm glad I could help. Many times when I go into a target or webhook, the credentials disappear for some odd reason, so any time I mess with them, I reenter my credentials just in case.

0


1263213544949 yesssss!!!! That did it! Your credentials comment made me think of a time username+pw wasn't working, so I had used Username = {email}/token / Password = {API token}. And that fixed the error, and then I used Markdown to format the comment (in case someone stumbles on this question, currently it says links (hyperlinked text) isn't supported yet, but it is!). So this worked! Thank you so much!

0


1263213551449

Also, if you have the API token set up, check it for failures. Might be a clue there. Here's an example:

If I click on this failure, the details open up and tell me what's going on:

The trigger was trying to fire on a closed ticket after it automatically closed. I was able to fix it by adding a condition to the trigger.

0


1263213551449

Here you go:

Some of the URL is cut off. It's https://yourdomain.zendesk.com/api/v2/tickets/{{ticket.id}}.json?ticket[comment][public]=true

Also, below the screenshot is where the authentication is input. A few things to check:

  • Make sure you have an API token set up in your instance
  • Make sure you're using the https address of your instance
  • Make sure you have authentication set up (login credentials)

 

0


Hi 1263213544949! Thank you for that response! I see a light at the end of the tunnel! I tried it but I'm getting an "Error during transmission: HTTP client call failed" when testing, but I'll check with a dev and keep trying. Can I bother you with a screenshot of your URL target configuration (with domain blanked)? Just so I can check I'm not just making one of those classic user errors over here.

0


Hi Alex,

Just a quick note here on making HTML conform to JSON standards, I use the below article as a reference whenever I need to do such things - hope it helps you out.

4 Things You Must Do When Putting HTML in JSON - Thorn Technologies

1


Entrar para comentar.

Não encontrou o que estava procurando?

Nova publicação