openemail connectors
Every command in this namespace, with its arguments, flags and examples.
Commands
Outside apps a person connects so the assistant can look things up in them and act there: browse the apps that can be connected, connect one for the workspace or for one person, rename, pause, reconnect and disconnect it, list what it can do, run one of its actions, and read the record of what was done through it.
Every command here also takes the global flags, such as --json, --profile and --dry-run. See the global flags
openemail connectors list-apps
List the apps that can be connected, a page at a time
Usage
openemail connectors list-apps [flags]
Resolves one page of the catalogue of outside apps, the most used first. A connector links one of these apps to the workspace, or to one person, so the assistant can look things up in the app and act there.
Give search to find an app by its name or its description, or category to read one category, by a slug that listCategories returns. Each app says how many actions it offers in actions, how a person signs in to it in auth, and in connectable whether it can be connected today. Pass its slug to connect.
Add --all to walk every page: a table on a terminal, one JSON object per line when piped or with --ndjson, and one { items, hasMore, nextCursor } document with --json. --max <n> stops after that many items.
Flags
--search <value>Words to look for in the name or the description of an app, trimmed, up to 200 characters.
--category <value>Only the apps in this category, by a
slugthatlistCategoriesreturns.--limit <n>Page size, from 1 to 60. The server defaults to 24.
Default24--cursor <value>The
nextCursorof the previous page, passed back as it came. Leave it out for the first page.--allFetch every page and stream the items as they arrive.
--max <n>Stop after this many items. Implies
--all.--ndjsonPrint every item as one JSON object per line. Implies
--all
Examples
openemail connectors list-appsopenemail connectors list-apps --search calendar --limit 10openemail connectors list-apps --all --max 100openemail connectors list-apps --all > connectors.ndjsonAlso available in
openemail connectors get-app
Read one app of the catalogue by its slug
Usage
openemail connectors get-app <slug> [flags]
Looks up one app of the catalogue and returns it in the same shape as a row of listApps: its name and description, its logo and website, the categories it sits in, how many actions it offers and how a person signs in to it.
Read connectable before you call connect. An app that is listed but cannot be connected yet has connectable false and auth null.
Arguments
<slug>RequiredThe slug of the app, as
listAppsreturns it: letters, digits, hyphens and underscores, up to 80 characters. The case does not matter.
Examples
openemail connectors get-app example-appopenemail connectors get-app example-app --jsonAlso available in
openemail connectors list-categories
List the categories the catalogue sorts its apps into
Usage
openemail connectors list-categories [flags]
Resolves every category of the catalogue in one array. The list comes whole and is never paged. Pass the slug of a category as category to listApps to read only the apps in it. An app names the categories it sits in under categories.
Examples
openemail connectors list-categoriesopenemail connectors list-categories --jsonAlso available in
openemail connectors list
List the connectors the caller can reach
lsUsage
openemail connectors list [flags]
Resolves every connector the caller can reach in one array, by scope and then by the name of the app. The list comes whole and is never paged. A connector is one outside app that somebody connected, so the assistant can look things up in it and act there. It belongs to the workspace, where tasks and everyone allowed to use connectors reach it, or to one person. scope says which: workspace or account.
status is pending until the person has finished signing in to the app, active while it works, paused while a person or the plan holds it back, and expired when the app stopped accepting the connection and it has to be reconnected. access is read when the assistant may only look things up through the connector and full when it may also make changes.
Narrow the list with scope, status or app.
Flags
--scope <value>Only one kind of connector:
workspacefor the ones shared with the workspace,accountfor the ones that belong to the person an app acts for. Left out, both are listed.--status <value>Only connectors in this state:
pending,active,expiredorpaused.--app <value>Only the connectors of this app, by its slug.
Examples
openemail connectors listopenemail connectors list --status expiredAlso available in
- API
GET /connectors- TypeScript
connectors.list()- Python
connectors.list()- Ruby
connectors.list- PHP
connectors->list- Go
Connectors.List- Java
connectors().list- C#
Connectors.ListAsync
openemail connectors get
Read one connector by id
showviewUsage
openemail connectors get <id> [flags]
Looks up one connector and returns it in the same shape as a row of list, read fresh. While a sign-in is still open, after connect or reconnect, the call also checks whether the person has finished it. So this is the call to make after sending somebody to connectUrl: status is active once they are done.
A connector that is still pending when its link runs out is removed, and so is one whose sign-in failed. The call then answers 404 connector_not_found. Start over with connect.
Arguments
<id>RequiredConnector id such as
cnr_5c1e9a7b3d2f48e6a0b4c7d1, aslistreturns it.
Examples
openemail connectors get cnr_5c1e9a7b3d2f48e6a0b4c7d1openemail connectors get cnr_5c1e9a7b3d2f48e6a0b4c7d1 --jsonAlso available in
- API
GET /connectors/{id}- TypeScript
connectors.get()- Python
connectors.get()- Ruby
connectors.get- PHP
connectors->get- Go
Connectors.Get- Java
connectors().get- C#
Connectors.GetAsync
openemail connectors connect
Start connecting an app
Usage
openemail connectors connect --app <value> [flags] openemail connectors connect --data <json|@file|-> [flags]
Starts connecting an app and resolves with the new connector and a connectUrl. A person has to open that link and sign in to the app there, or enter its key. That happens on a page outside this API, so the secret never passes through the caller. Until they have finished, the connector is pending and nothing can run through it. Read it again with get: status is active once they are done.
The link works until connectExpiresAt, at most 30 minutes, and only this answer shows it. A connector that is still pending when its link runs out is removed. Until then reconnect gives it a fresh link.
With no scope the connector is shared with the workspace, where tasks and everyone allowed to use connectors reach it. scope: 'account' keeps it to the person an app acts for.
Flags
--app <value>The app to connect, by the
slugthatlistAppsreturns. Required, here or in--data.--scope <value>Who the connector is for.
workspaceshares it with the workspace and is the default.accountkeeps it to the person connecting it, which only an app that person connected may ask for.--label <value>A name of your own for the connector, trimmed, up to 80 characters. Left out, it has none.
--access <value>What the assistant may do through the connector.
readlets it look things up.fullalso lets it make changes and is the default.--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
openemail connectors connect --app example-appopenemail connectors connect --app example-app --label 'Team notes' --access readopenemail connectors connect --data @connector.jsonAlso available in
openemail connectors update
Rename a connector, pause or resume it, or change its access
editUsage
openemail connectors update <id> [flags]
Changes a connector and resolves with it as it is stored. Send only what changes: a field left out stays as it is, and a patch with nothing in it is a 422.
paused: true stops the assistant, tasks and runAction from using the connector until paused: false resumes it. Only an active connector can be paused. access switches between read, where only actions that look something up may run, and full. label renames the connector, and null takes its name away.
It does not sign in again. A connector that is expired needs reconnect.
Arguments
<id>RequiredConnector id such as
cnr_5c1e9a7b3d2f48e6a0b4c7d1, aslistreturns it.
Flags
--label <value>A name of your own for the connector, trimmed, up to 80 characters. Null clears it. Left out, the name stays.
--access <value>readlets the assistant only look things up through the connector.fullalso lets it make changes. Left out, it stays.--pausedtruepauses the connector andfalseresumes it. Left out, it stays as it is.--data <json|@file|->The whole
patchas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
openemail connectors update cnr_5c1e9a7b3d2f48e6a0b4c7d1 --label 'Support desk' --access readopenemail connectors update cnr_5c1e9a7b3d2f48e6a0b4c7d1 --label 'Support desk' --access read --jsonAlso available in
openemail connectors disconnect
Disconnect an app for good
Usage
openemail connectors disconnect <id> [flags]
Disconnects the app and removes the connector for good. The access it held in the outside app is given up there too, and the record of the calls made through it goes with it. A task that named the connector can no longer reach the app.
There is no undo. To stop a connector and keep it, use update with paused: true. To use the app again later, start over with connect.
Arguments
<id>RequiredConnector id such as
cnr_5c1e9a7b3d2f48e6a0b4c7d1, aslistreturns it.
Examples
openemail connectors disconnect cnr_5c1e9a7b3d2f48e6a0b4c7d1openemail connectors disconnect cnr_5c1e9a7b3d2f48e6a0b4c7d1 --yesAlso available in
openemail connectors reconnect
Get a fresh link to sign in to the app again
Usage
openemail connectors reconnect <id> [flags]
Resolves with a fresh connectUrl for a connector that is expired, or that is still pending because nobody finished its first link. As with connect, a person has to open the link and sign in to the app there, or enter its key, on a page outside this API. Read the connector again with get afterwards: it is active once they are done.
The connector keeps its id, label and access. The answer shows it as it is now, before anybody has signed in again, and a connector that still works keeps working on its old sign-in until the new one is finished. It takes no body.
Arguments
<id>RequiredConnector id such as
cnr_5c1e9a7b3d2f48e6a0b4c7d1, aslistreturns it.
Examples
openemail connectors reconnect cnr_5c1e9a7b3d2f48e6a0b4c7d1openemail connectors reconnect cnr_5c1e9a7b3d2f48e6a0b4c7d1 --jsonAlso available in
openemail connectors list-actions
List what a connector can do
Usage
openemail connectors list-actions <id> [flags]
Resolves the actions of the app behind a connector that match search, or its most used ones when search is left out. An action is one thing the app can do, such as finding a record or sending a message. Each one has the name to run it by in action, what it is called in name, what it does in description, and its kind: read when it only looks something up, and change when it creates, updates, sends or deletes something, or when the app does not say.
The list is not paged and holds at most 30 actions, so use search to find one that is not among the first. A connector whose access is read lists only the actions that read. getAction adds the input an action takes.
Arguments
<id>RequiredConnector id such as
cnr_5c1e9a7b3d2f48e6a0b4c7d1, aslistreturns it.
Flags
--search <value>Words to look for in the name or the description of an action, trimmed, up to 200 characters. Left out, the most used actions are listed.
--limit <n>How many actions to return, from 1 to 30. The server defaults to 12.
Default12
Examples
openemail connectors list-actions cnr_5c1e9a7b3d2f48e6a0b4c7d1openemail connectors list-actions cnr_5c1e9a7b3d2f48e6a0b4c7d1 --search 'send message' --limit 5Also available in
openemail connectors get-action
Read one action with the input it takes
Usage
openemail connectors get-action <id> <action> [flags]
Looks up one action of the app behind a connector and returns it as listActions does, with input added: the input the action takes, as a JSON Schema. Build the input of runAction from it. kind says whether running the action only reads or changes something in the app.
Arguments
<id>RequiredConnector id such as
cnr_5c1e9a7b3d2f48e6a0b4c7d1, aslistreturns it.<action>RequiredThe name of the action, as
listActionsreturns it inaction: letters, digits and underscores, up to 160 characters. The case does not matter.
Examples
openemail connectors get-action cnr_5c1e9a7b3d2f48e6a0b4c7d1 SEND_MESSAGEopenemail connectors get-action cnr_5c1e9a7b3d2f48e6a0b4c7d1 SEND_MESSAGE --jsonAlso available in
openemail connectors run-action
Run one action in the connected app
Usage
openemail connectors run-action <id> <action> [flags]
Runs one action in the app behind a connector and resolves with what the app answered. An action that reads runs at once, and so does one that changes something: over the API nobody is asked first, so the caller decides. In the OpenEmail app the assistant asks a person before every change. A change made in the outside app cannot be taken back from here.
input is the input of the action as an object, shaped as the JSON Schema that getAction returns for it. Call it with no body for an action that takes none.
The promise resolves whether or not the app carried the action out. ok is true when it did, with the answer of the app in data. When the app itself refuses, ok is false and error holds what it said. Every run is listed by listCalls, without its input and without its result.
Arguments
<id>RequiredConnector id such as
cnr_5c1e9a7b3d2f48e6a0b4c7d1, aslistreturns it.<action>RequiredThe name of the action, as
listActionsreturns it inaction: letters, digits and underscores, up to 160 characters. The case does not matter.
Flags
--action-input <json|@file|->The input of the action as an object, shaped as
getActiondescribes it. Written as JSON it holds at most 60,000 characters. Left out, the action runs with no input. JSON shaped asRecord<string, unknown>, inline or from a file with @path.--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
openemail connectors run-action cnr_5c1e9a7b3d2f48e6a0b4c7d1 SEND_MESSAGEopenemail connectors run-action cnr_5c1e9a7b3d2f48e6a0b4c7d1 SEND_MESSAGE --yesAlso available in
openemail connectors list-calls
List what was done through connectors, a page at a time
Usage
openemail connectors list-calls [flags]
Resolves one page of the record of calls, newest first: every action that ran through a connector the caller can reach. Each call names the connector and its app, the action, whether it read or changed something in kind, how it ended in status, where it came from in source and how long it took in durationMs.
A call record holds no input and no result. Those are never kept. Calls are kept for 90 days, and the calls of a connector go with it when it is disconnected.
Give --connector-id to read the calls of one connector, or scope to read only the calls of workspace connectors or only those of a person's own.
Add --all to walk every page: a table on a terminal, one JSON object per line when piped or with --ndjson, and one { items, hasMore, nextCursor } document with --json. --max <n> stops after that many items.
Flags
--connector-id <value>Only the calls made through this connector, by its id.
--scope <value>Only the calls of one kind of connector:
workspaceoraccount. Left out, both are listed.--limit <n>Page size, from 1 to 100. The server defaults to 25.
Default25--cursor <value>The
nextCursorof the previous page, passed back as it came. Leave it out for the first page.--allFetch every page and stream the items as they arrive.
--max <n>Stop after this many items. Implies
--all.--ndjsonPrint every item as one JSON object per line. Implies
--all
Examples
openemail connectors list-callsopenemail connectors list-calls --connector-id cnr_5c1e9a7b3d2f48e6a0b4c7d1 --limit 50openemail connectors list-calls --all --max 100openemail connectors list-calls --all > connectors.ndjson