> 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/using-actions/how-to-execute-an-action-group-from-the-work-relay-process.md).

# How to execute an Action Group from the Work-Relay process

{% stepper %}
{% step %}

## Add a call apex action

Add [Call Apex](/automations/global-actions-and-action-groups/types/execute-apex.md) Action to process step (1).

![](/files/ee44a650c9766a6c5a9feac164b2492328f95eef)
{% endstep %}

{% step %}

## Select the API class and method

Select `GlobalActionService` (2) in "API Class Name" picklist, and select `ExecuteActionGroup` method (3):

![](/files/887e502c6a17eafa61e621660036f26dffb21be5)
{% endstep %}

{% step %}

## Set the group ID

Set `groupId` parameter value to Global Action Group Id (4):

![](/files/f9e350cc75cf5e929b4349fbb5a739f915ad8cf6)

To get the Global Action Group Id go to the Actions -> Action Groups, open the Action group you need and copy ID (5):

![](/files/717011c6450f8bc179cbdfca4b07d237b44ed460)
{% endstep %}

{% step %}

## Optionally populate the source parameter

(Optional) populate "Source" parameter (6).

In the Source you can pass a 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:\
  `"{Action1_ID}":"{record1_Id}", "{Action2_ID}":"{record2_Id}",...`
* **Option 2:** Pass Object Name and Record Id. All Actions which use specified object as a source will use specified record Id:\
  `"{Object1_API_Name}":"record1_Id", "{Object2_API_Name}":"record2_Id",...`

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

![](/files/27349c562bd334b5ba480b4fd336df10fa4b7bee)
{% endstep %}

{% step %}

## Optionally populate variables

(Optional) populate variables (7):

![](/files/29d272550285ab3e582daad956f2a5e58a1829a6)
{% endstep %}
{% endstepper %}
