Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

Repository files navigation

NetworkingBot

A personal job-search productivity tool that aggregates your networking activity into a daily digest email. It reads a Google Sheets company tracker, scrapes your own LinkedIn message threads, and surfaces who to follow up with — so you never let a warm lead go cold.


What It Does

Each day at 8 AM, the bot runs locally via Windows Task Scheduler and:

  1. Reads your Company Tracker spreadsheet.
  2. Identifies companies with no referral contact, companies ready for outreach, and conversations that need a follow-up.
  3. Scrapes your own LinkedIn message threads for tracked contacts.
  4. Sends a digest email with a prioritized to-do list.

Requirements

  • Python 3.11+
  • A Google Cloud service account with Sheets API access
  • A Gmail account with an App Password enabled
  • A LinkedIn account
  • Windows Task Scheduler (for automated daily runs)

Project Structure

NetworkingBot/
├── scripts/
│   └── fetch_linkedin.py   # Scrapes your LinkedIn messages and updates the sheet
├── src/
│   ├── main.py             # Entry point — reads sheet, parses messages, sends email
│   ├── sheets_reader.py    # Reads and categorizes companies from Google Sheets
│   ├── linkedin_parser.py  # Parses the LinkedIn messages CSV
│   └── email_sender.py     # Builds and sends the HTML digest email
├── data/                   # Local data files (excluded from git)
├── .github/workflows/
│   └── daily_digest.yml    # GitHub Actions workflow (email digest only)
├── run_daily.vbs           # Silently launches the daily run via Task Scheduler
├── run_daily.bat           # Wrapper script called by the VBScript
├── .env.example            # Template for local environment variables
└── requirements.txt

Setup

Step 1 — Clone the repository

git clone https://github.com/AblazedTC/NetworkingBot.git
cd NetworkingBot

Step 2 — Install dependencies

python -m venv .venv
.venv\Scripts\activate      # Windows
# source .venv/bin/activate  # macOS / Linux
pip install -r requirements.txt
playwright install chromium

Step 3 — Create a Google service account

  1. Go to Google Cloud Console.
  2. Create a project and enable the Google Sheets API.
  3. Create a service account and download the JSON key file.
  4. Share your Company Tracker spreadsheet with the service account email (Editor access).

Step 4 — Enable Gmail App Password

  1. Go to your Google Account → Security → 2-Step Verification (must be enabled).
  2. Go to App Passwords and create one for "Mail".
  3. Save the 16-character password.

Step 5 — Configure environment variables

Copy .env.example to .env and fill in each value:

GOOGLE_SERVICE_ACCOUNT_JSON={"type":"service_account",...}
SPREADSHEET_ID=your_spreadsheet_id
GMAIL_USER=[email protected]
GMAIL_APP_PASSWORD=xxxx-xxxx-xxxx-xxxx
RECIPIENT_EMAIL=[email protected]
LINKEDIN_USER_NAME=Your Full Name
FOLLOW_UP_DAYS=14
LINKEDIN_FOLLOW_UP_DAYS=7
DRY_RUN=false
Variable Description
GOOGLE_SERVICE_ACCOUNT_JSON Full JSON content of your service account key
SPREADSHEET_ID The ID from your Google Sheets URL
GMAIL_USER Gmail address used to send the digest
GMAIL_APP_PASSWORD Gmail App Password (not your account password)
RECIPIENT_EMAIL Email address that receives the digest
LINKEDIN_USER_NAME Your full name as it appears on LinkedIn
FOLLOW_UP_DAYS Days before a cold outreach needs a follow-up (default: 14)
LINKEDIN_FOLLOW_UP_DAYS Days before a LinkedIn message needs a follow-up (default: 7)
DRY_RUN Set to true to print the email to stdout instead of sending it

Step 6 — Get LinkedIn session cookies

Run this once to capture your LinkedIn session:

python scripts/fetch_linkedin.py --capture-cookies

Log in to LinkedIn in the browser window that opens. The cookies are saved to data/.linkedin_session.json. This file is excluded from git.


Running Locally

# Scrape your LinkedIn messages and update the sheet
python scripts/fetch_linkedin.py

# Build and send the digest email
cd src
python main.py

# Test without sending email
DRY_RUN=true python main.py

Automated Daily Run (Windows Task Scheduler)

The bot runs silently in the background via a Task Scheduler task that calls run_daily.vbs, which launches run_daily.bat with no console window.

To set it up:

  1. Open Task Scheduler → Create Task.
  2. Set the trigger to Daily at your preferred time.
  3. Set the action to run run_daily.vbs.
  4. Enable "Run task as soon as possible after a scheduled start is missed" so it catches up if your PC was off.

Automated Daily Run (GitHub Actions — optional)

The included daily_digest.yml workflow can run the email digest portion via GitHub Actions if you prefer cloud scheduling. Add the same environment variables as GitHub Actions secrets to use it.


Company Tracker Spreadsheet Format

The spreadsheet must have these column headers (exact spelling):

Column Description
Company Company name
Tier Priority tier (1 = highest)
Priority Numeric score within the tier
Referral Contact LinkedIn profile URL of your contact
Cold Messaged? Yes once you have sent a message
Last Outreach Date Date of the most recent message (YYYY-MM-DD)

How LinkedIn Scraping Works

fetch_linkedin.py uses Playwright (headless Chromium) and your saved session cookies to:

  1. Load each contact's LinkedIn conversation thread.
  2. Extract message content and timestamps.
  3. Write results to data/linkedin_messages.csv.
  4. Update Last Outreach Date and Cold Messaged? in the sheet.

Security Notes

  • Never commit .env, data/.linkedin_session.json, or data/action_log.json. These are excluded by .gitignore.
  • The LINKEDIN_COOKIES secret gives full access to your LinkedIn account. Keep it private.
  • GitHub Actions secrets are masked in all logs.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages