# Custom Actions

## Creating a Custom Action

In order to create a **Custom Action** follow the next steps :

* Click on the **Add** button and select **Actions** in the opened list
* Set the **Name** of your action on the right properties panel
* Add a **Tag** to group your custom actions
* Choose if your action should be **Async** or not
* Choose if you passe the **Build Context** in the action
* Add any **Parameters** you need
* Choose the **Return Type**
* Write your code in the central editor
* Save by clicking on the top right button **Save**

<figure><img src="/files/8RS3QPY05goOdISa6p7E" alt=""><figcaption><p>Example of a custom action that use a custom dependency and show a Toast on button click</p></figcaption></figure>

## Use a Custom Action

<figure><img src="/files/rqYafbdbtgOvD8gWm6Mx" alt=""><figcaption><p>Example of use of a custom action that show a Toast on button click</p></figcaption></figure>

<figure><img src="/files/j7sbhpr4yjP3ORWAxBtQ" alt="" width="341"><figcaption><p>Example of a custom action in a running application</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.goril.app/main-pages/custom-code/custom-actions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
