# Пачка

Answer in Pachca conversations as your own bot

Корпоративный мессенджер Пачка — агент отвечает в беседах и тредах от имени вашего бота, читает присланные файлы и отправляет свои

## How the agent works with Пачка

The agent works through the Pachca Bot API at api.pachca.com and passes the bot token in the Authorization header as a Bearer token. Its first request is GET /profile: that checks the token is alive and shows whose name the messages will go out under. From there only the conversations the bot has been added to are in play — their threads, attachments and button taps.

A bot in Pachca is a conversation participant, not an observer on the side: until it is added to a conversation the agent receives not a single message from there, and no permission gets around that. Incoming messages arrive not by polling but over an outgoing webhook: the address is registered at connection time, Pachca pushes new messages and button taps itself, and signs every request with an HMAC in the Pachca-Signature header.

Writing is the main mode for this connector. The agent answers in the thread, uploads files, asks follow-up questions with buttons and handles the tap by its trigger_id. While it thinks, a reaction sits on the original message — Pachca has no typing indicator, and the reaction honestly shows the request was picked up. It can edit and delete only its own messages.

The token carries exactly this bot's rights and nothing beyond: the profile owner's personal correspondence is out of reach through it. Attachments are fetched by re-reading the message by its id, and the agent holds the request rate itself — Pachca meters reads separately, and the agent does not spend an extra call on every message. A file goes out as an upload to Pachca rather than a link to an outside drive, and the agent names the conversation it landed in.

## Integration scenarios

### Replies in a work conversation
The agent receives a message from a Pachca conversation over an outgoing webhook, works out the question and answers as the bot without waiting for you to free up.

### Reading the files people send
The agent fetches the message's attachments by its id — a delivery note, an export, a screenshot of a report — and answers on their content right in the thread.

### Scheduled digest
The agent posts the morning digest to the right Pachca conversation at the agreed time, so the numbers arrive on their own, without reminders.

### Buttons and follow-up questions
The agent asks a question with buttons, handles the tap by its trigger_id and edits its own message once the answer is no longer relevant.

### Visible proof the bot is working
While the agent prepares an answer it puts a reaction on the original message and removes it when done — Pachca has no typing indicator for bots, and the reaction stands in for one.

### A file straight into the conversation
The agent uploads a finished report or export into Pachca and names the conversation it put the file in — instead of passing around a link to an outside drive.

## How to connect

**Before you connect**

- A Pachca workspace with administrator rights
- A chatbot created in the integrations section, and its access token
- The bot added to the conversations where it should answer

### Open your workspace settings
Administrator rights are required: only a workspace administrator can create a chatbot. A regular member has no integrations section in the settings at all.

### Create a bot in the «Чат-боты» section
In the settings open «Интеграции» → «Чат-боты» and create a bot: the name and avatar it will answer under in conversations.

### Copy the bot access token
The token shows up in the bot card as soon as it is created — copy the whole string. It is what grants the right to post in conversations as this bot.

### Configure the bot's outgoing webhook
On the «Исходящий webhook» tab set it to fire on all messages rather than commands only, switch on ignoring the bot's own messages, and copy the Signing Secret.

## FAQ

### How do I connect Pachca?
With a bot token. In the workspace settings open the integrations section, create a chatbot and copy its access token in full. Outgoing-webhook signing is switched on in the same place — its secret goes into the second field.

### What does the agent see in Pachca?
Messages and attachments in the conversations the bot has been added to, and the data of the bot itself. It does not read conversations where the bot is absent.

### Does the agent write to Pachca?
Yes, that is the main scenario: it sends and edits messages, deletes its own, uploads files, sets reactions and responds to button taps.

### Why does the bot set a reaction instead of «typing…»?
Pachca has no typing indicator for bots. A reaction on the original message is the closest honest equivalent: it appears when the request is picked up and comes off when the answer has been sent.

[Open Пачка](https://app.pachca.com)
