Skip to content

Repository files navigation

💰 Billable

Auto-invoice clients the moment a calendar meeting ends. Zero manual work.

Billable is a Python automation system for freelancers and agencies that eliminates manual invoicing by automatically generating and sending invoices when a billable Google Calendar event ends.


🚀 Overview

Freelancers lose revenue due to:

  • Delayed invoicing
  • Forgotten billing
  • Manual time tracking
  • Multi-step payment workflows

Billable solves this by fully automating the post-meeting billing pipeline.

Once a [BILLABLE] tagged calendar event ends, the system:

  1. Calculates billable duration
  2. Generates a PayPal invoice
  3. Sends the invoice to the client
  4. Posts a receipt in Slack
  5. Sends a payment link via SMS
  6. Triggers a follow-up reminder if unpaid

⚙️ Tech Stack

  • Python 3
  • Flask
  • Google Calendar API
  • PayPal Invoicing REST API v2
  • Slack Incoming Webhooks (Block Kit)
  • Twilio Programmable SMS
  • threading
  • python-dotenv

📦 Project Structure

billable/ ├── .env ├── .env.example ├── requirements.txt ├── config.py ├── app.py └── services/


🔁 Core Workflow

Google Calendar → Detect event → Calculate amount → PayPal invoice → Slack → SMS → Follow-up


🔐 Environment Variables

GOOGLE_CALENDAR_ID=primary
PAYPAL_CLIENT_ID=
PAYPAL_CLIENT_SECRET=
PAYPAL_MODE=sandbox
SLACK_WEBHOOK_URL=
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_FROM_NUMBER=+1XXXXXXXXXX
HOURLY_RATE=150
DEMO_MODE=true


▶️ Running

python app.py


🧪 Demo Endpoint

POST /trigger

{ "event_id": "demo-001", "title": "[BILLABLE] Strategy Session", "client_email": "client@example.com", "client_name": "Alex", "client_phone": "+923001234567", "duration_minutes": 45 }


🧠 Key Features

  • Automated invoicing pipeline
  • Slack + SMS notifications
  • PayPal invoice generation
  • Failure-safe execution
  • Event deduplication
  • Demo mode support

🔮 Future Work

  • Stripe integration
  • AI-based meeting tagging
  • Web dashboard
  • Persistent database

About

Automated invoicing pipeline connecting Google Calendar, Slack, PayPal and Twilio

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages