🎉 Pipedream raises $20M Series A 🎉
Read the blog post and TC Techcrunch article.
← Discord + Mailgun integrations

Verify Email with Mailgun APIon New Message from Discord API

Pipedream makes it easy to connect APIs for Mailgun, Discord and 700+ other apps remarkably fast.

Trigger workflow on
New Message from the Discord API
Next, do this
Verify Email with the Mailgun API
No credit card required
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

This integration creates a workflow with a Discord trigger and Mailgun action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Message trigger
    1. Connect your Discord account
    2. Configure Channels
    3. Configure discordApphook
    4. Configure Ignore myself
  3. Configure the Verify Email action
    1. Connect your Mailgun account
    2. Configure Email Address
    3. Optional- Select one or more Acceptable Risk Levels
    4. Configure Halt on error?
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger


This integration uses pre-built, open source components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.


Description:Emit an event for each message posted to one or more channels in a Discord server

Trigger Code

const discord = require("../../discord-v2.app.js")

module.exports = {
  key: "discord-new-message",
  name: 'New Message',
  description: "Emit an event for each message posted to one or more channels in a Discord server",
  version: '0.0.2',
  dedupe: "unique",
  props: {
    channels: {
      type: "$.discord.channel[]",
      appProp: "discord",
      label: "Channels",
      description: "Select the channel(s) you'd like to be notified for",
    discordApphook: {
      type: "$.interface.apphook",
      appProp: "discord",
      async eventNames() {
        return this.channels || []
    ignoreMyself: {
      type: "boolean",
      label: "Ignore myself",
      description: "Ignore messages from me",
      default: true,
  async run(event) {
    if (event.guildID != this.discord.$auth.guild_id) {
    if (this.ignoreMyself && event.authorID == this.discord.$auth.oauth_uid) {
    this.$emit(event, { id: event.id })

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
DiscorddiscordappThis component uses the Discord app.

Select the channel(s) you'd like to be notified for

Ignore myselfignoreMyselfboolean

Ignore messages from me

Trigger Authentication

Discord uses OAuth authentication. When you connect your Discord account, Pipedream will open a popup window where you can sign into Discord and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Discord API.

Pipedream requests the following authorization scopes when you connect your account:


About Discord

Use this app to create a Discord source that emits messages from your guild to a Pipedream workflow.


Description:Verify email address deliverability with Mailgun.

Action Code

const mailgun = require("../../mailgun.app.js");
const {
} = require("../common");

module.exports = {
  key: "mailgun-verify-email",
  name: "Verify Email",
  description: "Verify email address deliverability with Mailgun.",
  version: "0.0.2",
  type: "action",
  props: {
    email: {
      propDefinition: [
    acceptableRiskLevels: {
      propDefinition: [
  methods: {
  async run({ $ }) {
    const verifyEmail = async function (mailgun, opts) {
      const result = await mailgun.api("request").get("/v4/address/validate", {
        address: opts.address,
      if (
        opts.acceptableRiskLevels.length > 0
        && !opts.acceptableRiskLevels.includes(result.body.risk)
      ) {
        return $.flow.exit(`${result.body.risk} risk`);
      return result.body;
    return await this.withErrorHandler(verifyEmail, {
      acceptableRiskLevels: this.acceptableRiskLevels,
      address: this.email,

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

MailgunmailgunappThis component uses the Mailgun app.
Email Addressemailstring
Acceptable Risk LevelsacceptableRiskLevelsstring[]Select a value from the drop down menu:highmediumlowunknown
Halt on error?haltOnErrorboolean

Action Authentication

Mailgun uses API keys for authentication. When you connect your Mailgun account, Pipedream securely stores the keys so you can easily authenticate to Mailgun APIs in both code and no-code steps.

Get your API Key in the Control Panel, specifically in Settings > API Keys. More info in docs.

If your Mailgun account resides in the EU, choose the EU option in the Region field. Otherwise, choose the US (non-EU) region.

About Mailgun

Sending, receiving and tracking email effortlessly

More Ways to Connect Mailgun + Discord

About Pipedream

Stop writing boilerplate code, struggling with authentication and managing infrastructure. Start connecting APIs with code-level control when you need it — and no code when you don't.

Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
"The past few weeks, I truly feel like the clichéd 10x engineer."