n8n

How to Automate Discord Customer Support?

Give your Discord community fast answers with an AI helper. Questions from users turn into clear replies that match the user’s language, and the bot remembers each person’s past messages. Great for support channels, gaming servers, and busy teams.

A webhook receives a POST from your Discord bot with the userId, userName, and question. The flow sends the text to a Google Gemini chat model and keeps a short memory window per user so replies stay on topic across messages. An agent shapes the response using system rules, and a code step cleans the output. The workflow returns the final text through the webhook so your bot can post it back in Discord.

You will need a Discord bot that can call an HTTP endpoint and a Google Gemini API key. Expect lower wait times and fewer repeat replies for the team. This is useful for FAQs, pre sales chats, and out of hours help. It is simple to set up and easy to maintain once running.

What are the key features?

  • Webhook POST entry that receives userId, userName, and question
  • Google Gemini chat model generates fast, language aware replies
  • Simple Memory keeps per user context with a custom session key
  • Agent shapes answers using a system message and user details
  • Code step formats the AI output for clean delivery
  • Respond to Webhook returns the final answer to your bot instantly

What are the benefits?

  • Reduce first response time from minutes to seconds
  • Automate about 70 percent of repeat questions
  • Handle up to five times more inquiries without extra staff
  • Keep context per user across 50 turns for clearer answers
  • Connect Discord and Google Gemini in one simple flow

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Discord and Google Gemini. See the Tools Required section above for links to create accounts with these services.
  3. Open the Webhook node in n8n and copy the Test URL and Production URL. Leave the method as POST and keep response mode set to respond from a later node.
  4. In the Discord Developer Portal, create an application and add a bot to your server. Configure your bot or relay script to send an HTTP POST to the n8n Webhook URL when a user posts in the target channel.
  5. Make sure your bot sends JSON with fields body.userId, body.userName, and body.question so the memory and agent nodes receive the right values.
  6. Double click the Google Gemini Chat Model node. In the credential dropdown, click Create new credential, then follow the on screen steps. Create an API key in your Google account’s AI page and paste it into the credential.
  7. Confirm the model is set to Gemini 2.0 Flash in the Google Gemini node. Save the node settings.
  8. Open the Simple Memory node and confirm the session key expression uses body.userId. If your payload uses a different field, update the expression.
  9. Run a test: send a sample POST to the Webhook Test URL with a JSON body that includes userId, userName, and question. You should see a text answer in the response.
  10. Switch the Webhook node to Production URL and update your Discord bot to call the Production URL. Activate the workflow.
  11. Troubleshoot common issues: if you get empty replies, check the Code node output field name matches what Respond to Webhook expects. If you see errors, verify the JSON field names and confirm your Google Gemini credential is valid.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Discord

Sign up

Free: $0 / mo (no API usage fees; standard rate limits apply)

Google Gemini

Sign up

Free tier: $0 via Gemini API; e.g., Gemini 2.5 Flash-Lite free limits 1,000 requests/day (15 RPM, 250k TPM). Paid from $0.10/1M input tokens and $0.40/1M output tokens.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.