Skip to the documentation
CLI

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

Scopesconnectors:readNeeds a sign-in

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 slug that listCategories returns.

--limit <n>

Page size, from 1 to 60. The server defaults to 24.

Default24
--cursor <value>

The nextCursor of the previous page, passed back as it came. Leave it out for the first page.

--all

Fetch every page and stream the items as they arrive.

--max <n>

Stop after this many items. Implies --all.

--ndjson

Print every item as one JSON object per line. Implies --all

Examples

openemail connectors list-apps
With optional flags
openemail connectors list-apps --search calendar --limit 10
Walk every page and stop after 100 items
openemail connectors list-apps --all --max 100
One JSON object per line when piped
openemail connectors list-apps --all > connectors.ndjson

Also available in

API
GET /connector-apps
TypeScript
connectors.listApps()
Python
connectors.list_apps()
Ruby
connectors.list_apps
PHP
connectors->listApps
Go
Connectors.ListApps
Java
connectors().listApps
C#
Connectors.ListAppsAsync

openemail connectors get-app

Read one app of the catalogue by its slug

Scopesconnectors:readNeeds a sign-in

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>Required

The slug of the app, as listApps returns it: letters, digits, hyphens and underscores, up to 80 characters. The case does not matter.

Examples

openemail connectors get-app example-app
Print the raw JSON
openemail connectors get-app example-app --json

Also available in

API
GET /connector-apps/{slug}
TypeScript
connectors.getApp()
Python
connectors.get_app()
Ruby
connectors.get_app
PHP
connectors->getApp
Go
Connectors.GetApp
Java
connectors().getApp
C#
Connectors.GetAppAsync

openemail connectors list-categories

List the categories the catalogue sorts its apps into

Scopesconnectors:readNeeds a sign-in

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-categories
Print the raw JSON
openemail connectors list-categories --json

Also available in

API
GET /connector-categories
TypeScript
connectors.listCategories()
Python
connectors.list_categories()
Ruby
connectors.list_categories
PHP
connectors->listCategories
Go
Connectors.ListCategories
Java
connectors().listCategories
C#
Connectors.ListCategoriesAsync

openemail connectors list

List the connectors the caller can reach

Scopesconnectors:readNeeds a sign-inAliasesls

Usage

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: workspace for the ones shared with the workspace, account for 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, expired or paused.

--app <value>

Only the connectors of this app, by its slug.

Examples

openemail connectors list
With optional flags
openemail connectors list --status expired

Also 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

Scopesconnectors:readNeeds a sign-inAliasesshowview

Usage

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>Required

Connector id such as cnr_5c1e9a7b3d2f48e6a0b4c7d1, as list returns it.

Examples

openemail connectors get cnr_5c1e9a7b3d2f48e6a0b4c7d1
Print the raw JSON
openemail connectors get cnr_5c1e9a7b3d2f48e6a0b4c7d1 --json

Also 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

Scopesconnectors:writeNeeds a sign-in

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 slug that listApps returns. Required, here or in --data.

--scope <value>

Who the connector is for. workspace shares it with the workspace and is the default. account keeps 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. read lets it look things up. full also lets it make changes and is the default.

--data <json|@file|->

The whole body as JSON, inline, from a file with @path, or - for standard input. Flags override its keys.

Examples

The required values only
openemail connectors connect --app example-app
With optional flags
openemail connectors connect --app example-app --label 'Team notes' --access read
Read the whole body from a JSON file
openemail connectors connect --data @connector.json

Also available in

API
POST /connectors
TypeScript
connectors.connect()
Python
connectors.connect()
Ruby
connectors.connect
PHP
connectors->connect
Go
Connectors.Connect
Java
connectors().connect
C#
Connectors.ConnectAsync

openemail connectors update

Rename a connector, pause or resume it, or change its access

Scopesconnectors:writeNeeds a sign-inAliasesedit

Usage

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>Required

Connector id such as cnr_5c1e9a7b3d2f48e6a0b4c7d1, as list returns 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>

read lets the assistant only look things up through the connector. full also lets it make changes. Left out, it stays.

--paused

true pauses the connector and false resumes it. Left out, it stays as it is.

--data <json|@file|->

The whole patch as JSON, inline, from a file with @path, or - for standard input. Flags override its keys.

Examples

With optional flags
openemail connectors update cnr_5c1e9a7b3d2f48e6a0b4c7d1 --label 'Support desk' --access read
Print the raw JSON
openemail connectors update cnr_5c1e9a7b3d2f48e6a0b4c7d1 --label 'Support desk' --access read --json

Also available in

API
PATCH /connectors/{id}
TypeScript
connectors.update()
Python
connectors.update()
Ruby
connectors.update
PHP
connectors->update
Go
Connectors.Update
Java
connectors().update
C#
Connectors.UpdateAsync

openemail connectors disconnect

Disconnect an app for good

Scopesconnectors:writeNeeds a sign-in
Asks you to confirm

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>Required

Connector id such as cnr_5c1e9a7b3d2f48e6a0b4c7d1, as list returns it.

Examples

openemail connectors disconnect cnr_5c1e9a7b3d2f48e6a0b4c7d1
Skip the confirmation, for scripts
openemail connectors disconnect cnr_5c1e9a7b3d2f48e6a0b4c7d1 --yes

Also available in

API
DELETE /connectors/{id}
TypeScript
connectors.disconnect()
Python
connectors.disconnect()
Ruby
connectors.disconnect
PHP
connectors->disconnect
Go
Connectors.Disconnect
Java
connectors().disconnect
C#
Connectors.DisconnectAsync

openemail connectors reconnect

Get a fresh link to sign in to the app again

Scopesconnectors:writeNeeds a sign-in

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>Required

Connector id such as cnr_5c1e9a7b3d2f48e6a0b4c7d1, as list returns it.

Examples

openemail connectors reconnect cnr_5c1e9a7b3d2f48e6a0b4c7d1
Print the raw JSON
openemail connectors reconnect cnr_5c1e9a7b3d2f48e6a0b4c7d1 --json

Also available in

API
POST /connectors/{id}/reconnect
TypeScript
connectors.reconnect()
Python
connectors.reconnect()
Ruby
connectors.reconnect
PHP
connectors->reconnect
Go
Connectors.Reconnect
Java
connectors().reconnect
C#
Connectors.ReconnectAsync

openemail connectors list-actions

List what a connector can do

Scopesconnectors:useNeeds a sign-in

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>Required

Connector id such as cnr_5c1e9a7b3d2f48e6a0b4c7d1, as list returns 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

The required values only
openemail connectors list-actions cnr_5c1e9a7b3d2f48e6a0b4c7d1
With optional flags
openemail connectors list-actions cnr_5c1e9a7b3d2f48e6a0b4c7d1 --search 'send message' --limit 5

Also available in

API
GET /connectors/{id}/actions
TypeScript
connectors.listActions()
Python
connectors.list_actions()
Ruby
connectors.list_actions
PHP
connectors->listActions
Go
Connectors.ListActions
Java
connectors().listActions
C#
Connectors.ListActionsAsync

openemail connectors get-action

Read one action with the input it takes

Scopesconnectors:useNeeds a sign-in

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>Required

Connector id such as cnr_5c1e9a7b3d2f48e6a0b4c7d1, as list returns it.

<action>Required

The name of the action, as listActions returns it in action: letters, digits and underscores, up to 160 characters. The case does not matter.

Examples

openemail connectors get-action cnr_5c1e9a7b3d2f48e6a0b4c7d1 SEND_MESSAGE
Print the raw JSON
openemail connectors get-action cnr_5c1e9a7b3d2f48e6a0b4c7d1 SEND_MESSAGE --json

Also available in

API
GET /connectors/{id}/actions/{action}
TypeScript
connectors.getAction()
Python
connectors.get_action()
Ruby
connectors.get_action
PHP
connectors->getAction
Go
Connectors.GetAction
Java
connectors().getAction
C#
Connectors.GetActionAsync

openemail connectors run-action

Run one action in the connected app

Scopesconnectors:useNeeds a sign-in
Asks you to confirm

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>Required

Connector id such as cnr_5c1e9a7b3d2f48e6a0b4c7d1, as list returns it.

<action>Required

The name of the action, as listActions returns it in action: 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 getAction describes it. Written as JSON it holds at most 60,000 characters. Left out, the action runs with no input. JSON shaped as Record<string, unknown>, inline or from a file with @path.

--data <json|@file|->

The whole body as JSON, inline, from a file with @path, or - for standard input. Flags override its keys.

Examples

openemail connectors run-action cnr_5c1e9a7b3d2f48e6a0b4c7d1 SEND_MESSAGE
Skip the confirmation, for scripts
openemail connectors run-action cnr_5c1e9a7b3d2f48e6a0b4c7d1 SEND_MESSAGE --yes

Also available in

API
POST /connectors/{id}/actions/{action}/run
TypeScript
connectors.runAction()
Python
connectors.run_action()
Ruby
connectors.run_action
PHP
connectors->runAction
Go
Connectors.RunAction
Java
connectors().runAction
C#
Connectors.RunActionAsync

openemail connectors list-calls

List what was done through connectors, a page at a time

Scopesconnectors:readNeeds a sign-in

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: workspace or account. Left out, both are listed.

--limit <n>

Page size, from 1 to 100. The server defaults to 25.

Default25
--cursor <value>

The nextCursor of the previous page, passed back as it came. Leave it out for the first page.

--all

Fetch every page and stream the items as they arrive.

--max <n>

Stop after this many items. Implies --all.

--ndjson

Print every item as one JSON object per line. Implies --all

Examples

openemail connectors list-calls
With optional flags
openemail connectors list-calls --connector-id cnr_5c1e9a7b3d2f48e6a0b4c7d1 --limit 50
Walk every page and stop after 100 items
openemail connectors list-calls --all --max 100
One JSON object per line when piped
openemail connectors list-calls --all > connectors.ndjson

Also available in

API
GET /connector-calls
TypeScript
connectors.listCalls()
Python
connectors.list_calls()
Ruby
connectors.list_calls
PHP
connectors->listCalls
Go
Connectors.ListCalls
Java
connectors().listCalls
C#
Connectors.ListCallsAsync