Back to Integrations
integrationGmail node
integrationSlack node

Gmail and Slack integration

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

How to connect Gmail 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.

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

Step 2: Add and configure Gmail and Slack nodes

You can find Gmail 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 Gmail and Slack nodes one by one: input data on the left, parameters in the middle, and output data on the right.

Gmail and Slack integration: Add and configure Gmail and Slack nodes

Step 3: Connect Gmail and Slack

A connection establishes a link between Gmail 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.

Gmail and Slack integration: Connect Gmail and Slack

Step 4: Customize and extend your Gmail 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 Gmail and Slack with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

Gmail and Slack integration: Customize and extend your Gmail and Slack integration

Step 5: Test and activate your Gmail and Slack workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from Gmail 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.

Gmail and Slack integration: Test and activate your Gmail 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 Gmail and Slack workflows

+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.

Host your own Uptime Monitoring with Scheduled Triggers

This n8n workflow demonstrates how to build a simple uptime monitoring service using scheduled triggers. Useful for webmasters with a handful of sites who want a cost-effective solution without the need for all the bells and whistles. How it works Scheduled trigger reads a list of website urls in a Google Sheet every 5 minutes Each website url is checked using the HTTP node which determines if the website is either in the UP or DOWN state. An email and Slack message are sent for websites which are in the DOWN state. The Google Sheet is updated with the website's state and a log created. Logs can be used to determine total % of UP and DOWN time over a period. Requirements Google Sheet for storing websites to monitor and their states Gmail for email alerts Slack for channel alerts Customising the workflow Don't use Google Sheets? This can easily be exchanged with Excel or Airtable.

TwentyCRM event based updates on selective messaging channels with logs

Who is this template for? This workflow template is designed for DevOps, Engineering, and Managed Service Provider professionals seeking alerts on various channels, with each channel being logically chosen based on the severity of the event. How it works Each time a new event occurs, the workflow runs (powered by TwentyCRM's native Webhooks feature). After filtering for the required data from the webhook, the filtered data is logged using Google Sheets. Based on the eventType from the webhook, we conditionally select a predefined messaging channel and send updates or alerts through it. Set up instructions Complete the Set up credentials step when you first open the workflow. You'll need a Google-OAuth2.0 with Gmail API & Google Sheets Scope, Slack with OAuth2.0 - chat:write scopes. Set up the Webhook in TwentyCRM, linking the On new TwentyCRM event Trigger with your TwentyCRM App. Set the correct channel to send to in the Post message in channel step. After testing your workflow, swap the Test URL to Production URL in TwentyCRM and activate your workflow. Template was created in n8n v1.63.4.
+2

Automate Your RFP Process with OpenAI Assistants

This n8n workflow demonstrates how to automate oftern time-consuming form filling tasks in the early stages of the tendering process; the Request for Proposal document or "RFP". It does this by utilising a company's knowledgebase to generating question-and-answer pairs using Large Language Models. How it works A buyer's RFP is submitted to the workflow as a digital document that can be parsed. Our first AI agent scans and extracts all questions from the document into list form. The supplier sets up an OpenAI assistant prior loaded with company brand, marketing and technical documents. The workflow loops through each of the buyer's questions and poses these to the OpenAI assistant. The assistant's answers are captured until all questions are satisified and are then exported into a new document for review. A sales team member is then able to use this document to respond quickly to the RFP before their competitors. Example Webhook Request curl --location 'https://<n8n_webhook_url>' \ --form 'id="RFP001"' \ --form 'title="BlueChip Travel and StarBus Web Services"' \ --form 'reply_to="[email protected]"' \ --form 'data=@"k9pnbALxX/RFP Questionnaire.pdf"' Requirements An OpenAI account to use AI services. Customising the workflow OpenAI assistants is only one approach to hosting a company knowledgebase for AI to use. Exploring different solutions such as building your own RAG-powered database can sometimes yield better results in terms of control of how the data is managed and cost.

Suspicious Login Detection

This n8n workflow is designed for security monitoring and incident response when suspicious login events are detected. It can be initiated either manually from within the n8n UI for testing or automatically triggered by a webhook when a new login event occurs. The workflow first extracts relevant data from the incoming webhook payload, including the IP address, user agent, timestamp, URL, and user ID. It then splits into three parallel processing paths. In the first path, it queries GreyNoise's Community API to retrieve information about the investigated IP address. Depending on the classification and trust level received from GreyNoise, the alert is given a High, Medium, or Low priority. This priority is assigned based on the best practices documentation from GreyNoise on how to apply their data to analysis. Once a priority is assigned, a message is sent to a Slack channel to notify users about the alert. The second path involves fetching geolocation data about the IP address using IP-API's Geolocation API and merging it with data from the UserParser node. This data is then combined with the data obtained from GreyNoise. In the third path, the UserParser node queries the Userparser IP address and user agent lookup API to obtain information about the user's IP and user agent. This data is merged with the IP-API data and GreyNoise data. The workflow then checks if the IP address is considered an unknown threat by examining both the noise and riot fields from GreyNoise. If it is considered an unknown threat, the workflow proceeds to retrieve the last 10 login records for the same user from a Postgres database. If there are any discrepancies in the login information, indicating a new location or device/browser, the user is informed via email. Potential issues when setting up this workflow include ensuring that credentials are correctly entered for GreyNoise and UserParser nodes, and addressing any discrepancies in the data sources that could lead to false positives or negatives in threat detection. Additionally, the usage of hardcoded API keys should be replaced with credentials for security and flexibility. Thorough testing and validation with sample data are crucial to ensure the workflow performs as expected and aligns with security incident response procedures.

URL and IP lookups through Greynoise and VirusTotal

This n8n workflow serves as a powerful cybersecurity and threat intelligence tool to look up URLs or IP addresses through industry standard threat intelligence vendors. It starts with either a form submission or a webhook trigger, allowing users to input data, URLs or IPs that require analysis. The workflow then splits into two paths depending on whether the input data is an IP or URL. If an IP was given, it sets the ip variable to the IP; however if a URL was given the workflow will perform a DNS lookup using Google Public DNS and sets the ip variable based on the results from Google. The workflow then checks the obtained IP addresses against GreyNoise services, with one branch utilizing GreyNoise RIOT IP Lookup to assess IP reputation and association with known benign services, and the other using GreyNoise IP Context to evaluate potential threats. The results from both GreyNoise services are merged to create a comprehensive analysis which includes the IP, classification (benign, malicious, or unknown), IP location, tags to identify activity or malware, category, and trust level. In parallel, a VirusTotal scan is initiated for the URL/IP to identify if it is malicious. A 5-second wait ensures proper processing, and the workflow subsequently polls the scan result to determine when the analysis is complete. The workflow then summarizes the analysis including the overall security vendor analysis results, blockList analysis, OpenPhish analysis, the URL, and the IP. Finally, the workflow combines the summarized intelligence from both GreyNoise and VirusTotal to provide a thorough analysis of the URL/IP. This summarized intelligence can then be emailed to the user that filled out the form via Gmail or it can be sent to the user via a Slack message. Setting up this workflow may require proper configuration of the form submission or webhook trigger, and ensuring that the GreyNoise and VirusTotal API credentials are correctly integrated. Users should also consider the potential volume of data and API rate limits, as excessive requests could lead to issues. Proper documentation and validation of input data are crucial to ensure accurate and meaningful results in the final report.

Build your own Gmail and Slack integration

Create custom Gmail 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.

Gmail supported actions

Add Label
Delete
Get
Get Many
Mark as Read
Mark as Unread
Remove Label
Reply
Send
Send and Wait for Approval
Create
Delete
Get
Get Many
Create
Delete
Get
Get Many
Add Label
Delete
Get
Get Many
Remove Label
Reply
Trash
Untrash

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

FAQs

  • Can Gmail connect with Slack?

  • Can I use Gmail’s API with n8n?

  • Can I use Slack’s API with n8n?

  • Is n8n secure for integrating Gmail and Slack?

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

Need help setting up your Gmail and Slack integration?

Discover our latest community's recommendations and join the discussions about Gmail and Slack integration.
jake chard
Jan Koch
Paul Kennard
Nicolas N
Muhammed Iqbal P B

Looking to integrate Gmail and Slack in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate Gmail 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