Question

text version of last public note for web request workflow activity

  • 21 February 2023
  • 0 replies
  • 83 views

Similar to #11247 but with the last public note field instead of the description field.

I’m trying to send the last public note to a web service using the Web Request automation action.

This template

{
  "status": "{{ticket.status}}",
  "note": "{{ ticket.latest_public_comment | sanitize_html }}"
}

allows me to get the HTML version of the last public comment, but I’d really prefer to get the text version.


Note the workflow execution log shows the request body w/out the html:

{  "status": "Open",  "note": "John Smith : new note"}

But it comes through as:

{
  "status": "Open",
  "note": "John Smith : <div style=\"font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif; font-size: 14px; \"><div>new note</div></div>"
}

 

GETting the conversations for a ticket, i can see there is such a field in the conversation body.

            "body": "<div style=\"font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif; font-size: 14px; \"><div>new note</div></div>",

            "body_text": "new note",

 

Is it possible to get the text-only version of the last note within the Web Request action?

I tried a quick Liquid script, but either I flubbed it or I just don’t know the right properties to access.


0 replies

Join the Community or User Group to Participate in this Discussion

Reply