Skip to content

Packs / crm-public

sync-email-into-crm

Log emails from a mailbox export as activities on the matching CRM contacts (idempotent, unknown senders ignored)

L2 Checks passed 3 of 3 runsv1.0.0Tech-Realm/space-crm-public

Install

logicpacks pack use crm-public/sync-email-into-crm
get_pack crm-public/sync-email-into-crm

The second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.

Keys it needs (names only)

None.

Playbooks included

  • Spec: spec/SPEC.md (goal, steps, edge cases, don’ts)
  • Routes: mbox
  • Checks: 1 in outcome/checks.yaml
  • Code: crm.py
  • Tools: python3

Usage, last 8 weeks

New: no recorded use yet.

Purpose (from spec/SPEC.md)

Log emails from a mailbox export as activities on the matching CRM contacts (idempotent, unknown senders ignored)

Goal

Each contact's timeline shows the emails exchanged with them, without duplicates and without creating junk contacts.

Steps

  1. Export the mailbox to mbox (Thunderbird ImportExportTools, getmail, or Gmail Takeout) or fetch with imaplib.
  2. crm.py sync-mbox inbox.mbox (re-run safe: Message-ID dedupe).
  3. Review unknown senders by hand before adding them as contacts.

Edge cases

  • Forwarded threads: only From/To/Cc headers are matched.
  • Missing Message-ID: date+subject used as the key.

Don'ts

  • Don't store email bodies in the CRM by default (subject + date only).
  • Don't sync personal mailboxes without the owner's OK.