Example: Integrating the HTTP Target with Slack Follow

Comments

11 comments

  • Avatar
    Bart Brosens

    thanks for the great post Steven!

    I was wondering...is there a way to notify a target with the latest comment in a zendesk ticket?

    I don't see it in the available placeholders.

    thx

    Bart

     

  • Avatar
    Nicole - Community Manager

    Hey Bart - 

    You should be able to do so. You just set up the target, and then it's triggers that do the work. More info can be found here: 

    Notifying external targets

  • Avatar
    Jay Kershner

    Great example, how do I add the following variables into the slack post.  I set up a trigger to send all of this via email, but would prefer to have it go to Slack....  Any help on what the JSON code would be? 

    Thanks!

     

    Requester: {{ticket.requester.name}}
    Assignee: {{ticket.assignee.name}}
    Ticket #: {{ticket.id}}
    Rating: {{satisfaction.current_rating}}

    Comment: {{satisfaction.current_comment}}

  • Avatar
    Jessie - Community Manager

    Hi Jay!

    Rather than sending to email, you need to have it send to the HTTP target you create to send info to Slack. The very last image in the article shows what the JSON looks like. That should get you where you need to go!

  • Avatar
    Jay Kershner

    @Jessie -

    I know you need to send to HTTP target.  I got that working, but I want to sen other fields from ZD to Slack, like I set up with my email trigger.  See below.  What does the JSON code look like if I want to add these fields?

    Requester: {{ticket.requester.name}}

    Assignee: {{ticket.assignee.name}}
    Ticket #: {{ticket.id}} 
    Rating: {{satisfaction.current_rating}}

    Comment: {{satisfaction.current_comment}}

  • Avatar
    Jessie - Community Manager

    Hey, Jay! Sorry I misunderstood your question.

    I was able to find some documentation about formatting incoming webhooks in Slack's API resources, so that should help you get started.

    Based on the screenshot example above, it looks like you can use regular ZD placeholders to send that information over, but I'll see about getting one of our Community Moderators in here to verify that for you!

  • Avatar
    Lara Palmer

    @Jay or @Jessie

    Did anybody ever figure out the answer to Jay's question?  I'm trying to do the same thing - add additional fields to what Zendesk sends to Slack.  I tried adding it right in the Zendesk JSON but Slack doesn't interpret it.  I believe I probably have to dork with the JSON URL in the slack webhook as well as the JSON in the Zendesk trigger but there I'm not finding any information on how to manipulate the JSON URL in the slack webhook.

     

    Thanks,

    Lara

  • Avatar
    Lara Palmer

    Never mind:  https://thecoolway.net/2018/01/13/advanced-zendesk-notifications-in-slack-using-incoming-webhooks/

     

    I also see that Zendesk and Slack have collaborated to do a new integration but you have to be a certain level customer with Zendesk and it still seems kind of locked down on what fields you can display.

  • Avatar
    Jay Kershner

    Finally got escalated to T3 support, Garrick killed it and helped me customize JSON to get what i need.   Here's what you need if you want to send CSAT/DSAT notifications to your team via a Slack Channel...Really speeds up the investigation/feedback cycles.

     

    { "text": "DSAT received on {{ticket.url}}, [Assigned to {{ticket.assignee.name}}] [Customer = {{ticket.requester.name}}] [Comment = :\n{{satisfaction.current_comment}}]" }

  • Avatar
    Nicole - Community Manager

    Glad to hear you got the help you needed, Jay! Thanks for sharing the answer. 

  • Avatar
    Dan Ross

    For users playing with shaping JSON to send to Slack or other services, you may find https://jsonlint.com/ to be invaluable. You can enter and validate that the JSON is structurally correct, which is handy because if you send bad JSON to Slack, you don't get a ton of information about what broke. 

Please sign in to leave a comment.

Powered by Zendesk