Back to Integrations
integrationOpenAI node
integrationSlack node

OpenAI and Slack integration

n8n lets you integrate OpenAI with Slack to build powerful workflows. Design automation that extracts, transforms and loads data between your apps and services. You can choose from thousands of ready-made apps or use our universal HTTP connector to sync apps not yet in our library.

Integrate OpenAI and Slack

Build your own OpenAI and Slack integration

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

How to connect OpenAI and Slack

  • Step 1: Add the first step

  • Step 2: Add OpenAI and Slack nodes

  • Step 3: Connect OpenAI and Slack

  • Step 4: Run workflow

Classify new bugs in Linear with OpenAI's GPT-4 and move them to the right team

Use case

When working with multiple teams, bugs must get in front of the right team as quickly as possible to be resolved. Normally this includes a manual grooming of new bugs that have arrived in your ticketing system (in our case Linear). We found this way too time-consuming. That's why we built this workflow.

What this workflow does

This workflow triggers every time a Linear issue is created or updated within a certain team. For us at n8n, we created one general team called Engineering where all bugs get added in the beginning. The workflow then checks if the issue meets the criteria to be auto-moved to a certain team. In our case, that means that the description is filled, that it has the bug label, and that it's in the Triage state. The workflow then classifies the bug using OpenAI's GPT-4 model before updating the team property of the Linear issue. If the AI fails to classify a team, the workflow sends an alert to Slack.

Setup

  1. Add your Linear and OpenAi credentials
  2. Change the team in the Linear Trigger to match your needs
  3. Customize your teams and their areas of responsibility in the Set me up node. Please use the format [Teamname][Description/Areas of responsibility]. Also, make sure that the team names match the names in Linear exactly.
  4. Change the Slack channel in the Set me up node to your Slack channel of choice.

How to adjust it to your needs

  • Play around with the context that you're giving to OpenAI, to make sure the model has enough knowledge about your teams and their areas of responsibility
  • Adjust the handling of AI failures to your needs

How to enhance this workflow

At n8n we use this workflow in combination with some others. E.g. we have the following things on top:

  • We're using an automation that enables everyone to add new bugs easily with the right data via a /bug command in Slack (check out this template if that's interesting to you)

This workflow was built using n8n version 1.30.0

Nodes used in this workflow

Over 3000 companies switch to n8n every single week

OpenAI supported actions

Create an Assistant
Create a new assistant
Delete an Assistant
Delete an assistant from the account
List Assistants
List assistants in the organization
Message an Assistant
Send messages to an assistant
Update an Assistant
Update an existing assistant
Message a Model
Create a completion with GPT 3, 4, etc.
Classify Text for Violations
Check whether content complies with usage policies
Analyze Image
Take in images and answer questions about them
Generate an Image
Creates an image from a text prompt
Generate Audio
Creates audio from a text prompt
Transcribe a Recording
Transcribes audio into the text
Translate a Recording
Translate audio into the text in the english language
Delete a File
Delete a file from the server
List Files
Returns a list of files that belong to the user's organization
Upload a File
Upload a file that can be used across various endpoints

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

Looking to integrate OpenAI and Slack in your company?

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