FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
charmaine

charmaine

GitHubIssuesToClay

Grab issues from GitHub repo, send them to Clay
Public
Like
GitHubIssuesToClay
Home
Code
5
README.md
clay.ts
github.ts
H
main.ts
test.ts
Branches
1
Pull requests
Remixes
2
History
Environment variables
1
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
8/15/2025
Viewing readonly version of main branch: v78
View latest version
README.md

GitHub Issues to Clay

Extract GitHub issue authors' emails and send them to Clay for enrichment.

This API fetches all issues from a GitHub repository, extracts unique author usernames, finds their email addresses, and sends the data to Clay for further enrichment.

Example usage

Basic Usage

Create val
const response = await fetch("https://your-val-url.web.val.run", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ githubRepo: "sourcebot-dev/sourcebot", clayWebhookUrl: Deno.env.get("CLAY_WEBHOOK_URL"), githubToken: Deno.env.get("GITHUB_TOKEN"), limit: 10 }) }); const result = await response.json(); console.log(result); // { success: true, processed: 15 }

Input Parameters

  • githubRepo - Required - Repository in format "owner/repo"
  • clayWebhookUrl - Required - Your Clay webhook URL for data enrichment
  • githubToken - Required - GitHub Personal Access Token
  • limit - Optional - Maximum number of unique authors to process (default: 10)

What it does

  1. Fetches Issues: Retrieves all issues from the specified GitHub repository
  2. Extracts Authors: Gets unique author usernames from the issues
  3. Finds Emails: Uses GitHub API to find email addresses for each author
  4. Sends to Clay: Sends each email with metadata to your Clay webhook for enrichment

Data Sent to Clay

Each record sent to Clay contains:

  • github_username - The GitHub username
  • email - The email address found for the user
  • source_repo - The repository the issues came from

Setup Requirements

GitHub Token

Create a GitHub Personal Access Token with repo access:

  1. Go to GitHub Settings > Developer settings > Personal access tokens
  2. Generate new token with repo scope
  3. Set as GITHUB_TOKEN environment variable

Clay Webhook

  1. Create a Clay table for enrichment
  2. Set up a webhook endpoint in Clay
  3. Use the webhook URL as clayWebhookUrl parameter
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.