Gmail to Discord: the bot posts every new email to a channel

Forwarding Gmail to Discord in nana800 takes two blocks: gmail incoming email checks your Inbox once a minute, and Discord Request sends a message as your bot to a server channel. You need Gmail access, a bot token from the Discord Developer Portal and the channel ID, with no server of your own for the bot. Your balance is topped up to $3.50 for free every month, no card needed.

Build it in the builder

What you can automate

  • Send emails that reach the project mailbox to a moderators channel: member questions, complaints, partnership offers
  • Tell the dev team about app store emails on review and release of a version: from: with the store address in the trigger search
  • Announce on the server the emails of the platform members use to support the project: a new donation or subscription
  • Pick order emails for the #orders channel with subject:(order) in the search and leave the rest of the mail in Gmail
  • Send one email to two channels at once: two Discord Request blocks with different Channel IDs are connected to the trigger

How to set it up

  1. 1

    Create a bot and invite it to the server

    In the Discord Developer Portal create an application and copy the token in the Bot section. In the OAuth2 section build an invite link with the permission to send messages, open it and pick your server. Make sure the bot can see the channel and post in it.

  2. 2

    Copy the channel ID

    Turn on Developer Mode in the Discord settings, right-click the channel and choose Copy Channel ID. You get a long number. The channel name does not work in the Channel ID field, it needs this number.

  3. 3

    Connect Gmail

    Create a scheme with the gmail incoming email trigger: the Gmail address and the sign-in method, APP_PASSWORD_IMAP with a Google app password or OAUTH_CLIENT with a client ID, client secret and refresh token. In search query set which emails go to Discord, for example from:support@example.com, an empty field means every Inbox email.

  4. 4

    Set up Discord Request

    Add the block, choose the send_message operation, paste the token into Bot Token and the number from Copy Channel ID into Channel ID. In Message Content build the text from trigger fields: from is the sender, subject the subject, snippet the start of the email. The field is required, with an empty text the block returns an error.

  5. 5

    Turn the scheme on and check the channel

    The first check remembers the emails already in the Inbox, and they do not reach Discord. Send yourself a test email and wait for the next check. If no message appears, open the block result: success is false, and the Discord answer with its error code is in error_message. An enabled scheme costs $0.0042 per hour.

Pricing

A run of a Gmail block costs $0.002, a run of a Discord block costs $0.002. Every month the balance is topped up to $3.50 for free, an enabled scheme costs $0.0042 per hour.

Services in this connection

  • Gmail

    Start a scheme on every new Gmail email: send an alert to Telegram, save it to a spreadsheet or let an AI read it. No code, free balance every month.

  • Discord

    Send alerts, leads and news to a Discord channel without code: all it takes is a bot token, a channel ID and a text. Free balance every month, no card needed.

Similar integrations

  • Gmail + amoCRM

    An email with a lead in Gmail becomes an amoCRM deal by itself: ChatGPT pulls the client name, phone and email out of the text. No code, free balance every month.

  • Gmail + Google Sheets

    Every new Gmail email becomes a row in Google Sheets, with the sender, subject, date and start of the text in their own columns. Free balance monthly, no card needed.

  • Gmail + Notion

    Every new Gmail email becomes a row in a Notion database: subject as the title, sender and date in columns, the text on the row page. No code, free balance monthly.

  • Gmail + OpenAI (ChatGPT)

    ChatGPT reads every new Gmail email: writes a summary, sets a category or drafts a reply and sends the result to Telegram or a sheet. No code, free balance monthly.

  • Gmail + Slack

    Every new Gmail email arrives as a message in a Slack channel, with the sender, subject and start of the text. Gmail search filter, no code, free balance monthly.

  • Gmail + Telegram

    Get new Gmail emails as Telegram messages: sender, subject and text in your private chat or a team group. Free balance every month, no card needed.

Frequently asked questions

One email costs four basic block runs: two for the Gmail trigger and two for Discord Request, and 1,000 runs cost $1. If Discord rejects the message, the block run is not charged, and emails that do not match the search do not start the scheme. Add $0.0042 for every hour the scheme is on: when it runs nonstop, these hours take the largest part of the free $3.50 a month.

Check error_message: it holds the Discord answer and its code. Most often the bot is not on the server, cannot see the channel or cannot post in it, or Channel ID holds the name instead of the number. The get_channel operation of the same block helps check the ID: it returns the channel data, such as its name, or the same error. If there is no run at all, the email did not match the Gmail search or is not in the Inbox.

The whole text is in the body_text field, but for a long email with a signature and quoted earlier messages it may not go through: if Discord rejects the message, the reason is in error_message and the run is not charged. snippet is safer, a short start of the email in one line. Emails that only have an HTML version, such as newsletters, can have an empty body_text while snippet is filled.

Yes. Each Discord Request block posts to one channel, so connect as many blocks to the trigger as you need channels, each with its own Channel ID. One email runs all of them, and every block adds two basic runs. To send emails on different topics to different channels, put the free condition block in front of them.

The trigger starts the scheme for at most 300 emails a minute, and the rest go to Discord on the next checks. When Discord answers that messages come too often, the block waits up to 20 seconds and sends again, at most twice. A send cut off by a network failure is not repeated, so the channel does not get a double post. Emails that arrived more than three days ago, for example while the scheme was off, do not reach the channel.

Build your first scheme for free

Sign-up is free and needs no card. Every month the balance is topped up to $3.50 for free, enough for about 3,500 runs of basic blocks.

Build it in the builder