1. Create a Google Cloud Project
Go to Google Cloud Console and create a new project.
2. Enable Google Sheets API
Navigate to APIs & Services → Library, search for "Google Sheets API", and enable it.
3. Create Service Account
Go to IAM & Admin → Service Accounts, click "Create Service Account".
Name it "lead-scraper" and grant it "Editor" role.
4. Download Credentials
Under the service account, go to "Keys" → "Add Key" → "JSON".
Save the downloaded file as credentials.json in your scraper folder.
5. Share Your Sheet
Create a Google Sheet, click "Share", and add the service account email (ends with @...gserviceaccount.com) as Editor.
6. Add to Config
{
"google_sheets": {
"enabled": true,
"sheet_id": "YOUR_SHEET_ID_FROM_URL",
"credentials": "credentials.json"
}
}
7. Install Dependency
pip install gspread google-auth