Deal Automation
Automated email monitoring that creates HubSpot companies and deals from team member emails.
Name
deal-automation
Description
Monitors Gmail for emails from team members with company info or deck attachments. Automatically creates companies and deals in HubSpot, assigns them to the sender, and sets the stage to "Meeting 1".
How It Works
- •Checks Gmail every 2 hours for emails from team members
- •Identifies emails with attachments (decks, presentations, company info)
- •Extracts company name from email subject
- •Creates HubSpot company with extracted information
- •Creates HubSpot deal assigned to the email sender
- •Sets deal stage to "Meeting 1" (appointmentscheduled)
- •Associates deal with the company
Team Members Monitored
Team members are loaded from config.yaml. See config.example.yaml for the format.
Requirements
- •Maton API key for HubSpot access
- •gog CLI authenticated for Gmail
- •Python 3 with requests library
Setup
- •Get your Maton API key from https://maton.ai/settings
- •Set environment variable:
export MATON_API_KEY="your_key" - •Add to cron:
0 */2 * * * $TOOLKIT_DIR/scripts/email-to-deal-automation.py >> /var/log/deal-automation.log 2>&1
Manual Run
Test the automation:
bash
export MATON_API_KEY="your_key" $TOOLKIT_DIR/scripts/email-to-deal-automation.py
Logs
Check logs at /var/log/deal-automation.log