> 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-action-or-action-group-from-the-einstein-bot.md).

# How to execute Action or Action Group from the Einstein bot

You can call Work-Relay Action/Action Group as a handler in Einstein Bots.

* Create new Action or Action group.

{% hint style="info" %}
See more info on creating actions in [Actions and Action Groups](/automations/global-actions-and-action-groups/basics.md) articles.&#x20;
{% endhint %}

* Add new Action with type Apex to your Bot.
* Select "Execute Work-Relay Action" Action in the Actions picklist.
* **The Action/Group ID or Name (String)** - fill in with the ID or Name of required Action.
* **The Source Record ID (String)** - pass Source record ID.
* **The Initial Variables (String)** - pass variables to you Action in JSON format.

![](/files/f91434e3b04725b351b4374d4fa10046914cd5e3)

You can retrieve up to 5 variables from your action/action group.

Assign variable to the each of the outputs.

![](/files/18ad18e22d0a197ca97f44eb58192e38ec66edc5)
