GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - artyom129/RelayDesk-AI-Business-Automation-AI-Integration-Platform: FastAPI automation platform connecting CRM, spreadsheets, email, chatbots and AI services through reliable webhook-driven workflows

BranchesTags
Open more actions menu

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
app
app
 
 
data
data
 
 
docs
docs
 
 
examples
examples
 
 
templates
templates
 
 
tests
tests
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.kk.md
README.kk.md
 
 
README.md
README.md
 
 
README.ru.md
README.ru.md
 
 
docker-compose.yml
docker-compose.yml
 
 
requirements.txt
requirements.txt
 
 
seed_demo.py
seed_demo.py
 
 

Repository files navigation

RelayDesk AI

A lead comes in through a webhook. Six steps later it is scored, in the CRM, in the sheet, emailed and announced to the team. When a provider goes down, nothing is lost.

English · Русский · Қазақша

tests

Relay line dashboard

Every small business that sells online has the same plumbing problem. A form fires, someone copies the lead into the CRM, someone else pastes it into a spreadsheet, the welcome email goes out a day late, and when the mail provider has a bad hour nobody notices which leads fell through.

RelayDesk is the control room for that plumbing. One FastAPI service takes the lead, runs it down a line of connectors and shows you exactly where every lead is: which step passed, which one retried, which one is waiting for you in the dead-letter queue.

The line

POST /webhooks/lead
  → Normalize      clean email, name, company
  → AI qualify     score 0-100, priority, matched signals
  → CRM upsert     create or update the contact
  → Sheets log     append a row
  → Welcome email  send to the lead
  → Team alert     post to the sales chat

The dashboard draws this as a rack of units. Each unit shows how the last 50 leads went through it: passed, failed, retried, average time. Every run in the table gets a strip of six squares, so a broken step is visible from across the room.

Each provider unit has a switch that takes the provider down. Flip the email one, send a test lead, and you watch three attempts fail, the run stop at step five and the lead land in the dead-letter queue. Bring the provider back, press Replay, and the run continues from the welcome email. The CRM and the sheet are not touched twice.

A run stopped at the welcome email

What's new in 2.0 and why

Version 1 proved the idea: a lead goes in, six systems get updated. Version 2 is about the day things go wrong, because that is the day a client judges an automation.

  • Smart retries. Each connector now tells the engine whether a failure is worth retrying. A provider timeout gets two more tries with a 0.2 s and 0.6 s backoff; a lead with no email fails at once and goes straight to the queue instead of wasting time.
  • Replay picks up where the lead stopped. A dead letter keeps the payload and the position of the step that failed, so a replay continues from that step. The CRM and the sheet are written once, and the new run links back to the original.
  • Every step is isolated. An exception inside any connector is caught, recorded with its message and duration, and the lead is parked in the queue. One bad provider never takes the service down.
  • Safe to deliver twice. Form tools resend webhooks. An Idempotency-Key header, backed by a unique index, returns the first run instead of sending a second welcome email.
  • Optional webhook secret. Set RELAYDESK_WEBHOOK_SECRET and the endpoint requires the same value in X-RelayDesk-Secret, compared in constant time.
  • Stable CRM IDs. Record IDs come from SHA-256 of the email, so they survive restarts and match across machines.
  • Sharper scoring. Keywords match whole words, and any budget the form sends, text, empty or negative, is handled without fuss.
  • Contacts only get richer. A repeat submission with blank fields keeps what the CRM already knows.
  • Pause means pause. A paused line answers 409 to webhooks and manual runs.
  • Per-step numbers. Passed, failed, retried and average time for every unit, counted in SQL.

27 tests cover these cases: outages, flaky providers, replays, idempotency, the secret, HTML and JSON 404s. They run on an in-memory database and never touch data/.

The interface is new too. The line is the product, so the line is the screen: graphite surfaces, green, amber and red only where they mean passed, retried and failed, and the trace strip as the one detail that repeats everywhere. Light, dark and phone.

Mobile, light theme

Run it

python -m venv .venv
.venv\Scripts\activate          # macOS / Linux: source .venv/bin/activate
pip install -r requirements.txt
python seed_demo.py             # 11 runs, two outages, one replay
uvicorn app.main:app --reload

Open http://127.0.0.1:8000. Swagger lives at /docs. Docker: docker compose up --build.

Send a lead:

curl -X POST http://127.0.0.1:8000/webhooks/lead \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: evt_001" \
  -d @examples/lead-webhook.json

Tests: pytest -q

API

Method Path What it does
POST /webhooks/lead Run a lead down the line (secret and idempotency key optional)
POST /workflows/{id}/run Manual run with any payload
POST /api/dead-letters/{id}/replay Continue a failed run from the step that failed
GET /api/runs, /api/runs/{id} Run history and per-step detail
GET /api/dead-letters What is waiting and what was replayed
GET /api/contacts, /api/workflows CRM contacts and the line definition
GET /health Database check and which providers are down

Going live

The connectors here are local stand-ins and never call a real provider. Each one is a class with execute(action, payload) returning a ConnectorResult. Write that class for HubSpot, SendGrid, Google Sheets or Slack, register it, and the engine, the retries, the replay and the dashboard work unchanged. More in docs/architecture.md.

This is a portfolio project, not client work.

Author

Koncha Artyom · MIT License

About

FastAPI automation platform connecting CRM, spreadsheets, email, chatbots and AI services through reliable webhook-driven workflows

Topics

crmdead-letter-queuefastapilead-managementpythonsqlalchemywebhooksworkflow-automation

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.