Plain logo

Integrate Plain with your AI CRM

Plain is a collaborative support platform for B2B support teams, offering a modern, AI-powered interface to consolidate support channels and assist customers efficiently.

Explore Triggers and Actions

Customer Event

Fires when a customer in Plain is created, updated or deleted. `event_type` says which it was, `created`, `updated` or `deleted`, in the same vocabulary the config filters on — so a single subscription to all three can branch downstream without matching on Plain's raw event names. Group membership changes are a separate slug, `customer_group_membership_changed`.

TriggerwebhookTry it

Customer Group Changed

Fires when a customer group is created, edited or deleted in Plain.

TriggerwebhookTry it

Customer Group Membership Changed

Fires when a customer is added to or removed from a customer group in Plain. Use it to re-segment a customer downstream the moment their grouping in Plain changes — move them onto a different plan's onboarding, change who gets paged for their threads, sync the new segment into your CRM. `change` says which direction it was, `added` or `removed`, straight from Plain. Which group it was is the one that differs between `customer.customer_group_memberships` and `previous_customer.customer_group_memberships`, both of which carry the customer's full membership list.

TriggerwebhookTry it

Thread Created

Fires when a new support thread is opened in Plain.

TriggerwebhookTry it

Thread Custom Field Updated

Fires when one of your own thread fields is set, changed or cleared on a Plain thread.

TriggerwebhookTry it

Thread Message Received

Fires when an inbound message arrives on a Plain thread. Covers email, in-app chat, Slack, Discord and Microsoft Teams, and each channel ships its own message shape, so read `channel` before reading `message`. For the replies your own team sends out, use the Thread Message Sent trigger instead.

TriggerwebhookTry it

Thread Message Sent

Fires when your team sends a message out on a Plain thread. Covers email, in-app chat, Slack, Discord and Microsoft Teams, and each channel ships its own message shape, so read `channel` before reading `message`. Editing a Slack or Discord message afterwards does not fire it again, and for messages arriving from the customer use the Thread Message Received trigger instead.

TriggerwebhookTry it

Thread Note Created

Fires when an internal note is added to a thread in Plain. Carries no `mentions`: Plain only reports them on its separate mention event, which is `PLAIN_THREAD_NOTE_MENTIONED`. Subscribing to both slugs delivers every mentioning note twice, under two different event ids.

TriggerwebhookTry it

Thread Note Mention Created

Fires when an internal note mentions a machine user in Plain. The only event that carries `mentions`. The raw `<@mu_…>` markup is not guaranteed in either `note.text` or `note.markdown`, so this slug — not scanning the note body — is how a consumer learns who was mentioned. Plain publishes such a note twice, here and as `thread.note_created`, so subscribing to both this and `PLAIN_THREAD_NOTE_CREATED` delivers it twice, under two different event ids.

TriggerwebhookTry it

Thread Properties Updated

Fires when a thread's status, assignee, priority or labels change in Plain. Every event carries the thread's new state alongside its state immediately before the change, and names which of the four properties changed. Assignment events also cover reassignment, so both sides can be populated.

TriggerwebhookTry it

Thread Tenant Updated

Fires when a thread's tenant is set, changed or cleared in Plain. Plain also sends this event when a thread's tenant is reapplied without changing, in which case both sides hold the same tenant or both are null.

TriggerwebhookTry it

Add Customer To Group

Tool to add a customer to one or more customer groups. Use when you have a customer and groups ready.

ActionTry it

Create Customer Group

Creates a new customer group in Plain for organizing and segmenting customers. Customer groups allow you to categorize customers (e.g., by pricing tier, feature access, or support level) and manage them more effectively in your support workflow. Each group has a unique key, display name, and visual color for easy identification. Use this when you need to create a new customer segment for organization or filtering purposes.

ActionTry it

Create Thread

Tool to create a new thread. Use after obtaining valid customer identifier.

ActionTry it

Delete Customer

Tool to delete a customer from the system. Use when you need to remove a customer by their ID.

ActionTry it

Delete User

Tool to delete a user from the system. Use when you need to remove a user by their ID after confirming existence.

ActionTry it

Fetch Company

Tool to fetch company details by ID. Use when you need the full profile of a company, including name, domain, contract value, owner info, and timestamps.

ActionTry it

Fetch Issues

Fetches external issue tracker links (Jira, Linear, GitHub, etc.) associated with a customer's threads. Returns a flattened list of all issue links across the customer's threads, including the thread context for each issue. Useful for getting a complete view of all external issues related to a customer. With defaults, returns up to threadFirst×linkFirst (2,500) total issue links; results are truncated if limits are exceeded, so reduce threadFirst or linkFirst for large datasets.

ActionTry it

Fetch Tier

Tool to fetch a tier by its ID. Use when you have a tier ID and need its metadata before proceeding. Example: "Fetch tier with ID tier_123".

ActionTry it

Get Customer By Email

Fetch customer details by email address. Returns customer information if found, or null if no customer exists with that email.

ActionTry it

Get Customer By ID

Tool to retrieve details of a specific customer by their unique ID. Use after obtaining the customer's ID to fetch their complete record.

ActionTry it

Get Customers

Tool to fetch a list of customers. Use when retrieving multiple customer records with pagination, filtering, or sorting.

ActionTry it

Get Thread By ID

Fetches comprehensive details of a specific thread by ID, including customer info, status, priority, labels, and assignments. Returns null if thread not found.

ActionTry it

Get User By ID

Fetch workspace user/team member by ID. Returns detailed information about a workspace team member including their name, email, status, and avatar. Note: This fetches workspace users (team members), not customers. Use GET_CUSTOMER_BY_ID for customer data.

ActionTry it

List Customer Groups

Tool to list all customer groups. Use when you need to retrieve group metadata with optional pagination or filters.

ActionTry it

List Threads

Tool to retrieve a paginated list of threads. Use when you need to list threads with optional status filtering.

ActionTry it

List Threads (Deprecated)

DEPRECATED: Use PLAIN_PLAIN_QUERY_THREADS instead. Lists all threads (support conversations) in Plain. Returns thread summaries including ID, reference, title, status, and priority. Use this action to: - Get an overview of all threads in the system - Fetch threads with pagination for large datasets - Find threads by browsing through the list Pagination: Use 'first' for forward pagination (newest first) or 'last' for backward pagination (oldest last). For paginated results, use the cursors from pageInfo (endCursor/startCursor) with 'after'/'before' parameters. If no pagination parameters are provided, returns all threads.

ActionTry it

List Tiers

Tool to retrieve a list of tiers with pagination. Use when you need to browse available tiers after determining pagination cursors. Example: 'List tiers with first=25'.

ActionTry it

Remove Customer From Group

Removes a customer from one or more customer groups in Plain. Use this action to revoke customer group memberships. The customer must be a member of the specified group(s) - attempting to remove a customer from a group they're not in will result in an error. Groups can be identified by either their Plain internal ID (customerGroupId) or their unique key (customerGroupKey). Common use cases: - Downgrade customer tier (e.g., remove from premium_tier group) - Remove customer from beta access groups - Clean up group memberships after customer status changes

ActionTry it

Run GraphQL Query

Execute any GraphQL query or mutation against Plain API. Use when no specific action exists or for complex operations like thread timelines, advanced filtering, and custom data retrieval. Supports queries, mutations, fragments, and variables.

ActionTry it

Send Message

Tool to send a new message within a thread. Use after identifying the thread and preparing message content.

ActionTry it

Update Company

Upserts (creates or updates) a company in Plain. Provide either companyId (for updating an existing company by ID) or companyDomainName (for upserting by domain). Use this to create new companies, update existing company details (name, domain, contract value), or assign account owners.

ActionTry it

Update Thread

Tool to update a thread's title. Use when renaming a thread after confirming its ID.

ActionTry it

Upsert Customer

Tool to upsert (create or update) a customer. Use when syncing or ensuring a customer record exists before subsequent actions.

ActionTry it

How the Plain integration works

The Plain integration connects your Dench AI CRM directly to Plain, so agents can read and act on your Plain data as part of everyday work — answering questions in chat, keeping your CRM in sync, and running automations without anyone copying data between tools.

23 actions are available for agents to invoke on your behalf, and 11 triggers can start a Dench automation the moment something changes in Plain. Every call runs through Plain's own authorization, scoped to the account you connect.

Set up Plain in Dench

  1. 1

    Sign in to your Dench workspace and open Integrations.

  2. 2

    Find Plain and click Connect — you'll authorize access through Plain's own sign-in flow. No API keys or code required.

  3. 3

    Ask an agent to use Plain in chat, or wire a Plain trigger into an automation.

  4. 4

    Manage or disconnect the connection any time from workspace settings.

Frequently asked questions

How does the Plain integration work with Dench?

The Dench Plain integration connects your AI CRM to Plain, so AI agents can work with your Plain data as part of chats, automations, and CRM workflows. You connect your account once, and every agent in your workspace can use it — governed by your workspace permissions.

What actions can AI agents perform with Plain via Dench?

The Plain integration currently exposes 23 actions, including Add Customer To Group, Create Customer Group, Create Thread, Delete Customer, Delete User, and Fetch Company. Agents invoke them on your behalf from chat or from automations.

Can Dench react to events in Plain automatically?

Yes. The Plain integration provides 11 triggers — such as Customer Event, Customer Group Changed, Customer Group Membership Changed, and Thread Created — that can start a Dench automation the moment something happens in Plain.

Do I need to write code to connect Plain to Dench?

No. You connect Plain from your Dench workspace using Plain's own sign-in and authorization flow — no API keys to copy, no glue code to maintain.

Is the Plain integration secure?

Connections are authorized through Plain's own authentication flow, and Dench stores only the authorization needed to act on your behalf. You can review and disconnect the Plain connection from your workspace settings at any time.