Hi everyone, I’m here to report what I believe is a bug. This behaviour is consistent when trying to send emails through triggers but not when using the same methods to setup a custom webhook payload.
I might also do a separate report to notify that the “article” variable is not available when trying to set a ticket field through article creation trigger. But from what I read, this might be either on purpose or an expected technical limitation.
Infos:
- Used Zammad version: 7.0.1
- Used Zammad installation type: (source, package, docker-compose, …) package
- Operating system: Debian
- Browser + version: Edge 147.0.3912.72
Expected behavior:
- From a webhook triggered by an article creation Trigger, I want to be able to use the article.body_as_html or article.body_as_text variables inside the custom payload.
payload:
{
"text": "#{article.body_as_text}"
}
exemple result:
{
"text": "This is my amazing article body"
}
Actual behavior:
- Actual result
{
"text": "#{article.body_as_text / no such method}"
}
Note: using article.body does return something:
{
"text": "<div>This is my <b>amazing</b> article body</div>"
}
Steps to reproduce the behavior:
- Setup a trigger to fire a webhook from an article creation (I specifically used article type email)
- Setup a webhook to anywhere with a custom payload containing “#{article.body_as_text}”
- Create an article in a ticket (or send an email in my case)
- Check webhook logs (/#manage/webhook) to see the json created.