---
title: "set-message"
canonical: "https://support.appfire.com/space/CDMC/2193853008/set-message"
format: markdown
---
> Macro (aura-html)

## Overview

A trigger action that displays a custom screen notification. The message can be customized with a title, message content, and notification style.

![Comala visual editor setmessage trigger action with info message type](media://ccf107bb-283e-4ab8-9c89-8d25b2030582)

This trigger displays the following notification:

![Comala setmessage info notification displayed on a page](media://457dbc9e-0b7a-430e-910e-5bb479bf36f0)

When the workflow trigger event occurs, the trigger checks that any required conditions are met, and if they are, the `"set-message"` action displays an on-screen notification message.

## `"set-message"`

The trigger action `"set-message"` creates a message notification and can include a message title and a body.

> ℹ️ It can be set as **info**, **warning,** or **error**, and set to auto-close after a specified period or require user acknowledgment.

- **action (*****set-message*****) **
  - **type ❗️** Indicator of the level of the message
    - info
    - warning
    - error
  - **title ** **❗️** For adding a title to the message
  - **body❗️** For adding the content for the body of the message

---

### ❗️ Mandatory parameters

**type**

The  `"type"` parameter value must be included.

**title**

You must add a title for the message

**body**

The `"body"` parameter value must be included.

---

### Trigger example

```
"triggers":
[
	{"event": "on-change-state",
	"conditions":
	[
		{"state":"Expired"}
	],
	"actions":
	[
		{"action": "set-message",
			"type": "info",
			"title": "Stale content",
			"body": "Content may be out of date"}
	]}
]
```

The above `trigger` listens for a state change event to the **Expired** state and displays an on-screen message notification on the change of state.

![Comala setmessage info notification displayed on a page](media://457dbc9e-0b7a-430e-910e-5bb479bf36f0)

The message **Type** can be changed in the visual editor.

![Comala setmessage trigger message type dropdown options](media://53b4addb-5fb9-4a9f-87dd-f6c5958c7861)

- **Warning** message

![Comala setmessage warning notification displayed on a page](media://c8494474-5ec9-4434-ac49-4c4fdd9b2b53)

- **Error** message

![Comala setmessage error notification displayed on a page](media://b60249f7-ae3d-4aee-b061-8510aaf841a1)

> ✅ All messages can be removed using the `"clean-messages"` trigger action.

> ℹ️ Custom email notifications can be sent using the `"send-email"` trigger action.