Skip to content

Instantly share code, notes, and snippets.

@aditya8Raj
Created November 18, 2025 10:18
Show Gist options
  • Select an option

  • Save aditya8Raj/24c7431c6a553e8e0a688e5eb8f3df16 to your computer and use it in GitHub Desktop.

Select an option

Save aditya8Raj/24c7431c6a553e8e0a688e5eb8f3df16 to your computer and use it in GitHub Desktop.
Discord → X (Twitter) Automation

Discord → X (Twitter) Automation Summary 🚀

This automation is built using n8n to instantly send selected Discord messages to X (Twitter). It ensures a smooth, automated posting flow without any manual effort.


🧩 How the Automation Works

1. Discord Message Webhook (Trigger)

  • A Webhook listens for incoming messages from your Discord bot.

  • Whenever a message is sent through the bot, the webhook captures:

    • The message content
    • The sender
    • Any additional data sent by the bot
  • This webhook acts as the entry point for the entire workflow.


2. Post to X (Twitter)

  • The captured message is passed to the Twitter node.
  • The text from body.content is used as the tweet's content.
  • The automation uses connected X OAuth2 credentials to post directly to the X account.

🔄 End-to-End Flow

Discord message → Webhook receives it → n8n formats it → Posted automatically to X


⚙️ What’s Configured

  • Webhook URL generated inside n8n.
  • Discord bot setup to send messages to this webhook.
  • X Account OAuth2 credentials connected to the workflow.
  • Workflow is active and runs instantly whenever a new message is sent.

Purpose

This workflow streamlines social media posting for a Discord Server, ensuring that selected Discord messages can be quickly and reliably published to X with zero manual effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment