Missing function of sending the plain text of a submitted ticket in Webhook (f.e. Slack)

Title: Missing function of sending the plain text of a submitted ticket in Webhook (f.e. Slack)

Hi everyone!

I integrated a webhook for slack so all incoming tickets in zammad are posted in a slack channel. this is very handy as it makes it possible for our developers to see immediately if a clients message is urgent or needs immediate action.
Unfortunately it is not possible in the latest Zammad version to send the tickets message within the payload without sending also some html or formatting elements.
What arrives in Slack is a very cryptical message (the tickets content) with all
/ /n elements, which is not really readable and userfriendly.

I asked the support team and they confirmed that currently there is no function to just transmit the content of a ticket, without the disturbing elements (s. below here: Articles — Zammad Admin Documentation documentation)

I would really love to have a variable for plain text, so everyone in our team can just have an easy look into the zammad channel in slack and check the content of the newly arrived ticket immediately, without the need of reading between the html elements or cryptical signs.

our current payload uses:
Preview:\n#{article.body_as_text}

That is the plainest you can get.

Thanks a lot in advance, it would be very interesting seeing if also other users have the same issue.
Looking forward solving this together :slight_smile:

Yes, currently, in webhooks, you have mostly only the “plain” data attributes available.

But did you already check notification.message? Could be a workaround, but did not test it on my own, so I’m not sure if it’s in all cases working for you like expected.

Alright thanks!
Maybe I will use a short middleware skript than.

One thing I still noticed:
your documentation also lists a variable which is: Variable: #{article.body_as_text}
That should actually make a plain text.
But when this message arrives in Slack, it shows: #{article.body_as_text / no such method}

I assume this variable somewhat lost its function?

This bad boy is a workaround technically. The availability of some functions / variables can differ depending on the area you‘re using then.

I wrote that list back in the day, were we essentially didn‘t have custom webhooks at that time.

Variables in Webhooks are not the general variables from the linked document. I think we also added a hint for that in the documentation at some point.

So for everyone who has the same issue:
Sending plain text does work very well with #{notification.body}
:slight_smile:
Thanks again for your help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.