Email new GitHub stargazers who fit your ideal customer
Finds who recently starred your repo, keeps the people at companies you sell to, and queues a no-pitch thank-you email in lemlist.
Outcome
A table of the new stargazers, with their company and whether they were queued, or why not.
An approved no-pitch email for each good fit, queued in your lemlist campaign.
How it works
GList new stargazers, by List stargazers by GitHub
List the users who starred
repo, with star times; the newest stars are on the last page, so follow theLinkheader there and read backwards. Keep the logins that starred withinlookback_days.
PIdentify them, by Enrich a person by People Data Labs
Match up to
max_enrichmentslogins on the profile URLhttps://github.com/<login>, requiring a work email. Keep name, title, work email,job_company_website,job_company_sizeandjob_company_industry; skip people with no match.
PQualify the company, by Enrich a company by People Data Labs
Look up the website only for people whose company size or industry is missing. Keep the people whose company fits
ideal_customer.Write emails, by Your agent
Draft a three-sentence plain-text email per person: thank them for the star, share one link from
resourcesthat fits their role, ask one question. No pitch. Show the drafts to the user.l
Queue the emails, by Add a lead to a campaign by lemlist
After the user approves, add each person to
campaignwith their approved email inemail_variable.
You'll be asked for
The repository to watch, as owner/name
e.g. acme/acme-sdk
How recent a star counts
e.g. 14
The companies you sell to
e.g. B2B software, 50 to 1,000 employees
One or two links worth sharing with a new user
e.g. the quickstart and an example app
The most people to enrich in one run, since each match costs a credit
e.g. 50
The lemlist campaign that sends the emails, by name
e.g. Stargazer thank-you
The custom variable the campaign's email prints as its whole body, set up once in lemlist
e.g. drafted_email
github-stargazers-outbound.mdView markdown
Email new GitHub stargazers who fit your ideal customer
Finds who recently starred your repo, keeps the people at companies you sell to, and queues a no-pitch thank-you email in lemlist.
Set up the tools below, then run the steps in order for the user, carrying each step's results into the next. The run is done when the user has the outcome below.
Outcome
- A table of the new stargazers, with their company and whether they were queued, or why not.
- An approved no-pitch email for each good fit, queued in your lemlist campaign.
Inputs
Ask the user for these before you start.
repo: the repository to watch, as owner/name, e.g. acme/acme-sdklookback_days: how recent a star counts, e.g. 14ideal_customer: the companies you sell to, e.g. B2B software, 50 to 1,000 employeesresources: one or two links worth sharing with a new user, e.g. the quickstart and an example appmax_enrichments: the most people to enrich in one run, since each match costs a credit, e.g. 50campaign: the lemlist campaign that sends the emails, by name, e.g. Stargazer thank-youemail_variable: the custom variable the campaign's email prints as its whole body, set up once in lemlist, e.g. drafted_email
Set up
List stargazers (GitHub, tool:github/list-stargazers)
Use the API.
- Base URL: https://api.github.com
- Endpoint:
GET /repos/{owner}/{repo}/stargazers - Auth: send the header
Authorization: Bearer $GITHUB_TOKEN - Get a key: https://github.com/settings/personal-access-tokens/new
Note: Send Accept: application/vnd.github.star+json to get each star's starred_at timestamp.
People Data Labs (tool:people-data-labs/enrich-person, tool:people-data-labs/enrich-company)
Use the API.
- Base URL: https://api.peopledatalabs.com
- Enrich a person:
GET /v5/person/enrich - Enrich a company:
GET /v5/company/enrich - Auth: send the header
X-Api-Key: $PDL_API_KEY - Get a key: https://dashboard.peopledatalabs.com/api-keys
Notes:
- Enrich a person: Charged per match; no match returns 404. Set
required, such aswork_email, to be charged only for matches with the fields you need. On the free plan, emails, phone numbers and detailed locations come back as true/false flags. - Enrich a company: Charged per match; no match returns 404. Headcount trends, inferred revenue, subsidiaries and job-posting insights are premium fields your plan must include.
Add a lead to a campaign (lemlist, tool:lemlist/add-lead-to-campaign)
Use the first option your agent supports.
Note: The campaign automates outreach to its leads: confirm it first. findEmail, verifyEmail, findPhone and linkedinEnrichment spend credits, and a lead already in the campaign is refused with 400 LEAD_ALREADY_IN_CAMPAIGN.
CLI (official)
Install the command and sign in with it, then confirm it runs.
npm install -g @lemlist-official/cli
lemlist --version
Run lemlist api POST /campaigns/{campaignId}/leads/.
API (official)
- Base URL: https://api.lemlist.com/api
- Endpoint:
POST /campaigns/{campaignId}/leads/ - Auth: send the header
Authorization: Basic $LEMLIST_API_KEY - Get a key: https://app.lemlist.com/settings/integrations
Note: LEMLIST_API_KEY holds the base64 of :<api key>, an empty username and the key; 20 requests every 2 seconds per key.
Before step 1, confirm access to each service with its cheapest read-only call, like a list or a search. Never send or change anything to test access.
Steps
- List new stargazers with List stargazers (GitHub). List the users who starred
repo, with star times; the newest stars are on the last page, so follow theLinkheader there and read backwards. Keep the logins that starred withinlookback_days. - Identify them with Enrich a person (People Data Labs). Match up to
max_enrichmentslogins on the profile URLhttps://github.com/<login>, requiring a work email. Keep name, title, work email,job_company_website,job_company_sizeandjob_company_industry; skip people with no match. - Qualify the company with Enrich a company (People Data Labs). Look up the website only for people whose company size or industry is missing. Keep the people whose company fits
ideal_customer. - Write emails yourself. Draft a three-sentence plain-text email per person: thank them for the star, share one link from
resourcesthat fits their role, ask one question. No pitch. Show the drafts to the user. - Queue the emails with Add a lead to a campaign (lemlist). After the user approves, add each person to
campaignwith their approved email inemail_variable.
Rules
- Use only the services set up above. The read-only calls they need, like listing ids or polling for results, are fine.
- Ask the user before anything that sends messages, costs money, or changes data, and say how many records it touches. One approval covers a batch the user has seen.
- Never print API keys.
