Commit graph

4 commits

Author SHA1 Message Date
Vadym Samoilenko
bc80f7667c Use bodyV2 markdown for CRM notes and transcripts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 21:45:31 +00:00
Vadym Samoilenko
93288aa981 Fix CRM enrichment: correct API filters, note linking, add tasks & transcripts
- Fix Twenty CRM filter syntax (dot notation for composite fields)
- Fix noteTargets/taskTargets to use targetPerson instead of personId
- Handle duplicate person creation gracefully (find existing on 400)
- Add task creation for new leads (follow-up TODO)
- Save conversation transcript to CRM on escalation and rate limit
- Strengthen system prompt to make Claude call update_lead proactively
- Tell Claude that form-submitted leads are already in CRM

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 21:42:56 +00:00
Vadym Samoilenko
43b95c84df Add markdown rendering in chat widget + opportunities for new leads
- Chat messages now render bold, italic, links, and line breaks
- Bare URLs auto-linked, XSS-safe via HTML escaping before markdown
- New leads create Opportunity with stage NEW in Twenty CRM
- Applied to both chatbot-api and email-api (contact + quote forms)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 21:30:49 +00:00
Vadym Samoilenko
e78d6dc1c6 Add Twenty CRM integration + lead enrichment + pulsating chat bubble
- New twenty_crm.py: full CRUD for people, companies, notes via Twenty REST API
- Lead capture now creates person + company in Twenty CRM automatically
- New update_lead tool: enriches CRM profile as conversation progresses
  (job title, phone, city, budget, requirements)
- Session meta stored in Redis to track Twenty person ID across messages
- Docker-compose updated with TWENTY_CRM env vars
- Chat bubble: pulsating ring animation with gradient background

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:13:26 +00:00