mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-06-17 23:09:35 +00:00
Complete outreach automation that generates drafts → Sami approves → system sends:
1. OutreachDraft model (models/outreach_draft.py):
DB-persisted draft queue. Every message starts as status='draft'.
Fields: company, channel, subject, body, followups, sector, scores,
status (draft→approved→sent→replied→opted_out→bounced), timestamps.
2. Daily Pipeline (automation.py → /daily-pipeline/run):
Generates N targets per sector/city, runs compliance check,
creates personalized emails with Arabic pain maps, stores as
draft rows in DB. Returns batch_id for approval.
3. Draft Queue API (drafts.py):
- GET /drafts — list by status/channel/batch
- GET /drafts/stats — counts per status
- GET /drafts/{id} — full draft with body + followups
- POST /drafts/{id}/approve — mark approved
- POST /drafts/approve-batch — approve entire batch
- POST /drafts/{id}/send — dispatch via email/whatsapp/sms
- POST /drafts/{id}/skip — archive draft
- PATCH /drafts/{id} — edit before approving
- POST /drafts/{id}/log-reply — paste reply → auto-classify →
generate suggested response → update status
4. Send dispatch uses existing integrations:
- Email: integrations/email_sender.py (SMTP)
- WhatsApp: integrations/whatsapp.py (Business API + mock)
- SMS: integrations/sms.py (Unifonic)
- LinkedIn: manual_required (copy from dashboard)
Safety:
- All drafts require approval (approval_required=True default)
- Unsubscribe reply → immediate opt_out status
- Compliance gate blocks: opt_out, bounced, high_risk, no_source
- Personal email → warning to use manual channel
- Rate limits enforced at send level
https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| activity.py | ||
| advanced.py | ||
| affiliate.py | ||
| ai_conversation.py | ||
| api_key.py | ||
| audit_log.py | ||
| base.py | ||
| call.py | ||
| commission.py | ||
| company.py | ||
| compat.py | ||
| compliance_control.py | ||
| compliance.py | ||
| consent.py | ||
| contradiction.py | ||
| customer.py | ||
| deal.py | ||
| dispute.py | ||
| durable_checkpoint.py | ||
| evidence_pack.py | ||
| guarantee.py | ||
| idempotency_key.py | ||
| knowledge.py | ||
| lead.py | ||
| message.py | ||
| notification.py | ||
| operations.py | ||
| outreach_draft.py | ||
| property.py | ||
| proposal.py | ||
| sequence.py | ||
| strategic_deal.py | ||
| subscription.py | ||
| template.py | ||
| tenant.py | ||
| user.py | ||