Skip to main content
Solved

Slack Webhook Formatting

  • September 13, 2023
  • 9 replies
  • 277 views

Forum|alt.badge.img+1

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…

Best answer by JMONAHAN 670f7a opschools

Take out the : from after the content-type in the header section of your rule.

9 replies

Kathryn Carter
Forum|alt.badge.img+18
  • Community Manager
  • September 13, 2023

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! 😄


bclark
Mentor
Forum|alt.badge.img+13
  • Mentor
  • September 13, 2023

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. 


Forum|alt.badge.img+1

@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?

 

 


Kathryn Carter
Forum|alt.badge.img+18
  • Community Manager
  • September 15, 2023

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


Forum|alt.badge.img+2

Take out the : from after the content-type in the header section of your rule.


Kathryn Carter
Forum|alt.badge.img+18
  • Community Manager
  • December 6, 2023

@JMONAHAN 670f7a opschools That is a good thought here! 😄


Forum|alt.badge.img+1

Take out the : from after the content-type in the header section of your rule.

That was it!!

Thanks for catching that, glad it was such a simple fix!


Forum|alt.badge.img+2

Take out the : from after the content-type in the header section of your rule.

That was it!!

Thanks for catching that, glad it was such a simple fix!

No problem .. I had the same issue and support just got back to me the other day with that fix.


Kathryn Carter
Forum|alt.badge.img+18
  • Community Manager
  • December 7, 2023

@BLevien 3901dca seaburyhall So glad that was your fix. GREAT JOB @JMONAHAN 670f7a opschools