> For the complete documentation index, see [llms.txt](https://shinyobjectlabs.gitbook.io/fetch-js/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shinyobjectlabs.gitbook.io/fetch-js/javascript-api/trigger-action.md). Agents can also search and read this documentation through its [MCP server](https://shinyobjectlabs.gitbook.io/fetch-js/~gitbook/mcp).

# Trigger Action

To trigger an action programmatically, use the code snippet below

{% hint style="warning" %}
When triggering an action programmatically, the trigger element will be `null` in the `onRequestInit` callback.
{% endhint %}

```javascript
$fetch.triggerAction('your_action_name')
```
