---
title: "Action get_command"
description: "Processes a messenger command (/command) or deeplink and returns its name."
---

# Action `get_command`

> **System ID:** `action_get_command`

## Description

Processes commands in the `/commandname` format (and with a space-separated parameter), as well as commands from a deeplink. The command name is returned as the scenario branch; the parameter (if any) is stored in the `messenger_input_param` constant.

## Events (scenario branches)

| Event | When it occurs |
|-------|----------------|
| command name (dynamic) | Command found — returns the name without the slash (`start`, `menu`, `help`, …) |
| **no_command** | No command in the request |

Branches should be configured for the bot’s expected commands.

## Parameters

No parameters (`{}`).

## Configuration example

```json
{}
```

Example: the user sent `/subscribe newsletter123` → branch `subscribe`, constant `messenger_input_param` = `newsletter123`.

## Related docs

- [Actions reference](/en/actionjail/reference/actions-reference.md)
