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

Verify Email with Mailgun API

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

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
Verify Email with the Mailgun API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
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

Create a workflow to Verify Email with the Mailgun API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. 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?
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger


This is a pre-built, open source component from Pipedream's GitHub repo. The component is 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.

Verify Email on Mailgun
Description:Verify email address deliverability with Mailgun.


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,


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.
MailgunmailgunappThis component uses the Mailgun app.
Email Addressemailstring
Acceptable Risk LevelsacceptableRiskLevelsstring[]Select a value from the drop down menu:highmediumlowunknown
Halt on error?haltOnErrorboolean


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