Is this idea even possible with Liquid Code and Notify Target?

3 コメント

  • Jeremy Heath

    How about this, does that look about right?

    Not sure about the else at the end is it needed?

    {% assign hour= 'now' | date:'%k' | plus: 0 %}
    {% if hour > 8 or < 16 %}
    {
    "username": "[ {{ticket.id}} ] Created By {{ticket.requester.name}}",
    "icon_emoji" : ":test:",
    "channel": "test",
    "text": "{{ticket.created_at_with_time}} \n <@Slack User>"
    }
    {% elsif hour > 16 or < 18 %}
    {
    "username": "[ {{ticket.id}} ] Created By {{ticket.requester.name}}",
    "icon_emoji" : ":test:",
    "channel": "test",
    "text": "{{ticket.created_at_with_time}} \n <@Slack User> <@Extra Slack User>"
    }
    {% else %}
    {% endif %}
    0
  • Jeremy Heath

    The Answer seems to be No

    The box for feedback to Slack is JSON.

    So the html liquid code doesn't work.

     

    Hopefully someone will have another way..

    0
  • Andreas Schuster
    Community Moderator

    Hi Jeremy,

    Maybe it's a bit of a long-shot, but when I don't manage to achieve something the easy way with Zendesk, I'm quickly setting up a Google Script Project which you can use as a relay between Zendesk and any 3rd party service there you can implement such a time filter with simple JavaScript. Most of times it's a single JS file with less than 100 lines of code.

    For example in my side project here, I am also filtering for business hours.

    Cheers,

    0

サインインしてコメントを残してください。

Powered by Zendesk