Webhook not providing data as expected, error "no such method"

Infos:

  • Used Zammad version: 6.2.0-1710415722.ca3a5152.jammy
  • Used Zammad installation type: package
  • Operating system: Ubuntu 20.04 LTS
  • Browser + version: Edge for Business (122.0.2365.92)

Expected behavior:

  • Send webhook to external provider using the following elements:
{
  "ticket_title": "#{ticket.title}",
  "article_body": "#{article.body_as_html}",
  "owner_email": "#{ticket.owner.email}"
}
  • Data that should have been sent:
"accept-encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\naccept: */*\nuser-agent: Zammad User Agent\nhost: prod-183.westus.logic.azure.com\nx-zammad-trigger: ticket (convert to story)\nx-zammad-delivery: fd3df6c2-f107-4992-8398-2d310d69b3c8\ncontent-type: application/json; charset=utf-8\nconnection: close\ncontent-length: 213\n\n{\"ticket_title\":\"Test Feature Request 002\",\"article_body\":\"This is a test. Use LDAP/SSO for user authentication\",\"owner_email\":\"test.user@test.com\"}"

Actual behavior:

  • What is actually sent and showing in the logs from Zammad side:
"accept-encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\naccept: */*\nuser-agent: Zammad User Agent\nhost: prod-183.westus.logic.azure.com\nx-zammad-trigger: ticket (convert to story)\nx-zammad-delivery: fd3df6c2-f107-4992-8398-2d310d69b3c8\ncontent-type: application/json; charset=utf-8\nconnection: close\ncontent-length: 213\n\n{\"ticket_title\":\"Test Feature Request 002\",\"article_body\":\"#{article.body_as_html / no such method}\",\"owner_email\":\"test.user@test.com\"}"

Getting error \"article_body\":\"#{article.body_as_html / no such method}\"

Steps to reproduce the behavior:

  • Create a webhook pointing to an HTTP endpoint with the following JSON body:
{
  "ticket_title": "#{ticket.title}",
  "article_body": "#{article.body_as_html}",
  "owner_email": "#{ticket.owner.email}"
}
  • Create a trigger that will fire off the data when details met.

Hi @quinnjohnsonhp,

Only a subset of object attributes and methods are allowed within Webhooks. This is for security reasons, to prevent harming the system or leaking private data.

article.body_as_html is not allowed.

Is this security intended for the article body in general? Initially I also tried article.body and still achieved the same error.

My intended task is to get the contents of the article and send it, is this not possible with a webhook?

Hi @tschaefer,

Do you feel that what I am trying to accomplish is possible with a webhook?

Thank you!!!