Spektrix is a ticketing and CRM platform specifically designed for the performing arts sector. While Spektrix provides great built-in reporting tools, I wanted to create a customized automated reporting system that would:
- Pull specific data points I frequently need
- Automatically update Google Sheets (which I use for simple data visualization)
- Run without manual intervention
- Utilize free tools to keep costs minimal
This project demonstrates how to connect Spektrix's API with Google Sheets to create automated daily and weekly reports for ticket sales, capacity tracking, and revenue analysis.
This repository is entirely third-party and not supported by or affiliated with Spektrix or Google.
The system performs several key functions:
- Tracks daily ticket sales
- Monitors booking status for each performance instance
- Calculates and records capacity metrics
- Updates designated Google Sheets with fresh data
- Calculates average ticket prices
- Compares pricing trends
- Updates weekly summary data
- Python 3.7+
- Spektrix API access
- Google Cloud Platform account with Sheets API enabled
- Service account credentials from Google Cloud Console
- Clone the repository
- Install required packages:
pip install -r requirements.txt
Create a .env
file with the following variables:
# Spektrix API Credentials
SPEKTRIX_API_USER=your_api_user
SPEKTRIX_API_KEY=your_api_key
SPEKTRIX_CLIENT_NAME=your_client_name
# Google Sheets
SPREADSHEET_ID=your_spreadsheet_id
SERVICE_ACCOUNT_JSON={'your_service_account_json'}
# Event Configuration
EVENT_ID=your_event_id
START_DATE=YYYY-MM-DD
PERFORMANCES=number_of_performances
EXTRA_LOCKS=number_of_extra_locks_per_instance_if_any
- Records total tickets sold per day
- Tracks sold, available, and locked seats for each performance
- Calculates total and percentage-based capacity metrics
- Monitors average ticket prices
- Compares against historical data
The system uses Google Sheets API to:
- Clear and update existing data
- Append new rows
- Maintain historical data
- Enable automatic chart updates
Adjust the values in newrows.py
to match your Google Sheet structure. Update sheet names in main.py
to match your Google Sheet names.
- API credentials are stored in environment variables
- Google service account credentials should be kept secure
- The
.gitignore
file excludes sensitive credentials
Feel free to fork this repository and adapt it to your needs. Pull requests are welcome for improvements or bug fixes. Hoping to add additional functionality in the future.
This project is licensed under the MIT License - see the LICENSE file for details.