GitHub to Clay Scraper

Scrape users from any GitHub repo, and automatically ingest into Clay.

CleanShot_2025-10-08_at_17.41.422x.png

Setup

  1. Click Remix on the top-right to get a copy of it

  2. Set up a Clay workbook with a Webhook column

  3. Copy your Clay workbook's Webhook URL CleanShot 2025-08-08 at 13.23.47@2x.png

  4. Set that as CLAY_WEBHOOK_URL in this val's Environment variables on the left sidebar

  5. In main.ts, replace GITHUB_REPO with the full repository name (format: "owner/repo")

  6. (Optional) Update the limits for ISSUE_LIMIT, MAX_STARGAZERS, MAX_FORKS, MAX_COMMENTS_PER_ISSUE, and FETCH_REACTIONS

  7. Navigate to main.ts and click "Run".

Files

  • clay.ts - Send data to Clay
  • github.ts - Collects engaged users and fetches usernames
  • main.ts - Cron trigger that orchestrates the scraping and Clay integration

Rate Limiting

On larger repos, you may get rate-limited by GitHub. To mitigate this, Val Town uses a proxied fetch that reroutes requests using a proxy vendor so that requests obtain different IP addresses. It also automatically retries failed requests several times.