Why Mailshake for Developer-Focused Cold Email
Mailshake is a cold email platform built for sales teams running high-volume outbound campaigns. It supports email sequences, A/B testing, reply detection, and direct CRM integrations. When you pair Mailshake with GitLeads — which captures developer buying signals from GitHub — you get a pipeline that runs from "developer starred a competitor repo" to "enrolled in a Mailshake sequence" without manual work.
GitLeads does not send emails. We find leads who show intent signals on GitHub and push enriched profiles to your existing tools. Mailshake handles the outreach.
Integration Architecture
The integration uses a webhook from GitLeads to your endpoint, which calls the Mailshake API to add leads and enroll them in a campaign:
// Route: POST /api/webhooks/gitleads-mailshake
const MAILSHAKE_API_KEY = process.env.MAILSHAKE_API_KEY!;
const CAMPAIGN_ID = process.env.MAILSHAKE_CAMPAIGN_ID!;
const MS_BASE = 'https://api.mailshake.com/2018-09-01';
async function mailshakePost(path: string, body: object) {
const res = await fetch(\`\${MS_BASE}\${path}\`, {
method: 'POST',
headers: {
'X-Api-Key': MAILSHAKE_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
if (!res.ok) throw new Error(\`Mailshake \${path} failed: \${res.status}\`);
return res.json();
}
export async function POST(req: Request) {
const lead = await req.json();
if (!lead.email) return Response.json({ skipped: true, reason: 'no_email' });
const result = await mailshakePost('/recipients/add', {
campaignID: Number(CAMPAIGN_ID),
addAsNewList: false,
recipients: [{
emailAddress: lead.email,
fullName: lead.name ?? lead.login,
fields: {
github_username: lead.login,
company: lead.company ?? '',
signal_type: lead.signal_type,
signal_repo: lead.signal_repo ?? '',
top_language: (lead.top_languages ?? [])[0] ?? '',
bio: lead.bio ?? '',
},
}],
});
return Response.json({ ok: true, mailshake: result });
}Setting Up the GitLeads Webhook
- In your GitLeads dashboard, go to Integrations → Webhook
- Set the webhook URL to your deployed endpoint
- Set MAILSHAKE_API_KEY from your Mailshake account settings
- Set MAILSHAKE_CAMPAIGN_ID from the campaign URL in Mailshake
- Configure your keyword or stargazer signal in GitLeads to trigger on relevant GitHub activity
- Test with a real lead — the developer appears as a recipient in your Mailshake campaign
Personalizing Mailshake Templates with GitHub Data
The fields object passed to Mailshake becomes available in your email templates as merge tags. In Mailshake, use {{github_username}}, {{company}}, {{signal_repo}}, and {{top_language}} to personalize outreach. Developer-specific lines like "I noticed you starred {{signal_repo}}" dramatically outperform generic cold email.
Filtering Logic for Quality
Not every GitHub signal should go into Mailshake. Consider filtering by:
- lead.followers >= 10 — eliminates bot and throwaway accounts
- lead.email !== null — Mailshake requires a valid email to enroll
- lead.company !== null — signals a professional context, not a hobbyist
- Signal type: stargazer signals are higher intent than general keyword matches
- Top language match: only route leads whose top_languages includes your target stack