Syncs Wild Apricot data to a local SQLite database for querying and analysis.
Fetches data from Wild Apricot API and stores it in data/wa.db:
- Contacts/Members - All member records with custom fields
- Events - Event listings and details
- Registrations - Event registration records
- Invoices - Payment and invoice data
- Membership Levels - Level definitions and fees
# Set your API key
export WA_API_KEY="your-api-key"
# Run full sync
./wa_full_sync.py
# Or incremental sync (faster, updates only)
./wa_incremental_sync.py
| Script |
Purpose |
wa_full_sync.py |
Full database refresh from WA API |
wa_incremental_sync.py |
Update only changed records |
nightly_wa_sync.sh |
Nightly sync wrapper with logging |
| Script |
Purpose |
wa_fetch_contacts.sh |
Fetch member/contact data |
wa_fetch_events.sh |
Fetch event listings |
wa_fetch_registrations.sh |
Fetch event registrations |
wa_fetch_invoices.sh |
Fetch invoice/payment data |
wa_fetch_membership_levels.sh |
Fetch membership level definitions |
| Script |
Purpose |
wa_contacts_to_sqlite.sh |
Import contacts JSON to SQLite |
wa_events_to_sqlite.sh |
Import events JSON to SQLite |
wa_contacts_audit.sh |
Audit contact data quality |
sync_all_with_quality_check.sh |
Sync with data validation |
Output is stored in data/wa.db (SQLite). Tables:
contacts - Member records
events - Event listings
event_registrations - Registration records
invoices - Invoice/payment data
membership_levels - Level definitions
# Nightly full sync at 2 AM
0 2 * * * /path/to/wa-sync/nightly_wa_sync.sh >> /var/log/wa_sync.log 2>&1
# Or use the retry wrapper
0 2 * * * /path/to/wa-sync/run_full_sync_with_retry.sh
| Variable |
Required |
Description |
WA_API_KEY |
Yes |
Wild Apricot API key |
WA_ACCOUNT_ID |
No |
Account ID (auto-detected if not set) |
- wa-chatbot - Query chatbot that reads this database