Build a Discord AI assistant that can read unread Gmail messages, draft replies, and send new emails through a Hexabot workflow.
This repository accompanies the YouTube tutorial: https://www.youtube.com/watch?v=FKrzVK1fqK4
- Node.js
20.19+ - npm
- A Discord application and bot token
- A Google Cloud OAuth client with the Gmail API enabled
- An AI model provider credential for the workflow
git clone <repo-url>
cd discord-gmail-assistant-example
npm install
cp .env.example .envStart Hexabot:
npm run devOpen the admin UI:
http://localhost:3000
The default local admin account from .env.example is:
admin@admin.admin
adminadmin
- Create an app in the Discord Developer Portal.
- Add a bot and enable
Message Content Intent. - Invite the bot to your Discord server.
- In Hexabot Admin, configure the Discord channel/source with your bot token.
After the app is running, import the workflow from the frontend visual editor:
- Open
http://localhost:3000. - Go to the workflow visual editor.
- Import
workflows/discord-gmail.workflow.yml. - Review the model and Gmail action settings.
- Save and activate the workflow.
When a Discord user first asks the bot to use Gmail, Hexabot will return a Google sign-in button. Sign in once, then continue using the assistant from Discord.
- Tutorial video: https://www.youtube.com/watch?v=FKrzVK1fqK4
- Hexabot website: https://hexabot.ai/
- Hexabot docs: https://docs.hexabot.ai/
- Hexabot GitHub: https://github.com/hexabot-ai/Hexabot
- Hexabot Discord: https://discord.gg/hexabot