Sazabi
Log sourcesConnect your account

Plain

Connect your Plain workspace so Sazabi can manage a webhook target for the support event types you select.

About

Plain delivers customer support events — threads, customers, labels, comments, and more — to Sazabi through webhook targets. Connecting your Plain workspace lets Sazabi create and manage a single webhook target subscribed to the event types you choose.

Plain also has a Send to an endpoint path where you create the webhook target yourself in Plain. See Plain endpoint page for that setup.

Prerequisites

  • A Plain workspace.
  • A Plain machine user API key with these permissions:
    • webhookTarget:create
    • webhookTarget:edit
    • webhookTarget:delete
    • webhookTarget:read
    • subscriptionEventTypes:read

Workspace read access is included with every key.

Set up in the dashboard

Create a machine user API key

In your Plain workspace, go to Settings > Machine users (at app.plain.com/workspace/<your-org-id>/settings/machine-users) and create a machine user API key with the five permissions listed in Prerequisites.

Connect in Sazabi

Go to Settings > Log streams, click Add source, and select Plain. Enter your Plain API key (format: plainApiKey_...) and click Connect. Sazabi validates the key and confirms the workspace name.

Add log streams

After the connection is confirmed, click Add log stream to open the event type picker. Sazabi lists all subscribable Plain event types. Select the event types you want to forward.

Sazabi consolidates your selections into a single Plain webhook target — Plain allows a maximum of 25 webhook targets per workspace, so Sazabi manages one target that covers all selected event types.

Set up with the CLI

You can also connect the Plain log source with the Sazabi CLI (installed and authenticated — see CLI reference).

Create a managed connection by passing your machine user API key as metadata:

sazabi log-sources create plain --mode managed \
  --metadata '{"plainApiKey":"'"$PLAIN_API_KEY"'"}'

Use a machine user key with the same permissions as the dashboard flow. Sazabi validates it against the Plain API and creates the log source; note the log source ID it prints.

Add a log stream with sazabi log-streams create, listing the Plain event types you want to subscribe to in --config (use the exact event type IDs from your Plain workspace):

sazabi log-streams create --log-source-id <log-source-id> \
  --config '{"eventTypes":["<event type>","<event type>"]}'

Run sazabi log-sources list to confirm the source and its streams.

Verify

Trigger a subscribed event in Plain — for example create or update a thread, add a label, or post a comment.

Open the Intake page in the Sazabi dashboard and confirm that records attributed to the Plain source appear. Events typically arrive within one to two minutes of Plain delivering the webhook.

Troubleshooting

"Plain returned no subscribable event types" — Confirm the API key has the subscriptionEventTypes:read permission. Without it, Sazabi cannot list event types and the picker appears empty.

Token validation fails — Confirm the key format starts with plainApiKey_ and that it has all five required permissions. A key missing any one of webhookTarget:create, webhookTarget:edit, webhookTarget:delete, webhookTarget:read, or subscriptionEventTypes:read will fail validation.

Events stop arriving — The webhook target may have been deleted or disabled in Plain, or the API key may have been revoked. Reconnect from Settings > Log streams in Sazabi to reprovision the target.

Only some event types are received — Review the event type selection in the Sazabi log stream settings and confirm that all intended event types are selected in the consolidated webhook target.

Further reading