---
title: "set-label macro"
canonical: "https://support.appfire.com/space/CDML/649531509/set-label%20macro"
format: markdown
---
> Macro (aura-html)


## Overview

> Macro (excerpt)
> 
> Add a label to the content

The `set-label` macro is used to add a label to content – either the current page or the immediate child pages.

## Where to use it?

Optional.

One or more `set-label` macros can be put in a [trigger macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649859133).

## Parameters

| Parameter | Required | Default | Notes |
| --- | --- | --- | --- |
| *unnamed first parameter*  
or `label` | :check_mark: |  | Name of label to add<br>- supports [Value References](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649694302) (v4.4.1+)<br>> ℹ️ Name can use any character set supported by your Confluence server – except some [reserved characters](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649859070) |
| `children` |  | `false` | What should the label be applied to?<br>- `true` – all immediate children of the page, but not the page itself<sup>†</sup>
- `false` – the page or blog post itself |
| <sup>†</sup> Only works for pages, not blog posts. *Use with caution!* |

## Conditions

The following [conditions](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649694110) are applicable to labels

- `haslabel`
- `parenthaslabel`

## Events

The following [events](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649759655) are generated by this macro

- `labeladded`

## Example

```plaintext
{workflow:Labelled}
   {state:Editing|submit=Review}
   {state}
   {state:Review}
   {state}
   {trigger:statechanged|state=Review}
      {set-label:being-reviewed}
   {trigger}
{workflow}
```

## All examples

> Macro (contentbylabel)

## See also

[Workflow Authoring Guide](https://appfire.atlassian.net/wiki/spaces/CDML/pages/648611901)

- [Labels](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650217225)
- [Events](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649759655)
- [Triggers](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649563178)
- [Actions](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649858941)