Why Push GitHub Signals into Encharge
Encharge is a behavior-based email marketing platform built for SaaS companies. Unlike broadcast email tools, Encharge triggers flows based on user actions — making it ideal for developer-targeted outreach based on GitHub intent signals. When a developer stars your tracked repo or mentions a relevant keyword in a GitHub issue, that behavior is exactly the kind of trigger Encharge is designed to act on.
GitLeads captures those GitHub signals in real time. This guide shows you how to route them into Encharge as people with tags and custom fields so your lifecycle flows fire immediately.
What You Need
- A GitLeads account with at least one tracked repo or keyword configured
- An Encharge account with API access (Encharge API key from Settings → API)
- A webhook receiver (your server, an n8n workflow, or a Zapier zap)
Option 1: Direct Webhook to Encharge API
GitLeads sends a webhook payload for each new lead. You can forward that payload directly to the Encharge People API to create or update a person and trigger any flows listening on their tags.
// Webhook handler: receive GitLeads lead, push to Encharge
import type { NextApiRequest, NextApiResponse } from 'next';
interface GitLeadsLead {
name: string;
email: string;
githubUsername: string;
signalType: 'stargazer' | 'keyword';
repoName?: string;
keywordMatch?: string;
company?: string;
followers: number;
topLanguages: string[];
bio?: string;
location?: string;
}
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
if (req.method !== 'POST') return res.status(405).end();
const lead: GitLeadsLead = req.body;
// Skip leads without email — Encharge requires email
if (!lead.email) return res.status(200).json({ skipped: true });
const tags = [
'github-lead',
`signal:${lead.signalType}`,
...(lead.topLanguages.slice(0, 3).map((l) => `lang:${l.toLowerCase().replace(/\s+/g, '-')}`)),
];
if (lead.repoName) tags.push(`repo:${lead.repoName.replace('/', '--')}`);
const enchargePayload = {
email: lead.email,
name: lead.name,
tags,
fields: {
github_username: lead.githubUsername,
github_signal_type: lead.signalType,
github_repo: lead.repoName ?? '',
github_keyword: lead.keywordMatch ?? '',
github_followers: lead.followers,
github_top_language: lead.topLanguages[0] ?? '',
company: lead.company ?? '',
location: lead.location ?? '',
bio: lead.bio ?? '',
},
};
const enchargeRes = await fetch('https://ingest.encharge.io/v1/people', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Encharge-Token': process.env.ENCHARGE_API_KEY!,
},
body: JSON.stringify(enchargePayload),
});
if (!enchargeRes.ok) {
const error = await enchargeRes.text();
return res.status(500).json({ error });
}
return res.status(200).json({ ok: true });
}Option 2: Via n8n Workflow
If you prefer a no-code path, connect GitLeads to Encharge through n8n:
- Create an n8n Webhook node and copy the URL into GitLeads under Integrations → Webhook
- Add a Function node to transform the GitLeads payload into Encharge's People schema
- Add an HTTP Request node: POST to https://ingest.encharge.io/v1/people with X-Encharge-Token header
- Add a Filter node to skip leads without email addresses before the Encharge call
- Test by triggering a manual lead from the GitLeads dashboard
Setting Up Encharge Flows for GitHub Leads
Once people are flowing into Encharge, set up these trigger flows:
- Tag trigger: "github-lead" → send a plain-text email within 10 minutes acknowledging their tool interest
- Tag trigger: "signal:stargazer" → enroll in a 5-email nurture sequence about your product's core use case
- Tag trigger: "signal:keyword" → route to a segment-specific flow based on the matched keyword
- Field condition: github_followers > 500 → flag for manual SDR review in Encharge's CRM view
- Tag trigger: "lang:rust" or "lang:go" → route to a developer-specific track with technical content
Encharge Custom Fields for GitHub Data
In Encharge, go to Settings → Custom Fields and create these fields for GitHub lead data:
- github_username (text) — for linking back to the GitHub profile
- github_signal_type (text) — "stargazer" or "keyword"
- github_repo (text) — the repo that triggered the signal
- github_keyword (text) — the matched keyword if applicable
- github_followers (number) — for influence scoring
- github_top_language (text) — for personalization in email content
Personalization in Encharge Emails
Encharge's liquid-style template variables let you personalize emails with GitHub data:
<!-- Encharge email template using GitHub fields -->
<p>Hi {{ person.firstName | default: "there" }},</p>
<p>I saw you recently starred
<strong>{{ person.github_repo | default: "one of our repos" }}</strong>
on GitHub — thanks for checking it out.</p>
{% if person.github_top_language == "Rust" %}
<p>Since you work in Rust, you might find our Rust client library useful:
<a href="https://docs.example.com/rust">docs.example.com/rust</a>
</p>
{% elsif person.github_top_language == "Go" %}
<p>Our Go SDK is fully idiomatic — check it out:
<a href="https://docs.example.com/go">docs.example.com/go</a>
</p>
{% endif %}
<p>Happy to hop on a 15-minute call if you have questions.</p>