FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
project logo
charmaineDiscord-to-Linear
Discord -> Linear ticket based on emoji reaction trigger
Public
Like
2
Discord-to-Linear
Home
Code
3
backend
3
README.md
C
main.tsx
Branches
1
Pull requests
Remixes
2
History
Environment variables
5
Settings
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
6/5/2025
README.md

Discord Reaction to Linear Ticket Automation

How it works: React to any Discord message with a configured emoji (like :huss: or 🧿 - used as an example in this val) and it automatically becomes a Linear ticket with context from the Discord thread.

Team members can use custom emojis to identify themselves as the ticket creator.

There are 2 set up steps!

  1. Environment Variables
  2. Setting up the Discord bot

1. Environment Variables

Before you can run this cron, you must add the following Environment Variables (via left sidebar of this val):

  • DISCORD_BOT_TOKEN: Your Discord bot token
    • Go to Discord Developer Portal → Create application → Complete the steps → Go to Bot on the sidebar → Copy token (or Reset Token and then Copy if you didn't copy it the first time)
    • Important: Enable "Message Content Intent" in Bot → Privileged Gateway Intents
  • DISCORD_SERVER_ID: Your Discord server ID (right-click server name → Copy ID)
  • DISCORD_MONITORED_CHANNELS: Comma-separated channel IDs to monitor (right-click channel → Copy ID)
    • Example: 1327384540187983926,1327384540187983927
  • LINEAR_API_KEY: Your Linear API key
    • For Linear Teams accounts, you need API key permissions from a workspace admin.
      • Members can create personal API keys from Settings → Account → Security & Access.
  • LINEAR_TEAM_ID: Your Linear team UUID, this is NOT the 3 letter Team Identifier found in issue IDs
    • On any Linear page, type CMD+K to pull up the quick menu + enter Dev: Copy model UUID to copy your UUID
    • Example: 6312a2a0-633b-47dc-a225-81d5d1759bf4

2. Discord Bot Setup

  1. Create bot: Discord Developer Portal → New Application → Bot
  2. Set permissions: OAuth2 → URL Generator → selecting bot unfurls a Bot Permissions dropdown below → Select View Channels, Read Message History, Add Reactions
  3. Enable intents: Bot → Privileged Gateway Intents → ✅ Message Content Intent
  4. Invite bot: Use generated URL to add bot to your server

How to Use

  • main.tsx - Main cron job that runs every minute checking for new reactions, you can also manually press Run to run it immediately
  • Emoji Configuration - Edit backend/config.ts to customize team member emojis:
TARGET_EMOJIS: { "huss": "Huss", // Custom Discord emoji :huss:, use just the name without colons (e.g., `"huss"` for `:huss:`) "nas": "Nas", // Custom Discord emoji :nas: "🧿": "Team", // Unicode built-in emoji, use the actual emoji (e.g., `"🧿"`) }
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.