openemail knowledge
Every command in this namespace, with its arguments, flags and examples.
Commands
The notes, files and web pages the AI uses when it writes replies, drafts email and answers in the assistant, each kept for the whole workspace, one domain or one address: list and search them, add a note, a link or a file, change, read again and delete them, and see the levels and how much the plan allows. Review the notes the AI suggests and the questions nothing answers, settle duplicate and conflict flags, keep a site, sitemap, feed or Zendesk help center in step with connectors, draft a note from a conversation, and read how often the AI used it.
Every command here also takes the global flags, such as --json, --profile and --dry-run. See the global flags
knowledge listknowledge levelsknowledge usageknowledge searchknowledge create-noteknowledge add-linkknowledge upload-fileknowledge getknowledge updateknowledge deleteknowledge refreshknowledge statsknowledge list-suggestionsknowledge accept-suggestionknowledge dismiss-suggestionknowledge list-flagsknowledge dismiss-flagknowledge list-connectorsknowledge add-connectorknowledge get-connectorknowledge update-connectorknowledge delete-connectorknowledge sync-connectorknowledge draft-from-thread
openemail knowledge list
List one page of the knowledge base
lsUsage
openemail knowledge list [flags]
Resolves one page of the knowledge base, newest first: the notes, files and web pages the AI uses when it writes replies, drafts email and answers in the assistant. Each item says where it sits, whether the AI can use it yet and how much text was read from it.
Every item sits at one level, its scope: an empty string for the whole workspace, @ and a domain for everything on that domain (@acme.com), or one address ([email protected]). The AI writing for an address reads that address, then its domain, then the whole workspace, the most specific first. level names the kind of level, workspace, domain or address.
status is queued or processing while the text is read and indexed, ready once the AI can use it, and failed with a failure when it could not be read. A key or an app limited to particular addresses sees the whole-workspace items and the items at its addresses and at their domains.
Each item also says how the AI uses it: uses counts the times it came up in a reply suggestion, a draft, the assistant or a search, with lastUsedAt the latest, and flags counts the open duplicate and conflict flags that name it. A link read again on a schedule has refreshDays and nextRefreshAt, a page kept by a connector names it in connectorId, and a note saved from a conversation names it in threadId.
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
--scope <value>Keeps the items at exactly this level:
@and a domain such as@acme.com, or one address. An empty string is not sent, so ask for the whole-workspace items withlevel: 'workspace'.--level <value>Keeps one kind of level:
workspace,domainoraddress.--kind <value>Keeps one kind of item:
note,fileorlink.--status <value>Keeps one status:
queued,processing,readyorfailed.--pinnedtruekeeps the pinned notes andfalseeverything else.--q <value>Words in the title, the file name or the link, matched without regard to case or accents.
--limit <n>Page size, from 1 to 100. The server defaults to 50.
Default25--cursor <value>The
nextCursorof the previous page. 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 knowledge listopenemail knowledge list --level domain --kind fileopenemail knowledge list --all --max 100openemail knowledge list --all > knowledge.ndjsonAlso available in
- API
GET /knowledge- TypeScript
knowledge.list()- Python
knowledge.list()- Ruby
knowledge.list- PHP
knowledge->list
openemail knowledge levels
List the levels knowledge can sit at
Usage
openemail knowledge levels [flags]
Resolves every level the caller can see: the whole workspace first, then each domain, then each address, with how many items each holds and whether the caller may add and change items there. Pass its scope when you add an item.
A key or an app limited to particular addresses sees the whole workspace, its addresses and their domains. writable is true at the whole workspace only for a caller that reaches every address, at a domain for one that holds the whole domain, and at an address for one that holds that address.
Examples
openemail knowledge levelsopenemail knowledge levels --jsonAlso available in
- API
GET /knowledge/levels- TypeScript
knowledge.levels()- Python
knowledge.levels()- Ruby
knowledge.levels- PHP
knowledge->levels
openemail knowledge usage
Read how much of the plan the knowledge base uses
Usage
openemail knowledge usage [flags]
Resolves how many items and how many characters of text the workspace keeps in its knowledge base, beside what its plan allows in limits: 50 items and 1,000,000 characters on Free, 500 and 10,000,000 on Starter, 2,000 and 50,000,000 on Business, and 10,000 and 200,000,000 on Enterprise.
An item counts as soon as it is added, and its characters once its text has been read. The numbers are for the whole workspace, whatever the key may reach.
Examples
openemail knowledge usageopenemail knowledge usage --jsonAlso available in
- API
GET /knowledge/usage- TypeScript
knowledge.usage()- Python
knowledge.usage()- Ruby
knowledge.usage- PHP
knowledge->usage
openemail knowledge search
Search the knowledge base the way the AI does
Usage
openemail knowledge search --query <value> [flags] openemail knowledge search --data <json|@file|-> [flags]
Resolves the passages that best answer query, best first, found by meaning and by words the way the AI finds them when it writes. Each hit names the item it comes from in sourceId, with its title, kind, level and link, the headings the passage sits under and the passage itself.
With address, it searches the levels the AI uses for that address: the address, its domain and the whole workspace, the most specific ranked a little higher. With scope, it searches that one level, and scope wins when both are given. With neither, it searches every level the caller can see.
With rerank: true, the AI reads the best 25 passages and puts them in the order that best answers query, leaving out the ones that do not help. It adds a second or two and counts as one AI action, and reranked says whether it happened: when it cannot finish, the passages keep their usual order and reranked is false.
Flags
--query <value>What to look for, in plain words, up to 500 characters. Required, here or in
--data.--address <value>An address of the workspace, to search the levels the AI uses when it writes as that address.
--scope <value>One level to search: an empty string for the whole workspace,
@and a domain, or one address.--limit <n>How many passages, from 1 to 25. The server defaults to 8.
--rerankHas the AI put the passages in the order that best answers
query. Left out, false.--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
openemail knowledge search --query 'How long do refunds take?'openemail knowledge search --query 'How long do refunds take?' --address [email protected]openemail knowledge search --data @knowledge.jsonAlso available in
- API
POST /knowledge/search- TypeScript
knowledge.search()- Python
knowledge.search()- Ruby
knowledge.search- PHP
knowledge->search
openemail knowledge create-note
Add a note to the knowledge base
Usage
openemail knowledge create-note --title <value> --body <value> [flags] openemail knowledge create-note --data <json|@file|-> [flags]
Saves a note of up to 20,000 characters at one level and resolves with it. Markdown is kept, and its headings become the headings the passages sit under. A note is usually ready for the AI within a second or two, and queued or processing until then.
pinned: true puts the note into every prompt the AI writes at its level, not only when it matches what is being written. The AI reads at most 2,000 characters of pinned notes from each level, so keep them short.
Changing an item needs reach over every address its level covers: the whole workspace needs every address, a domain needs the whole domain, and an address needs that address. A key or an app limited to particular addresses can change items only at those addresses, or at domains it holds whole.
Flags
--scope <value>The level: an empty string, or left out, for the whole workspace,
@and a domain such as@acme.com, or one address such as[email protected].Default""--title <value>A short name for the note, at most 200 characters. Required, here or in
--data.--body <value>The text, up to 20,000 characters, in Markdown if you like. Required, here or in
--data.--pinnedPuts the note into every prompt at its level. Left out, false.
--thread-id <value>The conversation the note comes from, such as the one
draftFromThreadread. It is kept on the note as--thread-id.--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
openemail knowledge create-note --title Refunds --body 'Refunds are paid within 14 days of the return reaching our warehouse.'openemail knowledge create-note --title Refunds --body 'Refunds are paid within 14 days of the return reaching our warehouse.' --scope @acme.com --pinnedopenemail knowledge create-note --data @knowledge.jsonAlso available in
openemail knowledge add-link
Add a web page to the knowledge base
Usage
openemail knowledge add-link --url <value> [flags] openemail knowledge add-link --data <json|@file|-> [flags]
Adds a public web page at one level and resolves with it, queued. The page is fetched and read in the background, and the AI uses it once its status is ready. Without a title, the item is named after the link until the page is read, and then after the page's own title.
url is a public http or https address of at most 2,048 characters, and it is kept as https. An address on a private or local host, or one with a user name, a password or a port, is refused. A level holds a page once, and refresh fetches it again after it changes. With --refresh-days, the page is also read again every 1, 7 or 30 days on its own, nextRefreshAt says when, and a changed page reaches the AI without a call.
Changing an item needs reach over every address its level covers: the whole workspace needs every address, a domain needs the whole domain, and an address needs that address. A key or an app limited to particular addresses can change items only at those addresses, or at domains it holds whole.
Flags
--scope <value>The level: an empty string, or left out, for the whole workspace,
@and a domain such as@acme.com, or one address such as[email protected].Default""--url <value>The page, a public
httporhttpsaddress of at most 2,048 characters. Required, here or in--data.--title <value>A name for the item, at most 200 characters. Left out, the page's own title once it has been read.
--refresh-days <n>Reads the page again every 1, 7 or 30 days. Left out or
null, it is read again only when you callrefresh.--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
openemail knowledge add-link --url https://acme.com/shippingopenemail knowledge add-link --url https://acme.com/shipping --scope @acme.comopenemail knowledge add-link --data @knowledge.jsonAlso available in
- API
POST /knowledge/links- TypeScript
knowledge.addLink()- Python
knowledge.add_link()- Ruby
knowledge.add_link- PHP
knowledge->addLink
openemail knowledge upload-file
Upload a file to the knowledge base
Usage
openemail knowledge upload-file <data> [flags]
Stores a document or an image at one level and resolves with it, queued. Its text is read in the background, and the AI uses it once its status is ready. PDFs, Word documents, spreadsheets (Excel, OpenDocument, Numbers and CSV), OpenDocument text, HTML, XML, Markdown, plain text, JSON and images (JPEG, PNG, WebP and SVG) can be read.
data is a Blob, an ArrayBuffer or a Uint8Array, sent as the request body. The name travels as the filename query parameter, and the type is --content-type, a Blob's own type when that is left out, or the extension of the name when the type is generic. A document can be up to 20 MB and an image up to 10 MB.
Changing an item needs reach over every address its level covers: the whole workspace needs every address, a domain needs the whole domain, and an address needs that address. A key or an app limited to particular addresses can change items only at those addresses, or at domains it holds whole.
Arguments
<data>RequiredThe file: a
Blob,ArrayBufferorUint8Array, not empty, at most 20 MB for a document and 10 MB for an image.
Flags
--filename <value>The file name, such as
price-list.pdf. Its extension tells the kind of file when the type is generic. A missing or blank name throws before anything is sent.--content-type <value>The MIME type, such as
application/pdf. Left out, aBlob's own type is used, else the extension offilename.--scope <value>The level: an empty string, or left out, for the whole workspace,
@and a domain such as@acme.com, or one address such as[email protected].--title <value>A name for the item, at most 200 characters. Left out, the file name without its extension.
--timeout-ms <n>How long the upload may take, in milliseconds. Left out, it is 10 minutes, or the client
--timeout-mswhen that is longer.0waits as long as it takes.
Examples
openemail knowledge upload-file ./photo.jpgopenemail knowledge upload-file ./photo.jpg --filename price-list.pdf --content-type application/pdf --scope [email protected]Also available in
openemail knowledge get
Read one knowledge item and its text
showviewUsage
openemail knowledge get <id> [flags]
Resolves one item with its text: the body of a note, or in preview the first 20,000 characters read from a file or a page, with previewTruncated true when the text goes on past it. preview is null while a file or a page has not been read yet, and body is null for anything but a note.
Arguments
<id>RequiredThe id of the item,
kb_and 24 hex characters, aslistreturns it.
Examples
openemail knowledge get kb_8c1f4a2b9d7e3f60a5c7b21dopenemail knowledge get kb_8c1f4a2b9d7e3f60a5c7b21d --jsonAlso available in
- API
GET /knowledge/{id}- TypeScript
knowledge.get()- Python
knowledge.get()- Ruby
knowledge.get- PHP
knowledge->get
openemail knowledge update
Change a knowledge item
editUsage
openemail knowledge update <id> [flags]
Changes the title of an item, the text of a note, the page of a link, how often a link is read again, whether a note is pinned, or its level, and resolves with the item as it is now. Give at least one field. A changed title, text or link is read and indexed again, so the item goes back to queued, and its previous text stays in use until the new one is ready. Moving an item to another level needs no new reading.
Changing an item needs reach over every address its level covers: the whole workspace needs every address, a domain needs the whole domain, and an address needs that address. A key or an app limited to particular addresses can change items only at those addresses, or at domains it holds whole. Moving an item needs that reach at both levels.
Arguments
<id>RequiredThe id of the item,
kb_and 24 hex characters, aslistreturns it.
Flags
--title <value>A new name, at most 200 characters.
--body <value>The new text of a note, up to 20,000 characters.
--scope <value>The level to move it to: an empty string for the whole workspace,
@and a domain, or one address.--pinnedWhether a note goes into every prompt at its level.
--url <value>The new page of a link, a public
httporhttpsaddress.--refresh-days <n>Reads a link again every 1, 7 or 30 days, counted from now.
nullstops that.--data <json|@file|->The whole
patchas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
openemail knowledge update kb_8c1f4a2b9d7e3f60a5c7b21d --body 'Refunds are paid within 10 days of the return reaching our warehouse.' --pinnedopenemail knowledge update kb_8c1f4a2b9d7e3f60a5c7b21d --body 'Refunds are paid within 10 days of the return reaching our warehouse.' --pinned --jsonAlso available in
- API
PATCH /knowledge/{id}- TypeScript
knowledge.update()- Python
knowledge.update()- Ruby
knowledge.update- PHP
knowledge->update
openemail knowledge delete
Delete a knowledge item for good
rmdelremoveUsage
openemail knowledge delete <id> [flags]
Removes an item with its file and every passage read from it, and the AI stops using it at once. There is no undo.
Arguments
<id>RequiredThe id of the item,
kb_and 24 hex characters, aslistreturns it.
Examples
openemail knowledge delete kb_8c1f4a2b9d7e3f60a5c7b21dopenemail knowledge delete kb_8c1f4a2b9d7e3f60a5c7b21d --yesAlso available in
- API
DELETE /knowledge/{id}- TypeScript
knowledge.delete()- Python
knowledge.delete()- Ruby
knowledge.delete- PHP
knowledge->delete
openemail knowledge refresh
Read a knowledge item again
Usage
openemail knowledge refresh <id> [flags]
Fetches a link again, reads a file again or indexes a note again, clears any failure and resolves with the item, back at queued. Use it after a page changed or when an item failed. The previous text stays in use until the new one is ready.
Arguments
<id>RequiredThe id of the item,
kb_and 24 hex characters, aslistreturns it.
Examples
openemail knowledge refresh kb_8c1f4a2b9d7e3f60a5c7b21dopenemail knowledge refresh kb_8c1f4a2b9d7e3f60a5c7b21d --jsonAlso available in
- API
POST /knowledge/{id}/refresh- TypeScript
knowledge.refresh()- Python
knowledge.refresh()- Ruby
knowledge.refresh- PHP
knowledge->refresh
openemail knowledge stats
Read how the AI used the knowledge base
Usage
openemail knowledge stats [flags]
Resolves how the AI used the knowledge base over the last days days, today included, 30 unless you say. uses counts the times a reply suggestion, a draft, the assistant or a search found something in it, and empty the times it looked and found nothing. coverage is uses divided by the two together, from 0 to 1, and 0 when it never looked. bySurface splits uses by where they happened, under the keys compose, reply, chat, tool and search, and series has one entry per day, oldest first, days with nothing included.
topItems lists the items used most, ever, and unusedItems counts the ready items the AI has never used. pendingSuggestions counts the learned notes waiting for review, openQuestions the questions senders asked that nothing answers yet, and openFlags the open duplicate and conflict flags. uses, empty, bySurface and series cover the whole workspace, while the items, suggestions, questions and flags count only what the caller can see.
Flags
--days <n>How many days back to count, today included, from 1 to 90. The server defaults to 30.
Default30
Examples
openemail knowledge statsopenemail knowledge stats --days 7openemail knowledge stats --jsonAlso available in
- API
GET /knowledge/stats- TypeScript
knowledge.stats()- Python
knowledge.stats()- Ruby
knowledge.stats- PHP
knowledge->stats
openemail knowledge list-suggestions
List one page of knowledge suggestions and questions
Usage
openemail knowledge list-suggestions [flags]
Resolves one page of what the AI suggests adding to the knowledge base, the most recent first, pending ones unless you ask for another status.
A learned suggestion is a note the AI drew from a reply sent from the workspace: it reads the message the reply answers and the reply, and keeps up to three facts that would hold for other people too, at the level of the domain the reply was sent from, or the whole workspace when that domain is not one of its own. Facts the knowledge base already holds are left out, and at most 100 replies a day are read. A question is something a sender asked about the business that neither the conversation nor the knowledge base answers: when the AI suggests replies to an incoming message, it notes up to 3 such questions, at the level of the domain the message arrived at, chosen the same way. Accept a question with its answer and it becomes a note.
The same fact or question again counts up occurrences instead of adding a second suggestion, and one that was dismissed is not suggested again. Both kinds stop while the workspace setting knowledgeLearning is off, which settings.update changes.
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
--kind <value>Keeps one kind:
learnedfor notes drawn from sent replies, orquestionfor questions nothing answers.--status <value>Keeps one status:
pending,acceptedordismissed. Left out,pending.Default"pending"--limit <n>Page size, from 1 to 100. The server defaults to 50.
Default25--cursor <value>The
nextCursorof the previous page. 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 knowledge list-suggestionsopenemail knowledge list-suggestions --kind questionopenemail knowledge list-suggestions --all --max 100openemail knowledge list-suggestions --all > knowledge.ndjsonAlso available in
openemail knowledge accept-suggestion
Save a knowledge suggestion as a note
Usage
openemail knowledge accept-suggestion <id> [flags]
Saves a pending suggestion or question as a note, marks it accepted and resolves with both: the suggestion, its sourceId naming the new note, and the note itself in item. Any field you send takes the place of the suggested one, so you can tidy the title, rewrite the text, move it to another level or pin it on the way in. The note keeps the conversation the suggestion came from in threadId.
A question needs its answer in body, and its title stays the question unless you send one. Answering a question this way is how it becomes a note the AI uses from then on.
Changing an item needs reach over every address its level covers: the whole workspace needs every address, a domain needs the whole domain, and an address needs that address. A key or an app limited to particular addresses can change items only at those addresses, or at domains it holds whole.
Arguments
<id>RequiredThe id of the suggestion or question,
kp_and 24 hex characters, aslistSuggestionsreturns it.
Flags
--title <value>A title for the note, at most 200 characters. Left out, the suggested title or the question.
--body <value>The text of the note, up to 20,000 characters. Left out, the suggested note. A question needs it: the answer.
--scope <value>The level for the note: an empty string for the whole workspace,
@and a domain, or one address. Left out, the suggested level.--pinnedPuts the note into every prompt at its level. Left out, false.
--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
openemail knowledge accept-suggestion kp_3f9a1c7e5b2d8046a1c3e5f7openemail knowledge accept-suggestion kp_3f9a1c7e5b2d8046a1c3e5f7 --body 'Orders over 50 euros ship free within the EU.'Also available in
openemail knowledge dismiss-suggestion
Dismiss a knowledge suggestion or question
Usage
openemail knowledge dismiss-suggestion <id> [flags]
Marks a pending suggestion or question dismissed and resolves with it. It leaves the pending list, the same fact or question is not suggested again, and nothing is added to the knowledge base.
Dismissing needs the reach to add a note at the level of the suggestion: the whole workspace needs every address, a domain needs the whole domain, and an address needs that address.
Arguments
<id>RequiredThe id of the suggestion or question,
kp_and 24 hex characters, aslistSuggestionsreturns it.
Examples
openemail knowledge dismiss-suggestion kp_3f9a1c7e5b2d8046a1c3e5f7openemail knowledge dismiss-suggestion kp_3f9a1c7e5b2d8046a1c3e5f7 --jsonAlso available in
openemail knowledge list-flags
List the open duplicate and conflict flags
Usage
openemail knowledge list-flags [flags]
Resolves the open warnings about pairs of knowledge items, newest first. Each item is compared with the closest items at every level when it is indexed, and again whenever it changes. duplicate means the two items say nearly the same thing. conflict means the AI found that two closely related items disagree on a fact, such as a price or a deadline, and detail says how in one sentence. The AI looks for conflicts while the workspace setting knowledgeLearning is on, at most 200 times a day.
Change or delete one of the two items to settle a flag: a changed item is compared again once it is indexed, and the flags of a deleted item go with it. When the two are fine as they are, dismiss the flag with dismissFlag. A flag shows only to a caller who can see both items.
Flags
--item-id <value>Keeps the flags that name this knowledge item, on either side.
--limit <n>How many flags, from 1 to 100. The server defaults to 50.
Default50
Examples
openemail knowledge list-flagsopenemail knowledge list-flags --jsonAlso available in
- API
GET /knowledge/flags- TypeScript
knowledge.listFlags()- Python
knowledge.list_flags()- Ruby
knowledge.list_flags- PHP
knowledge->listFlags
openemail knowledge dismiss-flag
Dismiss a duplicate or conflict flag
Usage
openemail knowledge dismiss-flag <id> [flags]
Marks a flag dismissed when the two items are fine as they are, and resolves with it. The same two items are not flagged for the same reason again. To settle a real duplicate or conflict instead, change or delete one of the items.
Dismissing needs the reach to change items at the levels of both items: the whole workspace needs every address, a domain needs the whole domain, and an address needs that address.
Arguments
<id>RequiredThe id of the flag,
kf_and 24 hex characters, aslistFlagsreturns it.
Examples
openemail knowledge dismiss-flag kb_8c1f4a2b9d7e3f60a5c7b21dopenemail knowledge dismiss-flag kb_8c1f4a2b9d7e3f60a5c7b21d --jsonAlso available in
openemail knowledge list-connectors
List the knowledge connectors
Usage
openemail knowledge list-connectors [flags]
Resolves every connector at a level the caller can see, newest first. A connector keeps many web pages from one source in the knowledge base, each page as a link item at the connector's level: a site it crawls, a sitemap, an RSS or Atom feed, or a Zendesk help center. Each one says how many items it keeps, its status, when it last synced and when it syncs next.
Examples
openemail knowledge list-connectorsopenemail knowledge list-connectors --jsonAlso available in
openemail knowledge add-connector
Keep the pages of a site, sitemap, feed or help center
Usage
openemail knowledge add-connector --kind <value> --url <value> [flags] openemail knowledge add-connector --data <json|@file|-> [flags]
Adds a connector at one level and resolves with it, queued. Its first sync starts within a minute, and every page it finds becomes a link item at the connector's level, read in the background like any other link.
site reads the page at url and follows its links to pages on the same host under the same path, leaving out what the site's robots.txt disallows. sitemap reads a sitemap, or a sitemap index and up to 5 of its sitemaps. feed reads an RSS or Atom feed. zendesk reads the published articles of a Zendesk help center from its address, such as https://example.zendesk.com.
It keeps at most --page-limit pages, 25 unless you say, and syncs again every --refresh-days days, 7 unless you say: new pages are added, changed ones are read again and the items of pages that are gone are removed. A page already in the knowledge base as a link at the same level is left to that item. Its items count toward the plan allowance, and a sync stops adding pages once that is reached.
Changing an item needs reach over every address its level covers: the whole workspace needs every address, a domain needs the whole domain, and an address needs that address. A key or an app limited to particular addresses can change items only at those addresses, or at domains it holds whole.
Flags
--kind <value>What
urlis:site,sitemap,feedorzendesk. Required, here or in--data.--url <value>A public web address of at most 2,048 characters, kept as
https: the page a site crawl starts from, the sitemap, the feed, or the address of the help center. Required, here or in--data.--scope <value>The level: an empty string, or left out, for the whole workspace,
@and a domain such as@acme.com, or one address such as[email protected].Default""--title <value>A name for the connector, at most 200 characters. Left out, the host and the kind, such as
acme.com (sitemap).--refresh-days <n>Sync again every 1, 7 or 30 days. Left out, 7.
nullsyncs only when you callsyncConnector.--page-limit <n>The most pages to keep, from 1 to 200. Left out, 25.
Default25--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
openemail knowledge add-connector --kind sitemap --url https://acme.com/sitemap.xmlopenemail knowledge add-connector --kind sitemap --url https://acme.com/sitemap.xml --scope @acme.com --page-limit 100openemail knowledge add-connector --data @knowledge.jsonAlso available in
openemail knowledge get-connector
Read one knowledge connector
Usage
openemail knowledge get-connector <id> [flags]
Resolves one connector: its source, its level, how many items it keeps, its status, and when it last synced and syncs next. status is queued until a sync starts, syncing while it reads the source, ready once its pages are items, and failed with a failure when the source could not be read after several tries.
Arguments
<id>RequiredThe id of the connector,
kc_and 24 hex characters, aslistConnectorsreturns it.
Examples
openemail knowledge get-connector kc_5d2e8f1a3c7b9064e2a4c6f8openemail knowledge get-connector kc_5d2e8f1a3c7b9064e2a4c6f8 --jsonAlso available in
openemail knowledge update-connector
Change a knowledge connector
Usage
openemail knowledge update-connector <id> [flags]
Changes the title of a connector, its level, how often it syncs or the most pages it keeps, and resolves with it as it is now. Give at least one field. Moving it to another level moves its items with it, and they are indexed again there. A new --refresh-days counts from the last sync, and a new --page-limit applies from the next sync.
Changing an item needs reach over every address its level covers: the whole workspace needs every address, a domain needs the whole domain, and an address needs that address. A key or an app limited to particular addresses can change items only at those addresses, or at domains it holds whole. Moving a connector needs that reach at both levels.
Arguments
<id>RequiredThe id of the connector,
kc_and 24 hex characters, aslistConnectorsreturns it.
Flags
--title <value>A new name, at most 200 characters.
--scope <value>The level to move it and its items to: an empty string for the whole workspace,
@and a domain, or one address.--refresh-days <n>Sync every 1, 7 or 30 days.
nullsyncs only when you callsyncConnector.--page-limit <n>The most pages to keep, from 1 to 200.
--data <json|@file|->The whole
patchas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
openemail knowledge update-connector kc_5d2e8f1a3c7b9064e2a4c6f8 --refresh-days 1 --page-limit 150openemail knowledge update-connector kc_5d2e8f1a3c7b9064e2a4c6f8 --refresh-days 1 --page-limit 150 --jsonAlso available in
openemail knowledge delete-connector
Delete a knowledge connector and its items
Usage
openemail knowledge delete-connector <id> [flags]
Removes a connector with every item it added to the knowledge base, and the AI stops using them at once. There is no undo. Links you added yourself stay, even when the connector found the same pages.
Arguments
<id>RequiredThe id of the connector,
kc_and 24 hex characters, aslistConnectorsreturns it.
Examples
openemail knowledge delete-connector kc_5d2e8f1a3c7b9064e2a4c6f8openemail knowledge delete-connector kc_5d2e8f1a3c7b9064e2a4c6f8 --yesAlso available in
openemail knowledge sync-connector
Sync a knowledge connector now
Usage
openemail knowledge sync-connector <id> [flags]
Queues a sync that starts within a minute, whatever the schedule says, clears any failure and resolves with the connector, back at queued. Use it after the source changed, or to try again after a failure. Like a scheduled sync, it adds new pages, reads changed ones again and removes the items of pages that are gone.
Arguments
<id>RequiredThe id of the connector,
kc_and 24 hex characters, aslistConnectorsreturns it.
Examples
openemail knowledge sync-connector kb_8c1f4a2b9d7e3f60a5c7b21dopenemail knowledge sync-connector kb_8c1f4a2b9d7e3f60a5c7b21d --jsonAlso available in
openemail knowledge draft-from-thread
Draft a knowledge note from a conversation
Usage
openemail knowledge draft-from-thread --thread-id <value> [flags] openemail knowledge draft-from-thread --data <json|@file|-> [flags]
The AI reads a conversation and drafts one note of the facts in it that the team will need again, leaving out personal details and what matters only to that conversation. Nothing is saved: the draft comes back with a title, a body in Markdown and a scope it suggests, and you keep it, changed as you like, with createNote and the same --thread-id.
scope suggests the domain the conversation arrived at when the caller may add items there, otherwise the whole workspace or the address itself. Each draft counts as one AI action.
Flags
--thread-id <value>The conversation, by the id
threads.listgives it. Required, here or in--data.--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
openemail knowledge draft-from-thread --thread-id CAHk7pQ2x9LmZ4-mail.example.comopenemail knowledge draft-from-thread --data @knowledge.json