Question

Slack Webhook Formatting

  • 13 September 2023
  • 4 replies
  • 29 views

Badge

I am able to generate some nice webhooks thanks to this post by @MattHenry.

 

HOWEVER, my posts in slack are showing up as URL encoded. Here’s my Body:

{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "{Ticket.TicketNumber} - {Ticket.TicketSubject} ({Ticket.TicketPriority})",
"emoji": true
}
},
{
"type": "divider"
},
{
"type": "context",
"elements": [
{
"type": "image",
"image_url": "https://pbs.twimg.com/profile_images/625633822235693056/lNGUneLX_400x400.jpg",
"alt_text": "cute cat"
},
{
"type": "plain_text",
"text": "{Ticket.TicketStatusName}. Response Time: {ServiceLevelAgreementResponseTime} | Resolution Time: {ServiceLevelAgreementResolutionTime}"
}
]
},
{
"type": "section",
"text": {
"type": "plain_text",
"text": "{Ticket.IssueDescription}"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": "View Ticket",
"emoji": true
},
"value": "open_ticket",
"url": "https://MYORG.incidentiq.com/agent/tickets/open?flyout-type=agent-ticket&flyout-id={Ticket.TicketId}",
"action_id": "button-action"
}
}
]
}
Here’s what’s Generated

 

 

FINALLY, does the Webhook simulator actually work for anyone? It says it sends the webhook, but it’s never recieved unless I actually create/update/resolve a real like ticket, which is tedious…


4 replies

Userlevel 6
Badge +10

Thank you for submitting your question. Tagging some of our experts here @MattHenry @bclark @Cozmo03 @mcsdwes @DWOLKE 583e654 isd191 to see what they have to say! 😄

Userlevel 5
Badge +8

Referring to the Webhook Simulator. I just tried it and I got the same thing you’re seeing. It said it sent but it never actually did. I don’t know if that’s because it’s a simulator or not. 

Badge

@MattHenry Thanks for the great post to get this all working….

 

@bclark @Cozmo03 @mcsdwes @DWOLKE 583e654 isd191Does anyone know why all my messages are URL encoded, not plain text?

Also, is there a variable to pull the most recent comment so I can display that instead of the description to make this post more useful when a ticket is updated?

 

 

Userlevel 6
Badge +10

@BLevien 3901dca seaburyhall If this continues, I would suggest putting a ticket to support to help you with this! 😄

Reply