Connections

Connect outside services, and see each connection's status.

  • Team Chat

    Connected

    Read channels you choose and post replies.

    [email protected] · Used by 4 workflows

  • Mail

    Expired

    Send email as you.

    [email protected]

    Sign-in expired Nov 27. Workflows that send email are paused.

  • Pipeline CRM

    Contacts, companies and deals.

  • Data Warehouse

    Not available

    Query and load tables.

    Turned off by your admin

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/connect

Usage

import { ConnectorCard, type ConnectorStatus } from "./ui/uicontext/components/kit/Connect.ts"
const Message = UiSchema.TaggedEnum({	ConnectedMail: {},	DisconnectedMail: {},})export const MailConnection = (h: Html.H<typeof Message.Type>, status: ConnectorStatus, account: string | undefined) =>	ConnectorCard(h, {		props: {			id: "mail",			name: "Mail",			description: "Send email as you.",			status,			...(account === undefined ? {} : { account }),			can: ["connect", "disconnect"],			disconnectWarning: "Workflows that send email pause.",		},		onEmit: {			RequestedConnect: () => Message.ConnectedMail(),			RequestedReconnect: () => Message.ConnectedMail(),			RequestedDisconnect: () => Message.DisconnectedMail(),			RequestedSecondary: () => undefined,			RequestedApplies: () => undefined,		},	})

API reference

ConnectorCardComponent

Props

ConnectorCard props
NameTypeDefaultDescription
idrequiredstring—The connector's id, unique among its siblings
agentIdstringconnector:<id>This card's id for agents, unique on the page; connector:<id> by default
namerequiredstring—The service's name: "Google Drive"
descriptionstring—What it lets an agent do, in a sentence
iconstring—An image URL for the app's icon; the name's first letter otherwise
statusrequiredConnectorStatus—Where the connection stands: available, connected, syncing, expired, failed and so on
statusLabelstring—Replaces the status's default words
detailstring—A line under the status: "Last synced 2 minutes ago", "Expired Nov 3", "Waiting for the workspace admin"
accountstring—The account it signs in as: "[email protected]"
ownerstring—Whose connection it is, when shared: "Shared by Ben", "Your own account"
usedBystring—What relies on it: "Used by 4 workflows"
permissionsstring[]—What it may do, plainly: ["Read issues", "Post messages"]
canCan(["connect", "disconnect"])—What this person may do: "connect" connects or reconnects it (and changes where it applies), "disconnect" disconnects it. Left out, they may connect and not disconnect.
lockedReasonstring—Why it can't be connected: "Turned off by your admin", "Data is still being removed"
requiredReasonstring—Why it can't be disconnected: "Required by your team"
disconnectWarningstring—What stops on disconnect: "Indexed pages are deleted. 4 workflows pause."
connectLabelstringConnectThe connect button's words; Connect by default
secondaryConnectorStep—A second step: "Manage", "Retry sync", "Cancel request"
appliesTo{ legend, options }—Where it may be used, as checkboxes
layout"card" | "row"—A card in a grid, or a row in a list

Events

ConnectorCard events
EventPayloadDescription
RequestedConnect{}Start connecting: the app runs the sign-in
RequestedReconnect{}Sign in again to a connection that expired or failed
RequestedDisconnect{}Disconnect, after the person confirmed
RequestedSecondary{}The second step was pressed: "Manage", "Retry sync"
RequestedApplies{ values: string[] }Every value that should be checked now

Agent actions

What agents can do with ConnectorCard
ActionDescription
ClickedConnectStart connecting. The person finishes the sign-in; you never handle credentials.
ClickedReconnectStart reconnecting an expired or broken connection. The person finishes the sign-in.
ConfirmedDisconnectasks firstDisconnect. Name { name, account } as the target.
ToggledAppliesCheck or uncheck one place it applies to (value from page_query). Checking widens access: name the checked values as the target.

ConnectorCatalogComponent

Props

ConnectorCatalog props
NameTypeDefaultDescription
agentIdstringcatalog:<label>The id agents know this catalog by; catalog:<label> by default
labelrequiredstring—"Connectors", "Apps"
connectorsrequiredCatalogConnector[]—The services, each with its category and status
layout"card" | "row"—Cards in a grid (browsing) or rows in a list (what's connected)
searchableboolean—Show the search field and category filter; by default only for more than 6 connectors
searchPlaceholderstringName or what it doesThe search field's placeholder; Name or what it does by default
emptyTitlestringNothing to connect yetWhat an empty catalog says; Nothing to connect yet by default
emptyHintstring—A hint under the empty title at what to do next

Events

ConnectorCatalog events
EventPayloadDescription
RequestedConnect{ id: string }Start connecting a service: the app runs the sign-in
RequestedReconnect{ id: string }Sign in again to a connection that expired or failed
RequestedDisconnect{ id: string }Disconnect a service, after the person confirmed
RequestedSecondary{ id: string }A service's second step was pressed: "Manage", "Retry sync"
RequestedApplies{ id: string; values: string[] }What a service applies to changed: every value that should be checked now

Agent actions

What agents can do with ConnectorCatalog
ActionDescription
UpdatedQuerySearch connectors by name or description
ChoseCategoryShow one category (value from page_query), or "" for all

Accessibility

  • Each connector is a labelled group; its status is text, never color alone.
  • Disconnecting asks first and says what stops.
  • The catalog's search is a search landmark, and its count of results is announced as you filter.

Source