Can I configure a trigger to add a comment to a ticket?

Return to top

96 Comments

  • Andy Seaman

    Amazing! Thanks Walter.

    A couple of edits from my last post.

    I realised that if you use "author_id", it adds a message to the external email that says "This comment was submitted by [uses Webhook credentials] on behalf of the author".

    If you do not want this string to appear in the outgoing message, you can change "author_id" to "submitter_id".

    I have also since found out that if your trigger also closes the ticket, you can create a second 'notify active webhook' action to set the ticket to closed in the same action.

    1
  • GrowthDot

    Hi Ricardo Pinto,

    You can automatically add comments to specific tickets with the Proactive Campaigns app. It has a new automation feature, so you can use it to send emails and add internal notes in bulk. The app adds internal notes when tickets enter the list filtered by specific criteria. It's extremely simple to use!

     

    0
  • Marleen de Smet

    Lou This might seem a bit forward but.. could you check my JSON code? 

    We want to use a webhook to put data from a custom ticket field into a custom user field. The webhook works, and the JSON seems valid. However the custom user field is not updated. Looking at the response text in the webhook there seems to be an issue with the placeholder I've used a placeholder for the custom user field. 

    Here's my JSON:

    {
        "user": {
            "id": "{{ticket.requester.id}}",
            "user fields": {
                "telefoonnummer_": "{{ticket.requester.custom_fields.9688774826641}}"
            }
        }
    }

     

    Hope the question makes sense. Thanks! 

     

    0
  • Walter

    Hi Marleen de Smet,

    I'm not Lou, but maybe I can help.

    Try using this endpoint:

    PUT

    https://your_subdomain.zendesk.com/api/v2/users/{user.id}

    (Note: The user.id must be an integer.)

    with the following JSON body

    {
        "user": {
            "user_fields": {
                "telefoonnummer_": "{{ticket.ticket_field_9688774826641}}"
            }
        }
    }

    That is assuming that 9688774826641 is the ID of your custom ticket field.  If it is not, replace it with the ID of your custom ticket field.

    1
  • Marleen de Smet

    Hi Walter, 

    That did the trick. Thank you! 

    1
  • Brett Bowser
    Zendesk Community Manager
    Thanks for sharing this solution Walter! Much appreciated :).  
    0

Please sign in to leave a comment.

Powered by Zendesk