Skip to main content

CRM Automator: Modular Agentic CRM Toolkit

Author: Trung Le
Team: RealTimeX.ai
Repository: https://github.com/therealtimex/crm-automator


Overview

The CRM Automator is a modular, agentic toolkit designed to transform unstructured data (emails, transcripts, documents) into structured CRM records. Unlike monolithic automation scripts, this toolkit is built as a collection of reusable Tools that can be orchestrated by AI agents or run as standalone pipelines.

Current Status: Production-Ready (v2.0)

Key Features

  • 🧩 Modular Architecture: Decoupled Ingestion (EML/Text), Intelligence (LLM Extraction), and Integration (CRM Sync).
  • 🤖 Agent-Ready: Components like IntelligenceLayer and RealTimeXClient are designed to be imported as tools for frameworks like LangChain or Autogen.
  • 🛡️ Idempotent & Safe: Implements "Search-before-Update" patterns and SQLite-based state tracking to prevent duplicate records.
  • 🧹 Smart Cleaning Pipeline: Automatically converts bloaty HTML into clean Markdown, strips noise, and resolves tracking links (e.g., unwraps Proofpoint/Safelinks and resolves HubSpot redirects) to ensure accurate URL extraction.
  • 🧠 OpenAI-Compatible: Works independently with OpenAI, Anthropic, or local LLMs (via LM Studio/Ollama) using instructor.

Installation

  1. Clone the repository:

    git clone https://github.com/therealtimex/crm-automator.git
    cd crm-automator
    
  2. Install dependencies:

    # Option A: Standard pip
    pip install -r requirements.txt
    
    # Option B: Modern uv (Recommended)
    uv sync
    
  3. Configure environment:

    cp .env.example .env
    # Edit .env with your CRM and LLM credentials
    

Usage

1. Process Emails (.eml)

Run the automator on a single EML file or an entire directory recursively.

Using uvx (Fastest, zero-install):

uvx eml/eml_automator.py "path/to/email.eml" --env-file ".env"

Using a directory:

uv run python eml/eml_automator.py "path/to/directory" --env-file ".env"

Options:

  • --force, -f: Force re-processing of an email even if it was already synced.
  • --verbose, -v: Enable debug logs to see HTTP requests and LLM thought process.

2. Generic Agent Demo

See how the toolkit handles raw text (e.g., meeting transcripts):

python3 eml/agent_demo.py --api-key "your_key"

Architecture

graph TD
    Ingest[Ingestion Layer] --> Intelligence[Intelligence Layer]
    Intelligence <--> Search[Web Search Tool]
    Intelligence --> Client[CRM Client]
    Client --> CRM[(RealTimeX CRM)]
  • crm_client.py: The "hands" – handles all API calls with retries and 10s timeouts.
  • intelligence.py: The "brain" – uses Pydantic models to extract structured data from text.
  • persistence.py: The "memory" – prevents processing the same resource twice.

Built with ❤️ by the RealTimeX.ai Team

Metadata

Release files for crm-automator 1.11.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crm-automator 1.11.5
File Size Uploaded
crm_automator-1.11.5.tar.gz 75.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for crm-automator 1.11.5
File Interpreter ABI Platform
crm_automator-1.11.5-py3-none-any.whl Python 3 none any Details

Total release size: 162.1 kB

Release files / crm_automator-1.11.5.tar.gz

Download URL crm_automator-1.11.5.tar.gz
Size 75.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ce18ca82606a4cb67ef46196e69925c1df3347dd49b4ac784eb003d509d7ef05
BLAKE2b-256 checksum
How to use checksums
f99a13621653d0585cf28d1da09b53651120b22c20a361a8fc4c115884a7cc20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release files / crm_automator-1.11.5-py3-none-any.whl

Download URL crm_automator-1.11.5-py3-none-any.whl
Size 87.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62f7e90322e12bb3d979383fc106d343b0bbc6ed89b838cef6523ffc942c1dff
BLAKE2b-256 checksum
How to use checksums
380a4b46ae40afe470ce9b6e7043613b011ffbdd68b4f7070596fe34d0aa55c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release history Release notifications | RSS feed

This release

1.11.5 This release

2 release files

1.9.9

2 release files

1.9.8

2 release files

1.9.7

2 release files

1.9.6

2 release files

1.9.5

2 release files

1.9.4

2 release files

1.9.3

2 release files

1.9.2

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.7

2 release files

1.7.6

2 release files

1.7.5

2 release files

1.7.3

2 release files

1.7.2

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page