Skip to main content

AI-powered email processing and CRM automation

Project description

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:

    pip install -r requirements.txt
    
  3. Configure environment:

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

Usage

1. Process an Email (.eml)

Run the automator on a single EML file to sync contacts, companies, and tasks to RealTimeX CRM.

python3 em/eml_automator.py "path/to/email.eml" --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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crm_automator-1.7.1.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crm_automator-1.7.1-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file crm_automator-1.7.1.tar.gz.

File metadata

  • Download URL: crm_automator-1.7.1.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for crm_automator-1.7.1.tar.gz
Algorithm Hash digest
SHA256 3a4d9ce42327b307b24c3d9e1b00133dee3135ecb55046111c546d6c38d831e2
MD5 2a5106bcbae84147551b2c522f5acb56
BLAKE2b-256 8513fcd896ae66f166ad30b0aabfc7a9326b8e2256601f8ae0861a891ab4559b

See more details on using hashes here.

File details

Details for the file crm_automator-1.7.1-py3-none-any.whl.

File metadata

  • Download URL: crm_automator-1.7.1-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for crm_automator-1.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 187f54f5aa967fc8b7412390c2dda27dd6020f5c91aa2497f8da8c5cda051296
MD5 fabc3c5dad1b14ebfa54df36437499fb
BLAKE2b-256 7196bde3927c72b8976e60d626065cb85aa92839ab936779d31b4bdc430cadae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page