Using a combination of Webhook and either an automation or a trigger, you can automatically send a comment in a Zendesk ticket. Since there is no native feature for automatically sending a public reply or an internal comment, you need to use a webhook.
If you are using 2FA or SSO, logging in via token or OAuth is required to bypass those security settings. If you don't have any of those 2 (2FA or SSO) setup, you can use the Zendesk email and password.
For more details: https://developer.zendesk.com/documentation/ticketing/using-the-zendesk-api/using-the-api-with-2-factor-authentication-enabled/
- Go to Admin Center > Apps and integrations > APIs, then select Zendesk API.
- If Password access and Token access are not enable in Settings tab, enable them both.
- Click Add API token.
- Add a description for the API token. Make sure to copy and store the token by clicking the Copy button to the right of it. You will need this API token later so save it somewhere. Once you click Save, you will not see the full token again.
- Now create a new webhook. Go to Admin Center > Apps and integrations > Webhooks > Create webhook. In Step 1, select Trigger or automation, then click Next.
- In Step 2, enter the information as below:
- Name - any name that make sense to everyone.
- Endpoint URL - https://[subdomain].zendesk.com/api/v2/tickets/{{ticket.id}}.json
- Method - PUT
- Request Format - JSON
- Authentication - Basic authentication
- Username - [email address]/token (If you are using SSO or 2FA to log into Zendesk , set it up with this information. If not, use your ID and password for Zendesk log in.)
-
Password - [API token]
- Click Create webhook.
- Now go to Admin Center > Objects and rules > Business rules > Triggers or Automations.
- Click Create trigger or Add automation.
- Add conditions and other actions as needed.
- Under Actions, add an action "Notifications: Active webhook" or "Noify by > Active webhook".
Action for Automation
Action for Trigger
- Select the webhook you just created.
- In JSON body, add below:
{
Change the message next to "body" to whatever the message you want to add.
"ticket": {
"comment": {
"body": "Thank you for your inquiry! We are now working on your ticket. We will get back to you as soon as we have updates for you!",
"public": true
}
}
}
If you want to send a public reply, enter "true" next to "public". If you want to send an internal note, enter "false". - Click the Create button to save the new trigger or automation.
Comments
0 comments
Please sign in to leave a comment.