Skip to content

Clear telegram

A small housekeeping operation: remove empty Telegram cards — no user, no employee, no linked contacts and not a single message in the chat.

Where to find it: Modules → System → Maintenances → Clear telegram

A worked example

Clear Telegram records

A window with no parameters: an explanation and a run button.

Where such records come from

The system creates a Telegram card by itself when a person first writes to the bot — and puts that first message into the card's chat right away. The system user is set in the card separately, in the card window; until it is set, the bot answers its commands by saying that a user has to be selected.

So an empty user does not always mean an abandoned link: that is how conversations with customers who are not linked to system users live, and cards with an employee receive birthday and timesheet reminders (task notifications go to the card that names a user). The service deletes only truly empty cards: no user, no employee, no linked contacts and not a single message in the chat. A card with a conversation, an employee or a linked contact is kept. The run summary says how many cards were deleted and how many were kept — separately for each reason.

The service takes the cards of the company you are working in; it looks for messages in the chats of all companies, so that a card whose chat is kept by another company is not taken for an empty one.

Deletion is final: there is no recycle bin, and the service cannot bring a card back. If that person writes to the bot again, the system creates a new card for them. All deletions run in one transaction: a failure halfway means nothing is deleted.

Typical situations

The service deleted nothing. Usual for a bot people really talk through: every card the bot creates carries the first message straight away, so empty cards hardly ever occur. The summary counts them under «kept with chat messages».

A lot of records have built up. Normal for a public bot: anyone can write to it. Cards with a conversation are not cleared — they are the conversation history.

Where to look next