> For the complete documentation index, see [llms.txt](https://thecontentforge.gitbook.io/thecontentforge-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thecontentforge.gitbook.io/thecontentforge-docs/feature-guides/bot-history.md).

# Bot History

Bot History is the operational log for Telegram bot commands connected to your organisation. It shows what ran, when it ran, what status it reached, and enough detail to diagnose unexpected bot behaviour.

Open it from **Settings > Telegram > Bot History**.

### Who can use it

Editors and Admins can view Bot History. Admin-only controls appear for queue recovery and log cleanup.

### What you'll see

* **Active queue** - in-flight bot commands with live status
* **Command log** - recent commands, status, input, parameters, response JSON, generated image links, and errors
* **Filters** - all commands or specific commands such as `/generate`, `/rewrite`, `/news`, `/whatsworking`, `/brand`, `/help`, and `/cancel`
* **Timing** - created time and processing duration when available
* **Chat and user IDs** - identifiers for troubleshooting allowlist and access issues

### Admin tools

Admins can:

* Cancel one processing command
* Cancel all in-flight commands for the org
* Clear errors
* Clear completed or canceled rows
* Clear all non-in-flight rows
* Unstick the Telegram webhook by dropping the pending-update backlog and re-registering the webhook

Use destructive cleanup actions carefully; cleared rows are removed from the bot log.

### Workflow

* Open Bot History to audit a specific command or diagnose an error
* Use the active queue when the bot appears stuck
* Use admin recovery tools only when a command is truly stale or the webhook is replaying old updates

### Security Log

Security Log now lives under Bot History. Open **Bot History > Security Log** to review sign-ins, role changes, settings updates, access events, and other security-sensitive activity.

Bot configuration - the health check and the chat/user allowlists - lives on the **Settings** tab of the same Telegram section (**Settings > Telegram > Settings**, admin-only).

### Tips

* Bot History is an operational tool, not just a read-only archive
* Capture the timestamp, command, and error before escalating a recurring bot issue
* See [Telegram Bot](/thecontentforge-docs/admin-guide/telegram-bot.md) for setup and commands


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://thecontentforge.gitbook.io/thecontentforge-docs/feature-guides/bot-history.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
