Articles¶
Note
If you’re missing variables or are not sure if something is not working as expected, feel free to ask over at the community.
Below you can find a list with examples of article variables. Depending on the context and if you want to use an attribute of a specific article, you can choose from specific article types in Zammad. To access suggestions for variables, type : : followed by your search query to trigger a list of relevant options. The following article types are available, depending on the context:
first_internal_articlefirst_external_articlefirst_articlelast_internal_articlelast_external_articlelast_articlecreated_internal_articlecreated_external_articlecreated_article
The table uses “Article” as example. Replace it with one of the aforementioned article types.
Name |
Variable |
Example |
|---|---|---|
Article > Cc |
|
|
Article > Created by > Address |
|
|
Article > Created by > Department |
|
|
Article > Created by > Email |
|
|
Article > Created by > Fax |
|
|
Article > Created by > Firstname |
|
|
Article > Created by > Lastname |
|
|
Article > Created by > Login |
|
|
Article > Created by > Mobile |
|
|
Article > Created by > Note |
|
|
Article > Created by > Phone |
|
|
Article > Created by > VIP |
|
|
Article > Created by > Web |
|
|
Article > Created |
|
|
Article > From |
|
|
Article > Sender > Name |
|
|
Article > Subject |
|
|
Article > Text |
|
|
Article > Text (HTML) |
|
|
Article > TicketID |
|
|
Article > To |
|
|
Article > Type > Name |
|
|
Article > Updated by > Address |
|
|
Article > Updated by > Department |
|
|
Article > Updated by > Email |
|
|
Article > Updated by > Fax |
|
|
Article > Updated by > Firstname |
|
|
Article > Updated by > Lastname |
|
|
Article > Updated by > Login |
|
|
Article > Updated by > Mobile |
|
|
Article > Updated by > Note |
|
|
Article > Updated by > Phone |
|
|
Article > Updated by > VIP |
|
|
Article > Updated by > Web |
|
|
Article > Updated |
|
|
Article > Visibility |
|
|
Ticket > Article# |
|
|
Note
There are different variables for the body of an article. In addition to the mentioned variables in the table above, there are even two more which are not in the suggestion list when typing : :.
Let’s have a look at an example to make it more clear. The following text is the body of an article with some HTML formatting:
This is the <b>body</b> of an<br>
article you want to use<br>
in a variable.<br>
Depending on the variable, the result differs:
Variable: #{article.body}
Body in plain text, converted to HTML with quote character (>) at
the beginning of each line. Example:
> This is the body of an<br>
> article you want to use<br>
> in a variable.<br>
Variable: #{article.body_as_html}
Body as HTML without quote character (>). Example:
This is the <b>body</b> of an<br>
article you want to use<br>
in a variable.<br>
Variable: #{article.body_as_text.text2html}
Body as plain text, converted to HTML without quote character (>).
Example:
This is the body of an<br>
article you want to use<br>
in a variable.<br>
Variable: #{article.body_as_text}
Body as plain text without quote character (>). Example:
This is the body of an\n
article you want to use\n
in a variable.\n