Create Email Campaign

Create an email campaign

Options

Body
Values to create a campaign

Request body which must comply to the following JSON Schema:

{
  "required" : [ "name", "sender" ],
  "type" : "object",
  "properties" : {
    "tag" : {
      "type" : "string",
      "description" : "Tag of the campaign",
      "example" : "Newsletter"
    },
    "sender" : {
      "type" : "object",
      "properties" : {
        "name" : {
          "type" : "string",
          "description" : "Sender Name",
          "example" : "Mary from MyShop"
        },
        "email" : {
          "type" : "string",
          "description" : "Sender email",
          "format" : "email",
          "example" : "newsletter@myshop.com"
        },
        "id" : {
          "type" : "integer",
          "description" : "Select the sender for the campaign on the basis of sender id.\n_In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email)_.\n",
          "format" : "int64",
          "example" : 3
        }
      },
      "description" : "Sender details including id or email and name (_optional_). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example:\n**{\"name\":\"xyz\", \"email\":\"example@abc.com\"}**\n**{\"name\":\"xyz\", \"id\":123}**\n"
    },
    "name" : {
      "type" : "string",
      "description" : "Name of the campaign",
      "example" : "Newsletter - May 2017"
    },
    "htmlContent" : {
      "type" : "string",
      "description" : "Mandatory if htmlUrl and templateId are empty. Body of the message (HTML).\n",
      "example" : "<!DOCTYPE html> <html> <body> <h1>Confirm you email</h1> <p>Please confirm your email address by clicking on the link below</p> </body> </html>"
    },
    "htmlUrl" : {
      "type" : "string",
      "description" : "**Mandatory if htmlContent and templateId are empty**. Url to the message (HTML). For example:\n**https://html.domain.com**\n",
      "format" : "url",
      "example" : "https://html.domain.com"
    },
    "templateId" : {
      "type" : "integer",
      "description" : "**Mandatory if htmlContent and htmlUrl are empty**. Id of the transactional\nemail template with status _active_. Used to copy only its content fetched\nfrom htmlContent/htmlUrl to an email campaign for RSS feature.\n",
      "format" : "int64"
    },
    "scheduledAt" : {
      "type" : "string",
      "description" : "Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). **Prefer to pass your timezone in date-time format for accurate result**.\nIf sendAtBestTime is set to true, your campaign will be sent according to the date passed (ignoring the time part). For example:\n**2017-06-01T12:30:00+02:00**\n",
      "example" : "2017-06-01T12:30:00+02:00"
    },
    "subject" : {
      "type" : "string",
      "description" : "Subject of the campaign. **Mandatory if abTesting is false**.\nIgnored if abTesting is true.\n",
      "example" : "Discover the New Collection !"
    },
    "previewText" : {
      "type" : "string",
      "description" : "Preview text or preheader of the email campaign",
      "example" : "Thanks for your order!"
    },
    "replyTo" : {
      "type" : "string",
      "description" : "Email on which the campaign recipients will be able to reply to",
      "format" : "email",
      "example" : "support@myshop.com"
    },
    "toField" : {
      "type" : "string",
      "description" : "To personalize the **To** Field. If you want to include the first name and last name of your recipient, add **{FNAME} {LNAME}**. These contact attributes must already exist in your Brevo account. If input parameter **params** used please use **{{contact.FNAME}} {{contact.LNAME}}** for personalization\n",
      "example" : "{FNAME} {LNAME}"
    },
    "recipients" : {
      "type" : "object",
      "properties" : {
        "exclusionListIds" : {
          "type" : "array",
          "description" : "List ids to exclude from the campaign",
          "items" : {
            "type" : "integer",
            "format" : "int64",
            "example" : 8
          }
        },
        "listIds" : {
          "type" : "array",
          "description" : "**Mandatory if scheduledAt is not empty**. List Ids to send the campaign to\n",
          "items" : {
            "type" : "integer",
            "format" : "int64",
            "example" : 32
          }
        },
        "segmentIds" : {
          "type" : "array",
          "description" : "**Mandatory if listIds are not used**. Segment ids to send the campaign to.\n",
          "items" : {
            "type" : "integer",
            "format" : "int64",
            "example" : 23
          }
        }
      },
      "description" : "Segment ids and List ids to include/exclude from campaign"
    },
    "attachmentUrl" : {
      "type" : "string",
      "description" : "Absolute url of the attachment (no local file).\nExtension allowed:\n#### xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps\n",
      "format" : "url",
      "example" : "https://attachment.domain.com"
    },
    "inlineImageActivation" : {
      "type" : "boolean",
      "description" : "Use true to embedded the images in your email. Final size of\nthe email should be less than **4MB**. Campaigns with embedded images can\n_not be sent to more than 5000 contacts_\n",
      "example" : true,
      "default" : false
    },
    "mirrorActive" : {
      "type" : "boolean",
      "description" : "Use true to enable the mirror link",
      "example" : true
    },
    "footer" : {
      "type" : "string",
      "description" : "Footer of the email campaign",
      "example" : "[DEFAULT_FOOTER]"
    },
    "header" : {
      "type" : "string",
      "description" : "Header of the email campaign",
      "example" : "[DEFAULT_HEADER]"
    },
    "utmCampaign" : {
      "type" : "string",
      "description" : "Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed",
      "example" : "NL_05_2017"
    },
    "params" : {
      "type" : "object",
      "additionalProperties" : { },
      "description" : "Pass the set of attributes to customize the type classic campaign. For example: **{\"FNAME\":\"Joe\", \"LNAME\":\"Doe\"}**. Only available if **type** is **classic**. It's considered only if campaign is in _New Template Language format_. The New Template Language is dependent on the values of **subject, htmlContent/htmlUrl, sender.name & toField**\n",
      "example" : {
        "FNAME" : "Joe",
        "LNAME" : "Doe"
      }
    },
    "sendAtBestTime" : {
      "type" : "boolean",
      "description" : "Set this to true if you want to send your campaign at best time.",
      "example" : true,
      "default" : false
    },
    "abTesting" : {
      "type" : "boolean",
      "description" : "Status of A/B Test. abTesting = false means it is disabled & abTesting = true means it is enabled. **subjectA, subjectB, splitRule, winnerCriteria & winnerDelay** will be considered when abTesting is set to true.\nsubjectA & subjectB are mandatory together & subject if passed is ignored. **Can be set to true only if sendAtBestTime is false**.\nYou will be able to set up two subject lines for your campaign and send them to a random sample of your total recipients. Half of the test group will receive version A, and the other half will receive version B\n",
      "example" : true,
      "default" : false
    },
    "subjectA" : {
      "type" : "string",
      "description" : "Subject A of the campaign. **Mandatory if abTesting = true**.\nsubjectA & subjectB should have unique value\n",
      "example" : "Discover the New Collection!"
    },
    "subjectB" : {
      "type" : "string",
      "description" : "Subject B of the campaign. **Mandatory if abTesting = true**.\nsubjectA & subjectB should have unique value\n",
      "example" : "Want to discover the New Collection?"
    },
    "splitRule" : {
      "maximum" : 50.0,
      "minimum" : 1,
      "type" : "integer",
      "description" : "Add the size of your test groups. **Mandatory if abTesting = true & 'recipients' is passed**. We'll send version A and B to a random sample of recipients, and then the winning version to everyone else\n",
      "format" : "int64",
      "example" : 50
    },
    "winnerCriteria" : {
      "type" : "string",
      "description" : "Choose the metrics that will determinate the winning version. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerCriteria` is ignored if passed\n",
      "example" : "open",
      "enum" : [ "open", "click" ]
    },
    "winnerDelay" : {
      "maximum" : 168,
      "minimum" : 1,
      "type" : "integer",
      "description" : "Choose the duration of the test in hours. Maximum is 7 days, pass 24*7 = 168 hours. The winning version will be sent at the end of the test. **Mandatory if _splitRule_ >= 1 and < 50**. If splitRule = 50, `winnerDelay` is ignored if passed\n",
      "format" : "int64",
      "example" : 50
    },
    "ipWarmupEnable" : {
      "type" : "boolean",
      "description" : "**Available for dedicated ip clients**. Set this to true if you wish to warm up your ip.\n",
      "example" : true,
      "default" : false
    },
    "initialQuota" : {
      "type" : "integer",
      "description" : "**Mandatory if ipWarmupEnable is set to true**. Set an initial quota greater than 1 for warming up your ip. We recommend you set a value of 3000.\n",
      "format" : "int64",
      "example" : 3000
    },
    "increaseRate" : {
      "maximum" : 100.0,
      "minimum" : 0,
      "type" : "integer",
      "description" : "**Mandatory if ipWarmupEnable is set to true**. Set a percentage increase rate for warming up your ip. We recommend you set the increase rate to 30% per day. If you want to send the same number of emails every day, set the daily increase value to 0%.\n",
      "format" : "int64",
      "example" : 70
    },
    "unsubscriptionPageId" : {
      "type" : "string",
      "description" : "Enter an unsubscription page id. The page id is a 24 digit alphanumeric id that can be found in the URL when editing the page. If not entered, then the default unsubscription page will be used.\n",
      "example" : "62cbb7fabbe85021021aac52"
    },
    "updateFormId" : {
      "type" : "string",
      "description" : "**Mandatory if templateId is used containing the {{ update_profile }} tag**. Enter an update profile form id. The form id is a 24 digit alphanumeric id that can be found in the URL when editing the form. If not entered, then the default update profile form will be used.\n",
      "example" : "6313436b9ad40e23b371d095"
    }
  }
}
Result Format

Specify how the response should be mapped to the table output. The following formats are available:

Raw Response: Returns the raw response in a single row with the following columns:

  • body: Response body
  • status: HTTP status code

Input Ports

Icon
Configuration data.

Output Ports

Icon
Result of the request depending on the selected Result Format.
Icon
Configuration data (this is the same as the input port; it is provided as passthrough for sequentially chaining nodes to declutter your workflow connections).

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

  • No workflows found

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.