n8n Workflow

Send Selected Github Events To Slack

This n8n workflow automates tasks using Slack. Send Selected Github Events To Slack - ready to import and run in your n8n instance.

n8n workflow.json

About This Script

This n8n workflow automates tasks using Slack. Send Selected Github Events To Slack - ready to import and run in your n8n instance.
Features:
  • Conditional logic and branching
  • Integrates with Slack
  • Sends notifications or updates
Source Code
{
    "nodes": [
        {
            "name": "Github Trigger",
            "type": "n8n-nodes-base.githubTrigger",
            "position": [
                500,
                350
            ],
            "parameters": {
                "owner": "n8n-io",
                "events": [
                    "star"
                ],
                "repository": "n8n"
            },
            "credentials": {
                "githubApi": ""
            },
            "typeVersion": 1,
            "id": "8595cf90-62d4-4ffe-83e2-8edada1f65fe"
        },
        {
            "name": "IF",
            "type": "n8n-nodes-base.if",
            "position": [
                700,
                350
            ],
            "parameters": {
                "conditions": {
                    "string": [
                        {
                            "value1": "={{$node[\"Github Trigger\"].data[\"body\"][\"action\"]}}",
                            "value2": "created"
                        }
                    ]
                }
            },
            "typeVersion": 1,
            "id": "bf3b4c05-db71-4f0c-9cb7-5843debb5a7a"
        },
        {
            "name": "Slack - Add",
            "type": "n8n-nodes-base.slack",
            "position": [
                900,
                250
            ],
            "parameters": {
                "channel": "#general",
                "attachments": [
                    {
                        "text": "=The project has now: {{$node[\"Github Trigger\"].data[\"body\"][\"repository\"][\"stargazers_count\"]}} Stars",
                        "color": "#88FF00",
                        "title": "=Got new star from: {{$node[\"Github Trigger\"].data[\"body\"][\"sender\"][\"login\"]}}",
                        "image_url": "={{$node[\"Github Trigger\"].data[\"body\"][\"sender\"][\"avatar_url\"]}}",
                        "title_link": "={{$node[\"Github Trigger\"].data[\"body\"][\"sender\"][\"html_url\"]}}"
                    }
                ],
                "otherOptions": []
            },
            "credentials": {
                "slackApi": ""
            },
            "typeVersion": 1,
            "id": "f1efec79-ba1d-4a5f-9c34-5a6a3202d5f9"
        },
        {
            "name": "Slack - Remove",
            "type": "n8n-nodes-base.slack",
            "position": [
                900,
                450
            ],
            "parameters": {
                "channel": "#general",
                "attachments": [
                    {
                        "text": "=The project has now: {{$node[\"Github Trigger\"].data[\"body\"][\"repository\"][\"stargazers_count\"]}} Stars",
                        "color": "#ff0000",
                        "title": "=Star got removed by: {{$node[\"Github Trigger\"].data[\"body\"][\"sender\"][\"login\"]}}",
                        "image_url": "={{$node[\"Github Trigger\"].data[\"body\"][\"sender\"][\"avatar_url\"]}}",
                        "title_link": "={{$node[\"Github Trigger\"].data[\"body\"][\"sender\"][\"html_url\"]}}"
                    }
                ],
                "otherOptions": []
            },
            "credentials": {
                "slackApi": ""
            },
            "typeVersion": 1,
            "id": "5004d31a-cbbe-4802-90ea-a93cfe3f92d0"
        }
    ],
    "connections": {
        "IF": {
            "main": [
                [
                    {
                        "node": "Slack - Add",
                        "type": "main",
                        "index": 0
                    }
                ],
                [
                    {
                        "node": "Slack - Remove",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Github Trigger": {
            "main": [
                [
                    {
                        "node": "IF",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        }
    },
    "n8n_version": "1.5.0"
}
Requirements
n8n instance, Github API credentials, Slack API credentials
Tags
#n8n #automation #workflow
Quick Actions
More in n8n Workflows