Back to Integrations
integrationWebhook node
integrationSlack node

Webhook and Slack integration

Save yourself the work of writing custom integrations for Webhook and Slack and use n8n instead. Build adaptable and scalable Development, Core Nodes, and Communication workflows that work with your technology stack. All within a building experience you will love.

How to connect Webhook and Slack

  • Step 1: Create a new workflow
  • Step 2: Add and configure nodes
  • Step 3: Connect
  • Step 4: Customize and extend your integration
  • Step 5: Test and activate your workflow

Step 1: Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

Webhook and Slack integration: Create a new workflow and add the first step

Step 2: Add and configure Webhook and Slack nodes

You can find Webhook and Slack in the nodes panel. Drag them onto your workflow canvas, selecting their actions. Click each node, choose a credential, and authenticate to grant n8n access. Configure Webhook and Slack nodes one by one: input data on the left, parameters in the middle, and output data on the right.

Webhook and Slack integration: Add and configure Webhook and Slack nodes

Step 3: Connect Webhook and Slack

A connection establishes a link between Webhook and Slack (or vice versa) to route data through the workflow. Data flows from the output of one node to the input of another. You can have single or multiple connections for each node.

Webhook and Slack integration: Connect Webhook and Slack

Step 4: Customize and extend your Webhook and Slack integration

Use n8n's core nodes such as If, Split Out, Merge, and others to transform and manipulate data. Write custom JavaScript or Python in the Code node and run it as a step in your workflow. Connect Webhook and Slack with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

Webhook and Slack integration: Customize and extend your Webhook and Slack integration

Step 5: Test and activate your Webhook and Slack workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from Webhook to Slack or vice versa. Easily debug your workflow: you can check past executions to isolate and fix the mistake. Once you've tested everything, make sure to save your workflow and activate it.

Webhook and Slack integration: Test and activate your Webhook and Slack workflow

Advanced AI Demo (Presented at AI Developers #14 meetup)

This workflow was presented at the AI Developers meet up in San Fransico on 24 July, 2024.

AI workflows
Categorize incoming Gmail emails and assign custom Gmail labels. This example uses the Text Classifier node, simplifying this usecase.
Ingest a PDF into a Pinecone vector store and chat with it (RAG example)
AI Agent example showcasing the HTTP Request tool. We teach the agent how to check availability on a Google Calendar and book an appointment.

Nodes used in this workflow

Popular Webhook and Slack workflows

Slack slash commands AI Chat Bot

This is a response chatbot in public channels through slash commands. I explain more in detail through the YouTube video, but it's only available in Korean. How it works? When you request the created slash command in Slack, the request comes to the webhook. Then, the Switch Node branches appropriately according to each slash command request. Here, a slash command called /ask is connected to the chatbot, and the chatbot generates answers to the questions asked. The final node responds to the channel. Set up steps Create a Slack app. Add chat:write permission in Slack OAuth&Permissions>Scopes. Create a Command in Slack Slash Commands menu and enter the n8n Webhook node's URL. Complete creating the Slash Commands. Enter the created command in the Switch node. 슬래시 커맨드를 통한 공개 채널에서의 응답 챗봇 입니다. 유튜브 영상에 더 자세하게 설명 드립니다. 설명 슬랙에 생성한 슬래시 커맨드를 슬랙에서 요청하면 웹훅에 요청이 들어옵니다. 이후 Switch Node에서 각 슬래시 커맨드의 요청에 따라 알맞게 분기합니다. 여기에서는 /ask​라는 슬래시 커맨드가 챗봇으로 연결되어 있고, 챗봇에서 질문한 내용의 답변을 생성합니다. 마지막 노드에서 채널로 응답을 합니다. 설정 방법 Slack 앱을 만드세요. Slack OAuth&Permissions>Scopes 에서 chat:write 권한을 추가하세요. Slack Slash Commands 메뉴에서 Command를 생성하고, n8n Webhook 노드의 url을 입력하세요. Slash Slash Commands 생성을 완료하세요. Switch 노드에 생성한 커맨드를 입력하세요.
+2

AI-Generated Summary Block for WordPress Posts

What is this workflow? This n8n template automates the process of adding an AI-generated summary at the top of your WordPress posts. It retrieves, processes, and updates your posts dynamically, ensuring efficiency and flexibility without relying on a heavy WordPress plugin. Example of AI Summary Section How It Works Triggers → Runs on a scheduled interval or via a webhook when a new post is published. Retrieves posts → Fetches content from WordPress and converts HTML to Markdown for AI processing. AI Summary Generation → Uses OpenAI to create a concise summary. Post Update → Inserts the summary at the top of the post while keeping the original excerpt intact. Data Logging & Notifications → Saves processed posts to Google Sheets and notifies a Slack channel. Why use this workflow? ✅ No need for a WordPress plugin → Keeps your site lightweight. ✅ Highly flexible → Easily connect with Google Sheets, Slack, or other services. ✅ Customizable → Adapt AI prompts, formatting, and integrations to your needs. ✅ Smart filtering → Ensures posts are not reprocessed unnecessarily. 💡 Check the detailed sticky notes for setup instructions and customization options!
+11

Advanced AI Demo (Presented at AI Developers #14 meetup)

This workflow was presented at the AI Developers meet up in San Fransico on 24 July, 2024. AI workflows Categorize incoming Gmail emails and assign custom Gmail labels. This example uses the Text Classifier node, simplifying this usecase. Ingest a PDF into a Pinecone vector store and chat with it (RAG example) AI Agent example showcasing the HTTP Request tool. We teach the agent how to check availability on a Google Calendar and book an appointment.

IT Ops AI SlackBot Workflow - Chat with your knowledge base

Video Demo: Click here to see a video of this workflow in action. Summary Description: The "IT Department Q&A Workflow" is designed to streamline and automate the process of handling IT-related inquiries from employees through Slack. When an employee sends a direct message (DM) to the IT department's Slack channel, the workflow is triggered. The initial step involves the "Receive DMs" node, which listens for new messages. Upon receiving a message, the workflow verifies the webhook by responding to Slack's challenge request, ensuring that the communication channel is active and secure. Once the webhook is verified, the workflow checks if the message sender is a bot using the "Check if Bot" node. If the sender is identified as a bot, the workflow terminates the process to avoid unnecessary actions. If the sender is a human, the workflow sends an acknowledgment message back to the user, confirming that their query is being processed. This is achieved through the "Send Initial Message" node, which posts a simple message like "On it!" to the user's Slack channel. The core functionality of the workflow is powered by the "AI Agent" node, which utilizes the OpenAI GPT-4 model to interpret and respond to the user's query. This AI-driven node processes the text of the received message, generating an appropriate response based on the context and information available. To maintain conversation context, the "Window Buffer Memory" node stores the last five messages from each user, ensuring that the AI agent can provide coherent and contextually relevant answers. Additionally, the workflow includes a custom Knowledge Base (KB) tool (see that tool template here) that integrates with the AI agent, allowing it to search the company's internal KB for relevant information. After generating the response, the workflow cleans up the initial acknowledgment message using the "Delete Initial Message" node to keep the conversation thread clean. Finally, the generated response is sent back to the user via the "Send Message" node, providing them with the information or assistance they requested. This workflow effectively automates the IT support process, reducing response times and improving efficiency. To quickly deploy the Knowledge Ninja app in Slack, use the app manifest below and don't forget to replace the two sample urls: { "display_information": { "name": "Knowledge Ninja", "description": "IT Department Q&A Workflow", "background_color": "#005e5e" }, "features": { "bot_user": { "display_name": "IT Ops AI SlackBot Workflow", "always_online": true } }, "oauth_config": { "redirect_urls": [ "Replace everything inside the double quotes with your slack redirect oauth url, for example: https://n8n.domain.com/rest/oauth2-credential/callback" ], "scopes": { "user": [ "search:read" ], "bot": [ "chat:write", "chat:write.customize", "groups:history", "groups:read", "groups:write", "groups:write.invites", "groups:write.topic", "im:history", "im:read", "im:write", "mpim:history", "mpim:read", "mpim:write", "mpim:write.topic", "usergroups:read", "usergroups:write", "users:write", "channels:history" ] } }, "settings": { "event_subscriptions": { "request_url": "Replace everything inside the double quotes with your workflow webhook url, for example: https://n8n.domain.com/webhook/99db3e73-57d8-4107-ab02-5b7e713894ad", "bot_events": [ "message.im" ] }, "org_deploy_enabled": false, "socket_mode_enabled": false, "token_rotation_enabled": false } }

List recent ServiceNow Incidents in Slack Using Pop Up Modal

Who is this for? This workflow is designed for IT teams, service desk personnel, and incident management professionals who need a streamlined way to monitor and report on recent ServiceNow incidents directly within Slack. What problem is this workflow solving? / Use Case Manually monitoring incidents in ServiceNow can be time-consuming, and keeping teams updated about new or specific incidents often involves additional manual effort. This workflow automates the process of querying recent incidents from ServiceNow based on user-defined parameters and delivering formatted results directly to Slack. It ensures faster response times and improved incident visibility. What this workflow does This workflow integrates Slack and ServiceNow to provide an automated system for retrieving and presenting incident details. Slack User Interaction: Users initiate the workflow via a Slack modal form, selecting incident parameters like priority and state. ServiceNow Query: The workflow queries ServiceNow for incidents matching the selected criteria. Results Delivery: Incident results are sent back to Slack as a message formatted using Block Kit. If no results are found, the workflow notifies the user with a detailed message, either in a Slack channel or via direct message. Error Handling: If no channel is selected or any issues arise, the workflow ensures graceful fallback with appropriate notifications. Setup Instructions Slack Setup: Integrate Slack with n8n using a Slack app. Configure the modal form to accept parameters like priority and state. Check out this video for setting up a modal slack app on YouTube. ServiceNow Integration: Use ServiceNow credentials to connect with n8n. Ensure appropriate permissions for querying incidents. n8n Workflow Configuration: Import this workflow into n8n. Verify all node configurations, particularly those for ServiceNow API queries and Slack outputs. Set up webhook URLs for Slack event handling. Testing: Trigger the workflow from Slack to test modal inputs and incident queries. Confirm the output is correctly formatted and delivered to the intended Slack channel or user. How to Customize this Workflow to Your Needs Modify the ServiceNow query logic to include additional filters or fields. Adjust the Slack Block Kit formatting to match your organization’s preferred notification style. Use conditional logic to add more advanced handling for specific priorities or states. Expand the workflow to include escalation steps, such as notifying a specific team or creating follow-up tasks. Workflow Highlights Slack Modal Form**: Allows users to specify search criteria for incidents interactively. Dynamic Results Delivery**: Automatically sends results to a Slack channel or direct message based on user input. Error Handling**: Provides fallback notifications when no incidents are found or user inputs are incomplete. Customizable Integration**: Easily adaptable to fit different organizational needs, including advanced filtering and formatting options.

Monitor Multiple Github Repos via Webhook

What this workflow does This workflow allows you to monitor multiple Github repos simultaneously without polling due to use of Webhooks. It programmatically allows for adding and deleting of repos to your watchlist to make management convenient. Description Can monitor multiple repos simultaneously. Programmatically register or unregister repos from a list. No need for manual work. Webhook notification means no constant polling necessary. Setup Creating Credentials on Github Generate a personal access token on github by following these esteps; Right hand side of page -> Settings -> scroll to bottom -> Developer Settings > Personal Access Token > Tokens (classic) > Generate New Token Give scopes: admin:repo_hook repo (if you want to use it for your own private repo) if you need more help, see here: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens Setting Credentials in n8n In Register Github Webhook Authenticaion > Generic Credential Type Generic Auth Type > Header Auth Header Auth > Create New Credential with Name set to 'Authorization' and Value set to 'Bearer '. (You can reuse this for Delete Github Webhook and Get Existing Webhooks). Now in Register Github Webhook, scroll down to Send Body > JSON and inside the JSON, change the value of "url" to the webhook address given as Production URL in the node Webhook Trigger. Notification settings In the third row, link up the Webhook Trigger to any API of your choice. Slack and Telegram are given as examples. You can also format the notification message as you wish. Setup time: roughly 10 minutes. Instructions Video: https://vimeo.com/1013473758 Test Register Webhooks In Repos to Monitor, add any repo you want to monitor changes for. Disable Webhook Trigger, Click Test Workflow and if your Github credentials were set correctly, it will automatically register the webhooks. - You can test this by running the single node Get Existing Webhook and confirming it outputs the repo addresses. Handle Github Events Now that you have registered the webhooks, re-enable Webhook Trigger and activate the workflow. Make a commit to any of the registered repos. Confirm that the notification went through. That's it!

Build your own Webhook and Slack integration

Create custom Webhook and Slack workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

Slack supported actions

Archive
Archives a conversation
Close
Closes a direct message or multi-person direct message
Create
Initiates a public or private channel-based conversation
Get
Get information about a channel
Get Many
Get many channels in a Slack team
History
Get a conversation's history of messages and events
Invite
Invite a user to a channel
Join
Joins an existing conversation
Kick
Removes a user from a channel
Leave
Leaves a conversation
Member
List members of a conversation
Open
Opens or resumes a direct message or multi-person direct message
Rename
Renames a conversation
Replies
Get a thread of messages posted to a channel
Set Purpose
Sets the purpose for a conversation
Set Topic
Sets the topic for a conversation
Unarchive
Unarchives a conversation
Get
Get Many
Get & filters team files
Upload
Create or upload an existing file
Delete
Get Permalink
Search
Send
Send and Wait for Approval
Update
Add
Adds a reaction to a message
Get
Get the reactions of a message
Remove
Remove a reaction of a message
Add
Add a star to an item
Delete
Delete a star from an item
Get Many
Get many stars of autenticated user
Get
Get information about a user
Get Many
Get a list of many users
Get User's Profile
Get a user's profile
Get User's Status
Get online status of a user
Update User's Profile
Update a user's profile
Create
Disable
Enable
Get Many
Update

Webhook and Slack integration details

integrationWebhook node
Webhook

Webhooks are automatic notifications that apps send when something occurs. They are sent to a certain URL, which is effectively the app's phone number or address, and contain a message or payload. Polling is nearly never quicker than webhooks, and it takes less effort from you.

Use case

Save engineering resources

Reduce time spent on customer integrations, engineer faster POCs, keep your customer-specific functionality separate from product all without having to code.

Learn more

FAQs

  • Can Webhook connect with Slack?

  • Can I use Webhook’s API with n8n?

  • Can I use Slack’s API with n8n?

  • Is n8n secure for integrating Webhook and Slack?

  • How to get started with Webhook and Slack integration in n8n.io?

Need help setting up your Webhook and Slack integration?

Discover our latest community's recommendations and join the discussions about Webhook and Slack integration.
Benjamin Hatton
Albert Ashkhatoyan
Víctor González
Salomão
sg tech

Looking to integrate Webhook and Slack in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate Webhook with Slack

Build complex workflows, really fast

Build complex workflows, really fast

Handle branching, merging and iteration easily.
Pause your workflow to wait for external events.

Code when you need it, UI when you don't

Simple debugging

Your data is displayed alongside your settings, making edge cases easy to track down.

Use templates to get started fast

Use 1000+ workflow templates available from our core team and our community.

Reuse your work

Copy and paste, easily import and export workflows.

Implement complex processes faster with n8n

red iconyellow iconred iconyellow icon