← Mailgun

Create Mailing List Member with Mailgun API

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

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
Create Mailing List Member 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 Create Mailing List Member with the Mailgun API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the Create Mailing List Member action
    1. Connect your Mailgun account
    2. Select a Mailing List
    3. Configure Email Address
    4. Optional- Configure Name
    5. Optional- Configure Vars
    6. Select a Subscribed?
    7. Select a Update if exists?
    8. 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.

Create Mailing List Member on Mailgun
Description:Add to an existing mailing list. [See the docs here](https://documentation.mailgun.com/en/latest/api-mailinglists.html#mailing-lists)


import mailgun from "../../mailgun.app.mjs";
import common from "../common.mjs";

export default {
  key: "mailgun-create-mailinglist-member",
  name: "Create Mailing List Member",
  description: "Add to an existing mailing list. [See the docs here](https://documentation.mailgun.com/en/latest/api-mailinglists.html#mailing-lists)",
  version: "0.0.2",
  type: "action",
  props: {
    list: {
      propDefinition: [
    address: {
      propDefinition: [
    /* eslint-disable pipedream/default-value-required-for-optional-props */
    name: {
      propDefinition: [
      optional: true,
    vars: {
      propDefinition: [
      optional: true,
    /* eslint-enable pipedream/default-value-required-for-optional-props */
    subscribed: {
      propDefinition: [
      description: "If `no`, will add unsubscribed",
      default: "yes",
    upsert: {
      propDefinition: [
  async run({ $ }) {
    const resp = await this.withErrorHandler(this.mailgun.createMailinglistMember, {
      address: this.address,
      name: this.name,
      subscribed: this.subscribed,
      upsert: this.upsert,
      vars: this.vars,
      list: this.list,
    $.export("$summary", `Successfully added ${this.address} to list`);
    return resp;


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.
Mailing ListliststringSelect a value from the drop down menu.
Email Addressaddressstring

Extra arbitrary list member data

Subscribed?subscribedstringSelect a value from the drop down menu:truefalse
Update if exists?upsertstringSelect a value from the drop down menu:yesno
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