As a marketer, you know the struggle: tasks, content ideas, and deadlines often get buried within Discord. One moment you’re discussing campaign ideas, and the next moment they vanish under an avalanche of GIFs, memes, or unrelated messages. The constant back and forth can lead to lost opportunities and forgotten tasks.
To combat this issue, I decided to build a simple yet powerful solution that integrates task management directly into Discord using a slash command. The result? A custom /task
command that allows anyone in your Discord server to seamlessly send tasks to ClickUp. No more hunting through endless chat logs—now, all tasks go straight to your ClickUp workspace with the ease of typing a single command.
/task TaskName TaskDescription
In this blog post, I’ll walk you through how to set up the Discord bot using Cloudflare Workers which can can handle a combined 100,000 requests per day for free to automatically send tasks from Discord to ClickUp.
Why Integrate Discord with ClickUp?
ClickUp is a fantastic project management tool that helps you organize and manage tasks, teams, and projects. However, it doesn’t integrate with Discord out of the box. Discord, on the other hand, is widely used for communication, especially in remote teams or among marketers and creatives who thrive on quick collaboration.
Here’s why combining Discord and ClickUp using a slash command can save your team time and effort:
- No more copy-pasting tasks from chats: Automatically create tasks without leaving Discord.
- Reduced task loss: Convert important discussions into actionable items before they’re forgotten.
- Seamless team collaboration: Everyone on the team can easily contribute to project management in real time.
- No flooding the chat: The bot only talks to the user creating the task, so it won’t fill up Discord with created task messages
Tools You’ll Need
- Cloudflare Workers: Cloudflare Workers allow you to deploy serverless code that can be triggered by HTTP requests. Perfect for lightweight integrations like this one.
- ClickUp API: The ClickUp API enables programmatic task creation within your ClickUp workspace.
- Discord Developer Portal: You’ll need to create a bot in Discord that can respond to slash commands.
Step 1: Create a Discord Bot
Before you start, the first thing you’ll need to do is create a Discord bot. Here’s how:
Go to the Discord Developer Portal
Head over to Discord Developer Portal and log in.
Create a new application
Click on “New Application” and give your bot a name (e.g., “TaskBot”).
Adjust installation method
This bot only needs to be installed via servers, so you can uncheck User Install via Installation -> Installation Contexts.
Install Link
Set Installation -> Install Link to none, as you will be using the OAuth2 section to create a url to install the bot on your server.
Don’t make the bot public
Set the bot to private under Bot -> Public Bot, otherwise anyone could add your bot to their server and start adding tasks into your ClickUp.
Step 2: Setup a CloudFlare Worker
Now we need to create the worker that will handle processing the data from Discord and passing it into Clickup.
Create a Worker
On your CloudFlare dashboard navigate to Workers & Pages and click “Create”. On the next page click “Create Worker”. Name your worker. If you have multiple Discord servers to set up, it may be best to name the worker based on the Discord server name. Don’t worry about the code for now, we’ll add it in a moment, but for now, click “Deploy”.
Add worker.js code
After you deploy, you’ll see an “Edit Code” button. Go ahead and click this.
Update worker.js
Replace the code within worker.js with the code from our Discord to ClickUp Bot Repository within workers.js.
Configure Variables and Secrets
Our CloudFlare Worker will need some secrets setup so that it can function properly. Go ahead and grab this info and set it up under Workers & Pages -> Worker Name -> Settings -> Variables and Secrets -> Add.
ClickUp Variables and Secrets
Here’s how you can obtain variables and secrets on the ClickUp side. Make sure you are within the Work Space that you want to be able to add tasks in.
CLICKUP_API_TOKEN
On the clickup dashboard via the website, click your profile in the top right -> Settings -> Apps -> API Token -> Generate.
CLICKUP_ASSIGNEE
On the clickup dashboard via the website, click your profile in the top right -> Settings -> People-> Find the assignee you want, click the three dots, and click “Copy member ID”.
CLICKUP_LIST_ID
On the Work Space dashboard, find the list you want to have Discord post into. Click the 3 dots and copy link. It should look something like this:
https://app.clickup.com/0000000000/v/li/000000000000
The bolded numbers are your list ID.
Discord Variables and Secrets
Now you’ll need to get the variables and secrets for the Discord Bot.
DISCORD_PUBLIC_KEY
On your Discord TaskBot Application navigate to General Information -> Public Key
Step 3: Link the Discord bot to the CloudFlare Worker
Under General Information in the Discord TaskBot Application you’ll see an input for “Interactions Endpoint Url”. Add your CloudFlare Worker here.
If you get “interactions_endpoint_url”, then your Variables and Secrets may not have saved or your DISCORD_PUBLIC_KEY is incorrect.
Step 4: Register /task command
Next we need register the /task command so the Discord bot recognizes it.
You’ll need to do a POST call to Discord’s API:
https://discord.com/api/v10/applications/{application_id}/guilds/{guild_id}/commands
You can find your guild_id by clicking your server name in Discord -> Server Settings -> Widget -> Server ID. If you do not see Server ID, you may need to enable Developer Mode in User Settings -> Advanced -> Developer Mode.
Application ID is under General Information within the Discord TaskBot Application.
Use the below for the body:
{
"name": "task",
"description": "Creates a task",
"options": [
{
"name": "title",
"description": "What's the task?",
"type": 3,
"required": true
},
{
"name": "description",
"description": "What's the description of the task?",
"type": 3,
"required": false
}
]
}
For the Authorization header use Bot -> Token:
Bot YOURDISCORDBOTTOKEN
Step 5: Add the bot to your server
Replace client_id in the below link with the one found in OAuth2 and visit the link:
https://discord.com/oauth2/authorize?client_id={client_id}&scope=bot&permissions=67584
Step 6: Test it out!
Now all that’s left to do is to test to make sure it’s working. Go to one of your text channels in type /task. Fill out the Title (required) and tab over to Description if you want it to have one and press enter.
All Done
Once you submit the task, you should get a response back from the TaskBot that only you can see to indicate if it was successful or not.
Leave a Reply