---
title: "Event references"
canonical: "https://support.appfire.com/space/CDML/649925434/Event%20references"
format: markdown
---
> Macro (aura-html)


## Overview

Event references are only available during workflow [events](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649759655).

> ℹ️ Many of them are context-sensitive, and some are limited to specific events.

## Where can they be used?

You can use predefined references in the following situations:

- [triggers](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649563178) and [actions](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649858941), which are initiated by [workflow events](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649759655)

> ℹ️ Limitations apply to custom `newevent` events – see **Availability** section below.

## References

| Reference | Type | Event(s) | Description | Ver |
| --- | --- | --- | --- | --- |
| ## Attachments<br>These references are available in events arising from changes to page or blog post attachments.<br>See also: `@type@` in **Content** section. |
| `@comment@` | Text | `attachmentschanged`<br>`attachmentadded`<br>`attachmentremoved`<br>`attachmentversionremoved`<br>`attachmentupdated` | Comment associated with the attachment.<br>- Can be set when uploading attachment via web form
- Can be edited from the attachment properties screen<br>> Macro (contentbylabel) |  |
| `@name@`  
or `@filename@` | `Text` | `attachmentschanged`<br>`attachmentadded`<br>`attachmentremoved`<br>`attachmentversionremoved`<br>`attachmentupdated` | The filename of the attachment, including extension.<br>> Macro (contentbylabel) |  |
| `@size@` | `Number` | `attachmentschanged`<br>`attachmentadded`<br>`attachmentremoved`<br>`attachmentversionremoved`<br>`attachmentupdated` | The file size, in bytes.<br>> Macro (contentbylabel) |  |
| ## Content<br>These references are available in all events, and relate to the content associated with the workflow event. |
| `@author@`  
or `@creator@` | `Username` | *all events* | The username of the person who created the page or blog post.<br>Specifically, it returns the username of the person who clicked the **Publish** button when the page or blog post was first created.<br>> Macro (contentbylabel) |  |
| `@page@` | `Link` | *all events* | A link (looks like: <u><span style="color: #3366ff"><</span></u><u><span style="color: #3366ff">*content title*</span></u><u><span style="color: #3366ff">></span></u>) to the page or blog post. Will include workflow state status indicator circle.<br>See also: [Publishing](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649923873), [State Status Indicator Circles](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650152863) |  |
| `@pageid@` | `Number` | *all events* | The ID of the page or blog post<br>See also: [How to get a Page ID](https://confluence.atlassian.com/confkb/how-to-get-confluence-page-id-648380445.html) (Atlassian) |  |
| `@pagelatest@` | `Link` | *all events* | A link (looks like: <u><span style="color: #0747a6"><</span></u><u><span style="color: #0747a6">*content title*</span></u><u><span style="color: #0747a6">></span></u>) to the latest version of a page or blog post, irrespective of workflow state.<br>> Macro (contentbylabel)<br>See also: [Page history](https://confluence.atlassian.com/doc/page-history-and-page-comparison-views-139379.html) (Atlassian) |  |
| `@pagetitle@` | `Text` | *all events* | The title (looks like: <u><</u><u>*c*</u><u><span style="color: #0747a6">*ontent title*</span></u><u><span style="color: #0747a6">></span></u>) of the page (or blog post?)<br>> Macro (contentbylabel) | 4.9.4 |
| [AWP-3193] Unavailable in `pagecreated` event from v4.17.4 → v5.0.8 (fixed in v5.1) |
| `@snapshoturl@` | `Text` | *Comala Publishing snapshot publishing events only* | The snapshot document url for a snapshot created using the [snapshot-page macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649694908) in a workflow trigger.<br>See also: [Snapshot document publishing](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649925672)<br>> 📝 Requires [Comala Publishing v3.0+](https://appfire.atlassian.net/wiki/pages/createpage.action?spaceKey=AHP&title=Welcome%20to%20Comala%20Publishing) and Comala Document Management v6.17.6+ | 6.17.6+ |
| `@type@` | `Text` | *all events* | The content type, either:<br>- `page` – wiki pages
- `news` – blog posts
- `attachment` – file attachment (only in attachment-related events)<br>> Macro (contentbylabel) |  |
| `@version@` | `Number` | *all events* | The version number of the page or blog post<br>See also: [Page history](https://confluence.atlassian.com/doc/page-history-and-page-comparison-views-139379.html) (Atlassian) | 5.1 |
| ## Content Reviews<br>These references are only available in events arising from Approving or Rejecting content during [Reviews](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650153766).<br>See also: [Attribute References](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649728358) |
| `@approval@`  
or `@approvalname@` | `Text` | `pageapproved`<br>`pagerejected`<br>`newsapproved`<br>`newsrejected`<br>`approvalassigned`<br>`approvalunassigned` | The name of the the content review (as specified in the associated [approval macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649662337)) which the event relates to. |  |
| `@approvalassignees@` | `username`<br><sub>One or more in a list</sub> | `pageapproved`<br>`pagerejected`<br>`newsapproved`<br>`newsrejected`<br>`approvalassigned`<br>`approvalunassigned` | List of one or more usernames assigned to the content review that the event relates to. |  |
| `@approvalcomment@` | `Text` | `pageapproved`<br>`pagerejected`<br>`newsapproved`<br>`newsrejected` | The note that was added whilst **Approving or Rejecting** during a content review (event name determines which situation occurred).<br>See also: `comment` and `taskcomment` references |  |
| `@approvaldate@` | `Text` | `pageapproved`<br>`pagerejected`<br>`newsapproved`<br>`newsrejected` | The date and time on which the page or blog post was **Approved *****or***** Rejected** (event name determines which situation occurred).<br>Format of the date is defined by the **Date Format **setting in [Confluence General Configuration](https://confluence.atlassian.com/doc/configuring-time-and-date-formats-150144.html). |  |
| `@approvaluser@` | `Username` | `pageapproved`<br>`pagerejected`<br>`newsapproved`<br>`newsrejected` | The username of the person who Approved or Rejected, resulting in the event being sent. |  |
| If using `partial=true` on the [trigger macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649859133), it will be the username of the current user who triggered the event. Otherwise it will be the user who gave the deciding vote. |
| `@comment@` | `Text` | `approvalassigned`<br>`approvalunassigned` | A note made during a content review while assigning a reviewer, or unassigning a reviewer (event name determines which situation occurred). |  |
| `@selectedapprover@` | `Username` |  | [Deprecated] Use `@approvalassignees@` instead.<br><span style="color: #999999">Username of assigned reviewer.</span> | Deprecated  
from 3.2 |
| `@selectedapprovers@` | `username`<br><sub>One or more in a list</sub> |  | [Deprecated] Use `@approvalassignees@` instead.<br><span style="color: #999999">List of one or more assigned reviewer usernames.</span> | Deprecated  
from 3.2 |
| ## Event<br>These references relate specifically to the event itself. |
| `@date@` | `Text` | *all events* | Date on which the event occurred<br>Format of the date is defined by the **Date Format **setting in [Confluence General Configuration](https://confluence.atlassian.com/doc/configuring-time-and-date-formats-150144.html). | 4.4 |
| `@datetime@` | `Text` | *all events* | Date and time on which the event occurred<br>Format of the date is defined by the **Date Time Format **setting in [Confluence General Configuration](https://confluence.atlassian.com/doc/configuring-time-and-date-formats-150144.html). | 4.4 |
| `@errormessage@` | `Text` | *all events* | If an action fails, in a trigger that defines a `newevent`, this reference will contain the error message in triggers that handle the new event.<br>> Macro (contentbylabel) |  |
| `@user@` | `Username` | *user-initiated events* | The username of the person responsible for initiating the event.<br>> Macro (contentbylabel) |  |
| `@userfullname@` | `Text` | *user-initiated events* | The full name of the person responsible for initiating the event.<br>> 📝 The username is specified by the `@user@` reference. |  |
| ## Labels<br>These references are only available in events arising from adding or removing [Labels](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650217225). |
| `@addedlabel@` | `Text` | `labeladded` | Name of the label which was added |  |
| `@removedlabel@` | `Text` | `labelremoved` | Name of the label which was removed |  |
| `@label@` | `Text` | `labeladded`<br>`labelremoved` | Name of the label which was added or removed (as applicable to the event)<br>> Macro (contentbylabel) |  |
| ## PDF Export<br>These references relate to events arising from [PDF export](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649955790) with the [K15t Scroll PDF Exporter app](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649923655) |
| `@attachmentURL@` | `Text` | `pdf-export-success` | The URL of the newly exported PDF that has been attached to the page<br>> Macro (contentbylabel) | 6.14 |
| `@errormessage@` | `Text` | `pdf-export-error` | Details of the error returned by the [K15t Scroll PDF Exporter app](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649923655) if the export action fails<br>> Macro (contentbylabel) | 6.14 |
| ## States<br>These references relate to the current workflow state. |
| `@comment@` | `Text` | `statechanged`<br>`pagestatechanged`<br>`newsstatechanged` | If specified, the note that was added whilst selecting a state to transition to. |  |
| `@duedate@`  
or `@expirydate@` | `Text` | `statechanged`<br>`pagestatechanged`<br>`newsstatechanged` | The due date for the current workflow state, if defined.<br>Format of the date is defined by the **Date Format **setting in [Confluence General Configuration](https://confluence.atlassian.com/doc/configuring-time-and-date-formats-150144.html). |  |
| For task-related events, the `@duedate@` reference denotes the due date for the task, not the state. |
| `@state@`** **or `@awpState@` | `Text` | *all events* | The name of the current workflow state, as defined by the [state](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649531575)**[ ](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649531575)**[macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649531575).<br>> ℹ️ <span style="color: #172b4d">When referencing this workflow state value through the markup  use either</span>
> ℹ️ 
> ℹ️ - ` @awpState@`
> ℹ️ - `get-metadata:awpState `using the [get-metadata macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649826804) |  |
| ## Tasks<br>These references are available in events arising from [Tasks](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649694408). |
| `@duedate@` | `Text` | *any task event* | The due date for the task, if defined.<br>Format of the date is defined by the **Date Format **setting in [Confluence General Configuration](https://confluence.atlassian.com/doc/configuring-time-and-date-formats-150144.html). |  |
| `@task@`  
or `@taskname@` | `Text` | *any task event* | The name of the task. |  |
| `@taskassignee@` | `Username` | `taskassigned` | The username of the person who is currently assigned to the task. |  |
| `@taskassigner@` | `Username` | `taskassigned` | The username of the person who assigned the task. |  |
| `@taskcompleter@` | `Username` | `taskcompleted` | The username of the person who completed the task. |  |
| `@taskcreator@` | `Username` | *any task event* | The username of the person who created the task. |  |
| `@taskcomment@` | `Text` | `taskassigned`<br>`taskcompleted` | The note associated with a task:<br>- *assignment* note, if event is `taskassigned`
- *completion* note, if event is `taskcompleted` |  |
| ## Workflow<br>These references relate to the workflow associated with the content. |
| `@pageactivity@` | `Link` | *all events* | A link (looks like: <u><span style="color: #3366ff"><</span></u><u><span style="color: #3366ff">*page activity*</span></u><u><span style="color: #3366ff">></span></u>) to the Activity Report for the page or blog post.<br>> Macro (contentbylabel) |  |
| App configuration settings may prevent view-only users from accessing the [Document Activity Report - Content](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649891440). |
| `@pageworkflowname@` | `Text` | *all events* | The name of the workflow, as defined by the `name` parameter of the [workflow macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649662219) |  |

## Availability in custom event triggers

Custom events are created with the `newevent` parameter on the [trigger](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649859133)**[ ](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649859133)**[macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649859133) (see: [Triggers](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649563178) for details).

> 📝 Availability of event references in custom events (their triggers and actions) depends on whether the reference is event specific or not.

| Reference availability | Use in custom events? |
| --- | --- |
| *all events* | :check_mark: |
| *specific event(s)* | :cross_mark: |

In cases where a reference will not be available, use the [set-metadata macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650251172) in the original event trigger to store the value as metadata.

This value is then retrieved in the custom event trigger using [Metadata references](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649925583). Alternatively, you could use another type of value reference, such as [Attribute References](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649728358) or [Supplier References](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649532510), to retrieve the data by other means.

> 📝 Be mindful of the possibility that the original event could occur again, causing the previous value to change prior to the custom event trigger being able to process it.

The possibility of an event occurring again is a particularly important consideration when using queued trigger actions.

If there is a risk of this happening, *you need to take measures to prevent the original event from happening until after the custom event trigger has been processed*.

For example,

- use the [set-state macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649727251) in the original event trigger to transition to a temporary state with no [transitions](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649563425)
- then use it again as the last action in the custom event trigger to transition back to the normal workflow

## All examples

> Macro (contentbylabel)

## See also

- [Page and User references](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649827717)
- [Attribute References](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649728358)