Add a bug to Linear via Slack command
Go to WorkflowDescription
Use Case
When building a product it's important to discover and eliminate bugs as quickly as possible. Since we're using our product at n8n a lot, we wanted to make it as easy as possible for everyone to add bugs with the needed level of detail. That's why we built this workflow that allows everyone to add bugs to our Linear account easily directly from Slack
What this workflow does
This workflow waits for a webhook call within Slack, that gets fired when users use the /bug command on a bot that you will create as part of this template. It then adds the bug to Linear using a pre-defined description and a defined label. It then notifies the user about the newly added bug as you can see below:
How to create your Slack bot
Visit https://api.slack.com/apps, click on New App and choose a name and workspace.
Click on OAuth & Permissions and scroll down to Scopes -> Bot token Scopes
Add the chat:write scope
Head over to Slash Commands and click on Create New Command
Use /bug as the command
Copy the test URL from the Webhook node into Request URL
Add whatever feels best to the description and usage hint
Go to Install app and click install
Setup
Configure your Slack bot using the sticky to the left
Fill the Set me up node. You can find the IDs easily using the Helper nodes section
Make sure to exchange the Request URL in your Slack with the Prod URL of the Webhook node before activating this workflow
How to adjust it to your needs
Add zero, one, two or many labels when creating the new ticket
Change the Slack message according to your needs
Change the default description for a new bug ticket
Rename the Slack command as it works best for you
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 AI to classify the bugs and move them to the right team as soon as they get added to Linear (see this template)
We also added other commands like /pain and /idea that allow us to submit other things to Notion. You can see the workflow for that here.