A Python utility for managing Wix subscription data and syncing it to Google Sheets.
- Retrieves active subscription orders from Wix API
- Filters active subscription orders
- Fetches customer contact information
- Formats and uploads data to Google Sheets
- Highlights subscriptions with end dates for easy tracking
- Python 3.6+
requests
gspread
google-auth
# Clone the repository
git clone https://github.com/yourusername/wix-subscription-manager.git
cd wix-subscription-manager
# Install dependencies
pip install -r requirements.txt
- Create a service account in Google Cloud Console and download the credentials JSON file
- Share your Google Sheet with the service account email
- Update the configuration variables in
config.py
:API_KEY
: Your Wix API keySITE_ID
: Your Wix site IDSHEET_ID
: Your Google Sheet IDCREDENTIALS_PATH
: Path to your Google service account credentials
python wix_subs.py
The script will:
- Connect to the Wix API
- Retrieve and filter active subscription orders
- Get contact information for each subscriber
- Format and upload data to the specified Google Sheet
- Apply formatting to highlight relevant information
The script logs operations to the console with the following levels:
- INFO: Normal operation logs
- WARNING: Non-critical issues
- ERROR: Operation failures