import {getWorkspaceConnection} from "attio/server"

A Workspace Connection is a connection set up by a user to a third party service using either OAuth or a secret. A Workspace Connection is workspace wide, as opposed to a User Connection, which acts on behalf of a specific Attio user.

TODO: screenshot of setting up a workspace connection inside attio

API

TypeScript
function getWorkspaceConnection(): Connection

Returns

A Connection object containing:

id : string

The unique identifier for the connection.

value : string

The access token or secret for the connection.

ownedBy: { type: "workspace", id: string }

An object containing the workspace id that owns this connection.

createdBy: { type: "user", id: string }

An object containing the user id that created this connection.