Plain
Overview
Connect your ElevenLabs AI agents with Plain to work support threads. The integration covers two scopes:
- Tools: leave internal notes for teammates, add and remove labels, set thread status and priority, and assign threads to teammates or to the agent itself.
- Triggers: automatically draft or send responses when matching Plain threads receive customer messages across email, chat, and Slack.
Capabilities
Setup
This integration authenticates with a Plain machine user API key. Triggers also need the workspace request-signing secret so ElevenLabs can verify webhook deliveries.
Create a machine user
In Plain, go to Settings → Machine users and click Add Machine User. Enter a name for internal reference and a public name, which is shown to customers if the machine user interacts with them.
Use a dedicated machine user for the ElevenLabs agent when you plan to route threads by assignment. That keeps assignment-based reporting and human handoff clear.
Generate an API key
Select the machine user and click Add API Key. Copy the key immediately — it is not shown again after closing the dialog.
Grant the least privilege needed for the features you enable:
To give the API key all required permissions, copy the full permission list, and click the From clipboard into the API key dialog:
The interface should look like this:

Do not grant workspaceHmac:edit. ElevenLabs never rotates Plain’s workspace signing secret.
Copy the workspace request-signing secret
Triggers verify every Plain webhook with the workspace HMAC secret.
- In Plain, open Settings → Request signing.
- View or generate the workspace request-signing secret.
- Copy it. You will paste it into the trigger setup in the next step.
This secret is workspace-global: rotating it affects every webhook target in the Plain workspace. Prefer viewing the existing secret over regenerating it unless you intend to update every consumer.
Triggers
Enable the Thread event trigger when you want the agent to respond automatically to customer activity on Plain threads. On activation, ElevenLabs creates an enabled Plain webhook target for your workspace. Deactivating the trigger deletes that target. You do not need to paste a webhook URL into Plain manually.
Create the trigger
Open the Triggers tab of the Plain integration and enable Thread event. Fill in:
Only one Thread event trigger is allowed per Plain API connection. Overlapping all-thread triggers on separate connections to the same Plain workspace can produce duplicate responses — avoid that setup.
Changing response mode, routing, or channel filter requires deleting and recreating the trigger.
Routing: all threads vs assigned
Plain API keys can read workspace data, but each key belongs to a specific machine user. That machine user is the author identity for replies and can also be assigned threads. Assignment is a routing convention, not an API authorization boundary.
- All threads (default): process customer messages from supported threads visible to the connection, subject to the channel filter. Assignment events are ignored.
- Assigned to machine user: only act when the thread’s primary assignee is the machine user for this API key. ElevenLabs resolves that identity automatically — you do not enter a machine-user ID. Assignment transitions wake the agent so a workflow or teammate can hand a thread over after it already has customer messages.
For richer conditions (labels, customer tier, support hours, tenant), configure a Plain workflow that assigns matching threads to the machine user, then use Assigned to machine user routing.
Recording replies after handover
After a thread is handed over or escalated to a teammate, the agent stops replying, but the teammate’s replies are still recorded in the same ElevenLabs conversation and marked as human replies. Use them in analytics and Architect queries to see how humans resolved what the agent handed off. Only conversations the agent already handled are recorded, and recording never sends anything to the customer. Attachments on teammate replies are not recorded.
Recording is rolling out gradually and may not be enabled for your workspace yet. Triggers created before it was available are not subscribed to outbound events: deactivate and reactivate the trigger in ElevenLabs, or enable thread.email_sent, thread.chat_sent, and thread.slack_message_sent on its webhook target in Plain.
Channel filter
Supported customer channels in v1:
- All — email, chat, and Slack
- Chat
- Slack
Microsoft Teams and Discord are not supported yet. Slack message edits are also unsupported because Plain does not emit another received-message event for an edit.
Suggested vs direct replies
- Suggested reply (default): posts a Plain generated reply for human review via
addGeneratedReply. Safe for initial rollout; teammates can accept, edit, or discard it. - Direct reply: posts a customer-visible reply via
replyToThread. Use only after you trust the agent in a safe inbox. The reply is attributed to the API key’s machine user. Replies go out as the agent speaks, in conversation order. If the agent talks, uses a tool, then talks again, the customer sees two messages. On email, that is two emails.
Agent replies use markdown (headings, bold, lists, links, and code). Direct replies also include a plain-text fallback for clients that do not render markdown.
Plain workflows
A common pattern:
- Create a dedicated machine user and API key for the agent.
- Build a Plain workflow that assigns selected threads (by label, channel, tier, or other conditions) to that machine user.
- Enable the Thread event trigger in Assigned to machine user mode with Suggested reply.
- After validating quality, recreate the trigger in Direct reply mode if you want autonomous customer-facing replies.
- To escalate to a human, reassign the thread away from the machine user — assignment mode stops further agent output.
Verify the setup
- Confirm an enabled webhook target appears under Plain Settings → Webhooks after you create the trigger.
- Create a test thread on a channel allowed by your filter.
- For assignment mode, assign the thread to the machine user.
- Confirm one ElevenLabs conversation appears. In suggested mode you should see one generated-reply draft. In direct mode you may see more than one customer message if the agent spoke more than once.
- Send a follow-up and confirm the same conversation resumes without duplicate replies.
If nothing arrives, check the request-signing secret, API key permissions (especially webhook target and reply scopes), routing mode, and channel filter.
Limitations
- Webhook processing runs in-process after ElevenLabs returns
200. Work can be lost if the process stops before the turn finishes. Plain may retry the delivery, but a retry after a partial failure can result in more than one reply for the same customer message. - Trigger activation and local persistence are not transactional. A rare failure window can leave a Plain webhook target without a matching ElevenLabs trigger (or the reverse on deactivation). Orphan targets can be removed under Plain Settings → Webhooks.
- Plain has no way to recognize a repeated reply request as a duplicate, so if ElevenLabs crashes right after Plain accepts a reply, retrying can post the same reply twice.
- Rotating the workspace HMAC requires updating or recreating every trigger that stores the old secret.
- Each trigger consumes one of Plain’s 25 webhook targets per workspace.
- Inbound attachments (images/files a customer sends) are downloaded and passed to the agent when the agent has file input enabled, subject to Plain’s virus scan result and the agent’s normal file size/type limits. This includes images pasted directly into an email body, which Plain omits from the normal attachments list and embeds in the message markdown instead. The machine user’s API key needs the
attachment:downloadpermission for this. Outbound attachments (the agent sending a file back to Plain) are not supported yet. - The integration uses Plain’s UK GraphQL endpoint.
- Threads use bounded recent history: at most 1,000 messages (50 per page, up to 20 pages), fetched most recent first. Older messages in longer threads are not included as context.
Plain tools
Add Plain tools to your agent to manage support threads during conversations. Once the integration is connected, you can enable individual tools on your agent’s configuration page.
Available tools
The integration provides fourteen tools for working a thread:
- Fetch thread information — fetch a thread’s metadata: status, priority, assignee, and labels.
- Create internal note — record analysis, context, or follow-up items on a thread. Notes are only visible to teammates, never to the customer.
- Update labels — add and remove labels on a thread in a single call.
- Set thread status — set a thread’s status using the statuses shown in Plain’s UI.
- Mark thread as done — mark a thread as done when there is nothing left to do.
- Mark thread as todo — move a thread back to todo, undoing a done or snoozed state.
- Snooze thread — snooze a thread for a duration of time.
- Set thread priority — set the thread priority to urgent, high, normal, or low.
- Assign thread — assign a thread to a teammate or to a machine user.
- Unassign thread — remove the current assignee from a thread.
- Upsert thread field — set a custom thread field’s value on a thread.
- Bulk upsert thread fields — set multiple custom thread field values in a single call.
- Fetch thread field schemas — look up the configured type and allowed values of one or more thread fields.
- Clear thread field — remove a custom thread field’s stored value from a thread.
Tool reference
plain_fetch_thread_information
plain_create_internal_note
plain_update_labels
plain_set_thread_status
plain_mark_thread_as_done
plain_mark_thread_as_todo
plain_snooze_thread
plain_set_priority
plain_assign_thread
plain_unassign_thread
plain_upsert_thread_field
plain_bulk_upsert_thread_fields
plain_fetch_thread_field_schemas
plain_clear_thread_field
Fetches a thread’s metadata: status, priority, assignee, and labels. Useful for gathering context before triaging or annotating a thread. The tool intentionally does not return the thread’s content (title, description, preview text) or customer details, so it cannot leak another customer’s data if called with an arbitrary thread ID.
Configuring tools
Add an integration tool
On your agent’s configuration page, click Add tool and select Add integration tool.
Select Plain tools
Choose your Plain connection and toggle the tools you want the agent to use. For example, a triage agent might only need labels, priority, and assignment, while an annotating agent might also create internal notes.
(Optional) Provide parameters
Each tool’s parameters are filled by the agent during the conversation. You can optionally pre-fill specific parameters with constants or dynamic variables — for example, supplying customer_id from the conversation context, or fixing machine_user_id to the agent’s own machine user so it can assign threads to itself.
Plain returns mutation failures in the response body rather than as HTTP errors. The tools surface these error messages to the agent, so it can react — for example, when a label type is archived or a label is already present on the thread.