# addTileAction()

Adds a custom action to the 3-dots menu of the tiles. When the user clicks that custom menu item, then the callback listener function will be invoked.

{% hint style="info" %}
The first parameter "**name**" is just an internal identifier so you can remove the custom action later with the [removeTileAction()](/reference/sdk/methods/removetileaction.md) method if it is needed.
{% endhint %}

{% hint style="info" %}
Valid tile scopes are '**remote**', '**local**', '**custom**', '**screenshare-local**' and '**screenshare-remote**'. Remote means tiles of other (remote) users, while local means tile of local user. Custom is for custom tiles - see [addCustomTile()](/reference/sdk/methods/addcustomtile.md) method.
{% endhint %}

In the below example a send email action is added to all remote tiles.

<pre class="language-javascript"><code class="lang-javascript"><strong>const onSendEmailClicked = () => {
</strong><strong>   console.log('Send Email callback called');
</strong><strong>};
</strong>
<strong>sambaFrame.addTileAction(
</strong><strong>  'sendEmail', 
</strong><strong>   {"label": 'Send Email', scope: 'remote'}, 
</strong><strong>   onSendEmailClicked 
</strong><strong>);
</strong></code></pre>

{% hint style="info" %}
This method is often used in conjunction with the [removeTileAction()](/reference/sdk/methods/removetileaction.md) method.
{% endhint %}


---

# 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.digitalsamba.com/reference/sdk/methods/addtileaction.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.
