> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Linking Plain as a source Canonical URL: https://posthog.com/docs/data-pipelines/sources/plain > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.posthog.com` instead of `https://app.posthog.com` (app host for links). ## On this page - [Adding a data source](#adding-a-data-source) - [Available tables](#available-tables) - [Configuration](#configuration) - [Supported tables](#supported-tables) ![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_9608fcca70) ![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_dark_a92b0e022d) Let AI connect your sources for you Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog. `npx @posthog/wizard warehouse` ![PostHog Wizard hedgehog](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png) ![](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)Let AI connect your sources for you The Plain connector automatically pulls your Plain customer support data – customers, threads, timeline entries, companies, tenants, users, and label types – into the PostHog data warehouse. ## Adding a data source 1. Go to the [sources tab](https://app.posthog.com/data-management/sources) of the data pipeline section in PostHog. 2. Click **\+ New source** and then click **Link** next to Plain. 3. Next, you need an API key from Plain. In your [Plain workspace settings](https://app.plain.com/settings/api-keys), create an API key. Make sure to grant the following read permissions: `customer:read`, `thread:read`, `timeline:read`, `user:read`, `label:read`, `labelType:read`, `company:read`, `tenant:read`, and `machineUser:read`. Copy the key value (it starts with `plainApiKey_`). 4. Back in PostHog, enter the API key in the `API key` field and click **Next**. 5. Select the tables you want to sync, set the sync method and frequency, then click **Import**. Once the syncs are complete, you can start using Plain data in PostHog. ## Available tables | Table | Description | Sync method | | --- | --- | --- | | `customers` | Customers in your Plain workspace | Incremental | | `threads` | Support threads (conversations) | Incremental | | `timeline_entries` | Timeline entries (chats, emails, notes, and custom entries) for each thread | Incremental | | `companies` | Companies that customers are linked to, usually by email domain | Incremental | | `tenants` | Tenants (groups of customers, such as accounts or workspaces in your product) | Incremental | | `users` | Members of your Plain workspace | Full refresh | | `label_types` | Label types that you can apply to threads | Full refresh | **Incremental** tables sync only new or updated records on each run. **Full refresh** tables reload all data on each sync. ## Configuration | Option | Type | Required | | --- | --- | --- | | `API key` | password | Yes | ## Supported tables | Table | Description | Sync method | Incremental field | Primary key | | --- | --- | --- | --- | --- | | `customers` | A customer in Plain — a person who contacts your support team. | Incremental, Full refresh | updatedAt | — | | `threads` | A support conversation (thread) between a customer and your team in Plain. | Incremental, Full refresh | updatedAt | — | | `timeline_entries` | An event on a thread's timeline in Plain — a chat, email, or note entry. | Incremental, Full refresh | createdAt | — | | `companies` | A company in Plain. Customers are linked to a company, usually by their email domain. | Incremental, Full refresh | updatedAt | — | | `tenants` | A tenant in Plain: a group of customers, such as an account or workspace in your own product. | Incremental, Full refresh | updatedAt | — | | `users` | A member of your Plain workspace. Users are the assignees and actors on threads and timeline entries. | Full refresh | — | — | | `label_types` | A label type in Plain. Labels on threads are instances of a label type. | Full refresh | — | — |