Skip to main content

Nextcloud — Mail

Read, draft and send mail through the Nextcloud Mail app.

Integration IDnextcloud-mail
AuthNC session (via connector)
Required NC appmail
Required scopeMAIL
Sourceserver/integrations/nextcloudMailTools.js

Tools exposed​

ToolPurpose
nextcloud_mail_list_accountsList the user's configured mail accounts.
nextcloud_mail_list_mailboxesList folders for an account.
nextcloud_mail_searchSearch messages (subject / from / body / flag).
nextcloud_mail_readFetch a message body.
nextcloud_mail_read_attachmentRead an attachment.
nextcloud_mail_composeCreate a draft.
nextcloud_mail_sendSend a draft (or a freshly composed message).
nextcloud_mail_replyReply to a thread, preserving headers.
nextcloud_mail_flagStar / mark read / etc.
nextcloud_mail_moveMove to another folder.

Auth details​

The user configures their mail accounts inside the Nextcloud Mail app first. Bee Flow's tools then use AppAPI's signed proxy to call the Mail REST API at /index.php/apps/mail/api/....

The mail account passwords are stored by NC, encrypted at rest. Bee Flow never sees them; it relies on the NC session to act on behalf of the user.

Endpoints called​

GET /index.php/apps/mail/api/accounts
GET /index.php/apps/mail/api/accounts/{id}/folders
GET /index.php/apps/mail/api/accounts/{id}/folders/{folder}/messages
GET /index.php/apps/mail/api/accounts/{id}/folders/{folder}/messages/{id}
POST /index.php/apps/mail/api/accounts/{id}/draft
POST /index.php/apps/mail/api/accounts/{id}/send
PUT /index.php/apps/mail/api/accounts/{id}/folders/{folder}/messages/{id}/flags
POST /index.php/apps/mail/api/accounts/{id}/folders/{folder}/messages/{id}/move

Privacy Shield​

Email bodies and attachments pulled via these tools go through the Privacy Shield before reaching the model. With Strict mode, recipient names and addresses are redacted; the assistant still works in placeholder-space and your screen un-redacts.

Common errors​

ErrorCauseFix
No mail accounts configuredUser hasn't added anyThey open Nextcloud Mail and add one.
IMAP login failedMail-app auth issue, not Bee FlowFix in NC Mail.
Attachment too largeBody limitRaise BEEFLOW_REQUEST_BODY_LIMIT.