Automate GitHub User Information Retrieval with Slack
detail.loadingPreview
Seamlessly fetch detailed GitHub user information and send it directly to a Slack channel. This workflow automates the retrieval of user profiles, public emails, and recent pull request contributor emails, streamlining team communication and developer insights.
About This Workflow
This n8n workflow provides a powerful solution for integrating GitHub and Slack, enabling the automatic retrieval and dissemination of valuable user data. When triggered by a webhook, it queries the GitHub API using GraphQL to fetch comprehensive details about a specified user, including their name, company, location, avatar, and public email. It then processes this information to extract relevant contributor emails from recent pull requests, filtering out generic GitHub no-reply addresses. Finally, the curated user details and contributor emails are neatly formatted and sent to a designated Slack channel, offering real-time insights into developer activity and contributions.
Key Features
- Real-time GitHub Data: Fetch user profiles, company, location, and avatar URLs directly from GitHub.
- Smart Email Extraction: Gathers public emails and relevant contributor emails from recent pull requests, filtering out no-reply addresses.
- Slack Integration: Delivers formatted user information and emails directly to your preferred Slack channel.
- Webhook Triggered: Easily initiate data retrieval with a simple HTTP POST request.
How To Use
- Set up the Webhook Node: Configure the
Webhooknode to receive incoming POST requests. Note the webhook URL generated. - Configure the GraphQL Node:
- In the
queryfield, replace"{{$node["Webhook"].json["body"]["text"]}}"with the actual GitHub username you want to query or ensure your webhook sends the username in thetextfield of the JSON body. - Set the
endpointtohttps://api.github.com/graphql. - Under
headerParametersUi, add aUser-Agentwith the valuen8nand anAuthorizationheader withbearer <Your_GitHub_Personal_Access_Token>.
- In the
- Review the Function Node: The
functionCodeis pre-configured to process the GraphQL response, extract and clean email addresses. No modifications are typically needed unless you have very specific filtering requirements. - Configure the Slack Node:
- Set the
channelto the desired Slack channel ID or name. You can dynamically set this using={{$node["Webhook"].json["body"]["channel_id"]}}if your webhook payload includes it. - Customize the
attachmentsto control the message format in Slack, using template variables like{{$node["GraphQL"].json[...]}}and{{$node["Function"].json[...]}}. - Ensure your Slack OAuth2 credentials are set up in n8n.
- Set the
Apps Used
Workflow JSON
{
"id": "f6acf436-998d-4fd3-98b4-2721389e9694",
"name": "Automate GitHub User Information Retrieval with Slack",
"nodes": 23,
"category": "DevOps",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: f6acf436-998d...
About the Author
Crypto_Watcher
Web3 Developer
Automated trading bots and blockchain monitoring workflows.
Statistics
Related Workflows
Discover more workflows you might like
Automated PR Merged QA Notifications
Streamline your QA process with this automated workflow that notifies your team upon successful Pull Request merges. Leverage AI and vector stores to enrich notifications and ensure seamless integration into your development pipeline.
Automate Qualys Report Generation and Retrieval
Streamline your Qualys security reporting by automating the generation and retrieval of reports. This workflow ensures timely access to crucial security data without manual intervention.
Robust Concurrency Control for n8n Workflows with Redis
Prevent simultaneous execution of critical n8n workflows or tasks using a centralized, Redis-backed locking mechanism. This reusable utility workflow ensures data integrity and resource management by allowing other workflows to acquire, check, and release locks.