Skip to content

alfredjnewman661-dev/nlplugins-ai-summarizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💰 $29 — Buy Now | Learn More | All NL Plugins

One-time purchase · Source code included · 14-day money-back guarantee · Terms


Chatwoot AI Conversation Summarizer

Automatically summarize resolved conversations in Chatwoot using OpenAI GPT-4o-mini.

Features

  • 🎯 Webhook listener for conversation_resolved events
  • 🤖 AI-powered summaries using GPT-4o-mini (cost-efficient)
  • 📊 Structured output: issue summary, resolution, next steps, sentiment, topics
  • 📝 Auto-posts summary as a private note in the conversation
  • 🏷️ Optional custom attributes for reporting/filtering

Quick Start

1. Clone and Install

cd ai-summarizer
npm install

2. Configure Environment

cp .env.example .env

Edit .env with your credentials:

Variable Description
OPENAI_API_KEY Your OpenAI API key
CHATWOOT_URL Your Chatwoot instance URL (e.g., https://app.chatwoot.com)
CHATWOOT_API_TOKEN API access token from Chatwoot (Profile → Access Token)
SAVE_AS_CUSTOM_ATTRIBUTES Set to true to also save as custom attributes

3. Run

# Development
npm run dev

# Production
npm start

4. Configure Chatwoot Webhook

  1. Go to Settings → Integrations → Webhooks in Chatwoot
  2. Add a new webhook:
    • URL: https://your-server.com/webhook
    • Events: Select conversation_resolved
  3. Save

Docker Deployment

Using Docker Compose (recommended)

# Create .env file with your credentials
cp .env.example .env

# Build and run
docker-compose up -d

Using Docker directly

docker build -t chatwoot-ai-summarizer .

docker run -d \
  -p 3000:3000 \
  -e OPENAI_API_KEY=sk-... \
  -e CHATWOOT_URL=https://app.chatwoot.com \
  -e CHATWOOT_API_TOKEN=... \
  chatwoot-ai-summarizer

API Endpoints

Endpoint Method Description
/webhook POST Chatwoot webhook receiver
/health GET Health check endpoint

Summary Output

The AI generates structured summaries with:

  • Issue Summary: What the customer needed
  • Resolution: How it was resolved
  • Next Steps: Any follow-up required
  • Sentiment: positive / neutral / negative
  • Key Topics: Tags for categorization

Example output in Chatwoot:

## 🤖 AI Conversation Summary

**📋 Issue:** Customer unable to reset password, receiving "invalid token" error.

**✅ Resolution:** Cleared browser cache and generated new reset link which worked successfully.

**📌 Next Steps:** None

**💭 Sentiment:** 😊 positive

**🏷️ Topics:** password reset, authentication, browser cache

Custom Attributes

If SAVE_AS_CUSTOM_ATTRIBUTES=true, these fields are added to the conversation:

  • ai_summary
  • ai_resolution
  • ai_sentiment
  • ai_topics
  • ai_next_steps

You can use these for filtering, reporting, or automation rules in Chatwoot.

Cost Estimate

Using GPT-4o-mini:

  • ~$0.15 per 1M input tokens
  • ~$0.60 per 1M output tokens

Average conversation (50 messages): ~$0.001 per summary

Production Considerations

  1. Use HTTPS - Chatwoot requires HTTPS for webhooks
  2. Add webhook signature verification - Validate X-Chatwoot-Signature header
  3. Rate limiting - Consider adding rate limits for high-volume accounts
  4. Error handling - Failed summaries won't block Chatwoot operations

License

MIT

About

AI Conversation Summarizer for Chatwoot - GPT-4 powered summaries on chat resolve

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors