Automated internal note with #{ticket.article.plain} not working in trigger

:clipboard: Infos:

  • Zammad version: 6.5.0 (self-hosted)
  • Installation type: Package (.deb, Ubuntu)
  • Operating system: Ubuntu 20.04 LTS
  • Browser: Chrome 125, Safari (iPad), Firefox – all tested

:white_check_mark: Expected behavior:

We want to trigger an internal note automatically when a ticket is moved to a specific group (KI Antwort), using a macro.

The note should contain a link to our external AI assistant, and this link should include the plain content of the first customer message (article) as a URL parameter, e.g.:

bash

KopierenBearbeiten

https://MEINE DOMAIN/index.html?text=#{ticket.article.plain}

:cross_mark: Actual behavior:

The trigger is fired, and the internal note is created.
However, instead of replacing the placeholder, the following text appears in the note:

pgsql

KopierenBearbeiten

https://MEINE DOMAIN/index.html?text=#{ticket.article / no such method}

We also tried #{article.plain} and #{ticket.latest_article.plain}, but they return the same error or are not evaluated at all.


:repeat_button: Steps to reproduce:

  1. An incoming ticket (email) is created
  2. An agent runs a macro that moves the ticket to the group KI Antwort
  3. A trigger detects the group change and tries to add an internal note with:

bash

KopierenBearbeiten

https://MEINE DOMAIN/index.html?text=#{ticket.article.plain}
  1. The note is added, but the placeholder is not replaced – instead we see:
    #{ticket.article / no such method}

:red_question_mark: Question:

  • Is it possible to reliably access the plain content of the first article (#{ticket.article.plain} or similar) inside an internal note via trigger?
  • Or is this not supported by design in the trigger context?
  • Any suggested workaround?

Thanks a lot for any tips or clarification! :folded_hands:

… i wouldn’t do that

I think you’re looking for #{last_article.body} (see Articles β€” Zammad Admin Documentation documentation )

Honestly, consider using a webhook and provide your LLM with all data. Or do some middleware scripting to clean up what you really want.