Skip to content

Email filing

Nobody at Cemco has to change how they send contracts and orders. Keep sending them from Gmail; the CRM files them. Filing is done by the email agent in cemco-agents and needs the editor or admin role.

  • Connect Gmail (sent mail). Open Settings → Profile → Connected accounts and choose Connect Gmail; Google asks you to allow read-only access. Every 10 minutes the CRM reads the mail you sent; the first run goes back 14 days. Nothing is read from your inbox. The same panel shows when mail was last checked, how many emails were filed or are waiting for review, and has Check mail now and Turn off.
  • Forward or BCC crm@cemco.app. Mail you send or forward there from your own cemcoinc.com address is filed the same way. Mail from anyone else, from a viewer, or that fails the sender checks (DMARC, or aligned DKIM or SPF) is refused.
  1. Automatic replies (out-of-office and the like) and mail with no customer address on it are skipped.
  2. The account is matched by the customer addresses on the email: a contact’s email first, then the company’s email domain (free mail domains such as gmail.com never count).
  3. When more than one account could match, the assistant’s model picks one if it is sure. Otherwise you get a review task and nothing is filed.
  4. Each attachment (PDFs, drawings, photos, up to 7 MB each) is stored as a document on the account. A larger file is named in the email’s text as not stored.
  5. The email is added to the account’s timeline as an email activity.

Each email is stored once, keyed by its Gmail message id or Message-ID. Filing the same email again does nothing. Sent mail that matches no account is tried again once a day for 30 days, in case the contact is added later. If it carries a signed quote or a purchase order, you also get a review task to add the contact.

When an attachment looks like a signed quote and the email names an order (for example SO-2026-0032), the quote is attached to that order if the match is certain. Anything less certain, and every signed quote that arrives by forwarding, becomes a review task for you instead of being attached on its own.

  • Gmail filing needs Google sign-in to be connected for the workspace (see Authentication). Without it, forwarding to crm@cemco.app still works.
  • Forwarding needs Email Routing for crm@cemco.app (see Deploying).
  • Without a model, filing runs on the rules alone: ambiguous accounts and attachments become review tasks.

You can also ask Claude, with its own Gmail connector, to “file my sent emails to customers from today”. It calls the same idempotent operation (activities.log_email), so nothing is stored twice.