Description
Overview
This email extraction automation workflow is designed to retrieve verified email addresses associated with a specified GitHub username. Utilizing a no-code integration pipeline, it enables teams to gather relevant contact information by parsing commit data and public profile details, triggered by an HTTP POST webhook.
The workflow initiates upon receiving a webhook event containing a GitHub username, then queries the GitHub GraphQL API to collect user data and recent pull request commits, ensuring deterministic extraction of valid email addresses.
Key Benefits
- Automates email collection from GitHub commit metadata and public user profiles.
- Filters out generic no-reply emails to provide verified contact addresses only.
- Uses a webhook trigger for real-time, event-driven email extraction workflows.
- Delivers formatted user details and emails directly to Slack channels for immediate team access.
Product Overview
This email extraction automation workflow begins with an HTTP POST webhook that expects a JSON payload containing a GitHub username and a Slack channel ID. The workflow uses the GitHub GraphQL API to query detailed user information, including name, company, location, avatar URL, public email, and the last 25 pull requests with their commits.
The core logic involves processing the GraphQL response to extract email addresses from commits authored by the user, matching either the full name or username. It removes duplicate emails and excludes GitHub-generated no-reply addresses using regex filters. The workflow then formats this information and posts it to the specified Slack channel using OAuth2 authentication.
Error handling relies on n8n’s default retry mechanisms without custom backoff or idempotency logic. All processing is transient, ensuring no persistence of data beyond message delivery. The workflow operates synchronously from webhook trigger to Slack message delivery, supporting immediate team collaboration.
Features and Outcomes
Core Automation
This email extraction orchestration pipeline inputs a GitHub username and retrieves user profile and pull request commit data. It applies deterministic filtering by matching commit author names against the user’s full name or username, ensuring relevant email capture.
- Single-pass evaluation of commit histories to extract verified emails.
- Regex-based exclusion of GitHub no-reply email addresses.
- Consolidation and deduplication of email addresses from multiple commits.
Integrations and Intake
The workflow integrates with GitHub’s GraphQL API using bearer token authentication and posts results to Slack via OAuth2. It accepts webhook POST requests with JSON payloads containing GitHub usernames and Slack channel IDs.
- GitHub GraphQL API for detailed user and commit data retrieval.
- Slack API for formatted message delivery to specified channels.
- Webhook node to receive real-time trigger events with required fields.
Outputs and Consumption
Outputs consist of structured Slack messages including user name, verified emails, company, location, and avatar URL. The delivery is synchronous, providing immediate visibility within team communication channels.
- Slack message with user details and comma-separated verified emails.
- Thumbnail avatar URL included for visual context.
- Real-time posting to Slack channels specified in webhook payload.
Workflow — End-to-End Execution
Step 1: Trigger
The workflow initiates upon receiving an HTTP POST request on a designated webhook path. The JSON payload must include a “text” field with the GitHub username and a “channel_id” field representing the target Slack channel.
Step 2: Processing
The GraphQL node queries GitHub’s API with the provided username, retrieving user profile and recent pull request commit data. The subsequent function node parses this response, performing presence checks and filtering emails based on author name matching and exclusion of no-reply addresses.
Step 3: Analysis
Email addresses are extracted only when the commit author’s name matches the user’s full name or username. Duplicate addresses are removed, and any emails matching GitHub’s no-reply regex pattern are filtered out, ensuring only verified, contactable emails remain.
Step 4: Delivery
The filtered user information and email list are formatted into a Slack message and sent to the specified channel using OAuth2 authentication. The delivery is synchronous, completing the workflow with immediate message posting.
Use Cases
Scenario 1
A development team needs to quickly find verified contact emails for contributors found on GitHub. By posting the GitHub username via the webhook, the workflow extracts valid emails and posts them to a Slack channel, enabling streamlined communication without manual lookup.
Scenario 2
Recruiters want to enrich candidate profiles with verified email addresses from GitHub commit histories. This orchestration pipeline automates email extraction from recent pull requests and delivers structured contact info into Slack channels for immediate use.
Scenario 3
Open source project maintainers require up-to-date contact details for contributors. Using this email extraction automation workflow, maintainers receive accurate email addresses filtered from commits, reducing manual email validation and improving contributor outreach efficiency.
How to use
To deploy this email extraction automation workflow, import it into your n8n instance and configure the Slack OAuth2 credentials and GitHub personal access token. Provide the Slack channel ID and GitHub username in the webhook POST request body. Once triggered, the workflow will fetch user and commit data, extract verified emails, and post the formatted details to Slack. Expect a structured message containing the user’s name, company, location, avatar, and filtered email addresses in real-time.
Comparison — Manual Process vs. Automation Workflow
| Attribute | Manual/Alternative | This Workflow |
|---|---|---|
| Steps required | Multiple manual queries to GitHub API and email filtering | Single automated pipeline from trigger to Slack delivery |
| Consistency | Variable, dependent on manual filtering accuracy | Deterministic email extraction with regex-based exclusion |
| Scalability | Limited by manual effort and API rate limits | Scales with automated webhook-triggered requests |
| Maintenance | High, requires frequent manual updates and error checks | Low, configured once with token-based auth and OAuth2 |
Technical Specifications
| Environment | n8n workflow automation platform |
|---|---|
| Tools / APIs | GitHub GraphQL API, Slack API |
| Execution Model | Synchronous webhook-triggered pipeline |
| Input Formats | HTTP POST JSON payload with “text” and “channel_id” |
| Output Formats | Formatted Slack message with user details and emails |
| Data Handling | Transient processing, no data persistence |
| Known Constraints | Relies on GitHub API availability and valid OAuth2 tokens |
| Credentials | GitHub personal access token, Slack OAuth2 |
Implementation Requirements
- Valid GitHub personal access token with GraphQL API permissions.
- Configured Slack OAuth2 credentials with post-message scope.
- Webhook endpoint accessible for HTTP POST requests with required JSON fields.
Configuration & Validation
- Confirm GitHub token permissions and Slack OAuth2 scopes are correctly set.
- Deploy workflow in n8n and verify webhook endpoint is active and reachable.
- Test POST requests with valid GitHub username and Slack channel ID to ensure message delivery.
Data Provenance
- Webhook node triggers workflow on incoming POST with username and channel ID.
- GraphQL node queries GitHub API for user profile and commit data.
- Function node filters and deduplicates emails, excluding no-reply addresses.
FAQ
How is the email extraction automation workflow triggered?
The workflow is triggered by an HTTP POST webhook that requires a JSON payload containing the GitHub username under the “text” field and the Slack channel ID under “channel_id”.
Which tools or models does the orchestration pipeline use?
It uses GitHub’s GraphQL API authenticated via a personal access token to retrieve user and commit data, combined with regex filtering logic in a function node for email extraction.
What does the response look like for client consumption?
The output is a formatted Slack message posted to the specified channel, containing the user’s name, verified email addresses, company, location, and avatar image as a thumbnail.
Is any data persisted by the workflow?
No user data or emails are stored persistently; processing occurs transiently within the workflow, with delivery directly to Slack.
How are errors handled in this integration flow?
Error handling relies on n8n’s default retry mechanisms; no custom error retries or backoff are implemented within the workflow.
Conclusion
This email extraction workflow provides a deterministic and automated method to retrieve verified contact emails from GitHub user profiles and pull request commits. It streamlines the process of obtaining accurate communication details and delivers them directly into Slack channels for team use. The workflow depends on valid GitHub API tokens and Slack OAuth2 credentials, and its operation requires ongoing external API availability. Its design emphasizes transient data handling and synchronous delivery without persistent storage, ensuring compliance with typical data security requirements.








Reviews
There are no reviews yet.