Automation & BotsShippedFeatured Project

Slack Automation Bots (NSF / EFT / CM / Sales)

Four independent Python bots that watch Slack channels for file uploads and automate the entire daily lead management lifecycle for the Convoso dialer platform, parsing, deduplication, DNC clearing, uploading, reporting, and Asana task creation

4
bot types automated
30-45
minutes saved daily per campaign
2
minute full pipeline execution

Slack Automation Bots (NSF / EFT / CM / Sales)

One-Line Summary: Four independent Python bots that watch Slack channels for file uploads and automate the entire daily lead management lifecycle for the Convoso dialer platform. parsing, deduplication, DNC clearing, uploading, reporting, and Asana task creation.

--

Problem Statement

The client's dialer operations team manually processed lead files every day: someone would receive a CSV or Excel file, open it, split leads into categories, log into Convoso, clear DNC entries one by one, upload leads, check for duplicates, figure out which leads had been paid and needed removal, generate a summary report, and create an Asana task to track completion. For NSF alone this took 30-45 minutes daily. Multiply by four campaign types (NSF, EFT, CM, Sales) and the team was spending hours on repetitive data entry that was both tedious and error-prone.

Solution

Built four independent Slack bots. one per campaign type. that fully automate the lead management workflow. An operations team member simply drops a file into the appropriate Slack channel. The bot downloads it, validates the headers, parses and categorizes leads, clears campaign DNC entries via the Convoso API, uploads new leads, detects and moves paid/signed leads, generates a styled Excel report, creates an Asana subtask with the report attached, and posts a summary back to Slack. The entire pipeline runs unattended in under two minutes.

Each bot runs as a long-lived process on a Windows workstation with auto-restart on crash and auto-start on boot.

Tech Stack

LayerTechnology
MessagingSlack API (channel polling every 30 seconds)
Dialer APIConvoso REST API (form-encoded POST, auth_token)
Project ManagementAsana API (subtask creation with file attachments)
Reportingopenpyxl (styled multi-sheet Excel generation)
LanguagePython 3.9+
Dependenciesrequests, python-dotenv, openpyxl
Process ManagementWindows .bat auto-restart wrapper + .vbs silent launcher

The Four Bots

1. NSF Bot

Non-Sufficient Funds daily lead management

Receives daily files of all current NSF leads. Splits them into two buckets based on the close date: Less Than 3 weeks (LT, the LT list) and Greater Than 3 weeks (GT, the GT list). Clears campaign DNC for every phone number. Compares against current Convoso lists to detect "paid" leads. leads present in Convoso but absent from today's file have been resolved and get moved to the Paid/Inactive list. New leads are uploaded. A validation pass re-fetches all three lists to catch mismatches.

Slack channel: #nsf-uploads Commands: File drop (full pipeline), move <phone> to paid

2. EFT Bot

Electronic Funds Transfer daily lead management

Receives daily EFT files containing leads with active payment arrangements. Clears campaign DNC, compares against the current Active list, uploads new leads, moves "signed" leads (in Convoso but not in today's file) to the Signed list, validates all leads are accounted for, and auto-activates the Active list after upload.

Slack channel: #eft-uploads Commands: File drop (full pipeline), move <phone> to signed

3. CM Bot (9 Campaigns)

Case Manager weekly lead uploads

Handles weekly lead files split by Case Manager across 9 separate Convoso campaigns. Creates a new inactive list per CM, uploads leads, then presents an interactive confirmation step in Slack before activating new lists and deactivating old ones. Includes DNC checking (read-only) and manual dnc/undnc commands that operate across all 9 campaigns simultaneously.

Slack channel: #cm-uploads Commands: File drop (parse + summary), proceed, activate, cancel, status, dnc <phone>, undnc <phone>

4. Sales Bot

Sales team lead management

Handles sales-specific lead uploads and campaign management for the sales team's Convoso campaigns.

Slack channel: Sales uploads channel

Key Features (Common Across All Bots)

  • Slack Polling Architecture: Polls every 30 seconds (not WebSocket) for maximum reliability. Survives network blips and Slack API hiccups.
  • Lock File with PID Checking: Prevents duplicate bot instances. If a bot crashes, the stale lock is detected and overwritten on restart.
  • Auto-Restart on Crash: A Windows batch wrapper loops with a 10-second cooldown, so a bot that dies from an unhandled exception is back up in seconds.
  • Exponential Backoff: Repeated API errors trigger increasing wait times (up to 5 minutes) to avoid hammering Convoso or Slack.
  • Processed Message Tracking: Each bot maintains a local state file that survives restarts, preventing duplicate processing of the same file.
  • Excel Reporting: NSF and EFT bots generate multi-sheet styled Excel reports (Summary, LT/GT Leads, DNC Removed, Paid/Signed Moved, Failed, Raw Data).
  • Asana Integration: Every run creates a subtask under the appropriate Asana epic with summary text and the Excel report attached.
  • Uploader Tagging: If something goes wrong, the bot tags the person who uploaded the file in the error message.
  • Header Validation: Files with unexpected or missing columns are rejected with a clear error message before any processing begins.
  • Proxy Bypass: Automatically disables Windows system proxy environment variables that interfere with API calls.

AM Callback Analysis

A companion analysis tool (am_callback/) that measures the effectiveness of voicemail drops. It matches outbound "Answering Machine Detected. Message Left" calls against subsequent inbound callbacks to determine how many prospects actually called back, whether they connected with an agent, and what the outcome was. Uses exported Convoso call logs enriched with Salesforce lead data.

Impact / Metrics

  • Reduced daily NSF processing from 30-45 minutes of manual work to a 2-minute file drop
  • Four campaign types fully automated with zero manual Convoso interaction
  • Eliminated human error in DNC clearing, lead deduplication, and paid-lead detection
  • Operations team reclaimed hours per week for higher-value work
  • Full audit trail via Excel reports, Asana tasks, and bot logs
  • Running in production since early 2026 with daily use across all four campaign types

Status

Production. All four bots are running daily on a Windows workstation with auto-start on boot. NSF and EFT bots process files every business day. CM bot runs weekly. Active maintenance and feature additions ongoing.

Visuals

Slack channel feed showing the bots posting upload confirmations, watcher heartbeats, and Asana task links after each daily run
Slack channel feed showing the bots posting upload confirmations, watcher heartbeats, and Asana task links after each daily run
Slack APIConvoso APIAsana APIopenpyxlPython

More in this category