---
title: "Action testing__search"
description: "Checks whether the current chat_id is in a given list (for tests)."
---

# Action `testing__search`

> **System ID:** `action_testing__search`  
> Also in scenario: `testing__search`

## Description

Utility action for tests and development: checks whether the current `chat_id` is in the `chat_id` array in the node config. Comparison is done as strings. On a match, it also verifies that bot users with those chat IDs exist in the database.

## Events (scenario branches)

| Event | When it occurs |
|-------|----------------|
| **success** | Current `chat_id` is in the array and users were found |
| **error** | `chat_id` not in the array, array empty / missing, or users not found |

## Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `chat_id` | array | yes | `[]` | List of chat IDs to check |

## Configuration example

```json
{
  "chat_id": [123456789, 987654321]
}
```

## Related docs

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