Skip to main content

Scenario

Your #customer-support or #help channel captures raw customer frustrations in real time. This job pulls support messages, sends them to Mave for categorization by persona type (enterprise admin, SMB user, developer, end user), then produces a structured pain point map — which personas hurt most, what they complain about, and how to address each in marketing copy. Flow: Slack conversations.history (#support) → Mavera POST /mave/chat (categorize) → Pain point matrix by persona

Code

Example Output

Error Handling

Bot tokens need groups:history scope for private channels. User tokens access any channel the user is in.
Support channels can have 1000+ messages/day. Adjust DAYS_BACK to keep corpus manageable. Focus on messages with thread replies (indicates complex issues).
Support messages contain customer names, account IDs, and emails. Consider regex-stripping before sending to Mavera: replace emails with [EMAIL], IDs with [ID].