> For the complete documentation index, see [llms.txt](https://docs.work-relay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.work-relay.com/automations/global-actions-and-action-groups/basics/working-with-action-groups.md).

# Working with action groups

## How to create an Action Group

Go to the Action Group sub-tab on Actions tab, go to needed folder and click "New Action Group" button (1):

![](/files/c7917c1fbe39eab5adc187d22ea5d0b5c190feb4)

"New Action Group" page will be shown.

Enter the name of new Action group (2).\
Set if it is necessary to Track History (3) - when checked, you will be able see the history of action(s) execution.\
Enter Description (4) if needed.

![](/files/2cc8abbb407df664c5e475af450b4d48af8c2262)

Save. After this an Action Group Details tab will be shown (5):

![](/files/08aae4abbbf2bf9ea9d63bb90326df9a0a386cbc)

## How to edit an Action Group

Click "Edit" on Action Group View on it's details (6). You can also rename group if Select Edit from list dropdown at the proper entry on groups list (9):

![](/files/f73a63c91b5a8e313821ff253776ff0f1de9ca89)

## Working with details tab

**Execute Button** (7) in Action Groups work the same way as for Actions. See more details at [Working with existing Action](/automations/global-actions-and-action-groups/basics/working-with-actions.md#working-with-existing-action)

**Here are some specific details for action groups:**

If you are working with action group with different types of source object you can pass sources as JSON Array which contains sources for each action from your Action Group.

There are 2 ways you can pass sources:

**Option 1:** Pass Action ids with record Id for each action:

{% code overflow="wrap" %}

```json
"{Action1_ID}":"{record1_Id}", "{Action2_ID}":"{record2_Id}",...
```

{% endcode %}

**Option 2:** Pass Object Name and Record Id. All Actions which use specified object as a source will use specified record Id:

{% code overflow="wrap" %}

```json
"{Object1_API_Name}":"record1_Id", "{Object2_API_Name}":"record2_Id",...
```

{% endcode %}

For example if there are 4 actions in the group, 3 of them use Account as Source object and 1 - Contact and you pass: `"Account":"{Account.Id}", "Contact":"{Contact.Id}"`, 3 actions will get the `Account.Id` as source and 1 - `Contact.Id`.

You can attach a file to the action (e.g., some descriptive document or image). Click "Attach File" button (8) and follow the instructions on the page shown.

## Working with actions tab

**Adding existing action to the Action Group**

Click "Add Action" button (10) and Actions tree will be shown in the popup (14). Choose necessary (15) from the list of existing actions:

![](/files/7db33986a20af6085e0cefc5bd351d8477260861)

![](/files/cad6264a620aaac38de308eca877e396f27e78ba)

Clicking "Deactivate" link (11) user can exclude any action from execution in the current Action Group. Available in version 5.0.

Adding new action (12) to the action group is the same as adding new action on "Actions" tab. Click "New Action" and refer the article [How to create Action](/automations/global-actions-and-action-groups/basics/working-with-actions.md#how-to-create-an-action) to fill in New Action inputs.

Actions in the group will be executed in the specified order (upper first). To change order of actions use "Up" and "Down" links (13).

## Working with history tab

History tab will show the history of execution of the Action Group if the Track History selected on Action Group properties.

![](/files/97fe8e648d62ec99c3b75dc013421d7863d74d0d)

Click View (16) to see details on each action execution:

![](/files/2fa2315701d31fe14ff82f112967b8a4d6731569)

"Source" cell can contain link to the record for which Action Group ran (if exists).

Variables shows values assigned to the actions from the group.

## Actions group page toolbar

![](/files/60ed734ef41e9ff030bb760b0ec14aaca5a28a5a)

The toolbar at the top of "Actions Group" page allows to do the following:

* Switch between Actions and Action Groups (17)
* Make search (18) or [deep search](/automations/global-actions-and-action-groups/using-actions/deep-search-in-actions-and-action-groups.md) (19) through Action Groups
* Export selected Action Groups (20) to file
* Import Action Groups (21) from file
* [Deploy](/automations/global-actions-and-action-groups/using-actions/how-to-export-import-and-deploy-actions-and-action-groups-between-organizations.md) selected Action Groups (22) to another organization
* Move selected Action Groups and folders (23) to another folder
* Create new Action group (24, see above)
* Click arrow menu (25) to see "New Folder" button that allows to create a new folder.

## Using variables in Actions in the group

Action Group, as far as single Action, can have some parameters. In terms of Action Group, parameters can be passed as standard Variables.

The main advantages of Action Group Variables are:

* Variables that are passed as parameters, or defined in some Action in the Group, are available in subsequent Actions.
* These Variables can be changed in the Group with actions of "Define Variable" type.

For example, assume user needs to auto-combine email notification. This can be done with the following way:

{% stepper %}
{% step %}

## Pass parameters to the Action Group

E.g., user needs to send emails where some person name should be highlighted with given color in all places it appeared.

User triggers an Action Group (e.g., by clicking a button on some form) and passes current record creator's ID to this Group as parameter (variable): `person = {$SomeObject.SomeUser.Name}` and `color="purple"`.
{% endstep %}

{% step %}

## Update the variable

first action receives this parameter and updates this variable:

{% code overflow="wrap" %}

```html
person = <span style="background-color:{$Variables.color}; font-weight:bold;padding: 0 0.25em;">{$Variables.person}</span>.
```

{% endcode %}
{% endstep %}

{% step %}

## Send the email

second action receives this updated `person` variable and sends email with some text, like this:

{% code overflow="wrap" %}

```
Dear {$Variables.person}, 
We're glad to inform you, that your account "{$Variables.person}" has been upgraded to <b>Pro+</b> plan.
...
Please consult with our online advisors in case of any questions. Type "\" with your account name "{$Variables.person}" in the chat bot message field to get quick assistance.
...
```

{% endcode %}
{% endstep %}

{% step %}

## View the result

In the letter sent all person names will be highlighted.
{% endstep %}
{% endstepper %}
