Email component with credentials

Description

This email component is designed for use with the Mailchimp Transactional API.

Credentials

To utilize this component, you must create a Mailchimp account and generate an API key that will serve as part of the credentials for the Mandrill application.

After you have your API key, complete the following fields in the component’s credential section:

Mandrill API key

Your key from the Mandrill application settings.

A required string.

Mandrill API URL

The URL for the API.

https://mandrillapp.com/api/1.0 by default.

An optional string.

From email

The sender’s email address.

A required string.

From name

The sender’s name.

A required string.

Actions

Send email

For each incoming message, the component will send a new transactional message through Mandrill using the Send new message API resource.

Configuration fields

Do not throw an error when email send failed

If selected, the component will not throw an error when sending failed.

Details will be provided in the output message.

A required checkbox.

Input metadata

To

The email address(es) for primary recipients.

You can fill a comma-separated list.

A required string.

Cc

A comma-separated list of email addresses to also receive a copy of the mail.

An optional string.

Bcc

A comma-separated list of email addresses to receive a blind copy of the mail.

An optional string.

Subject

The email Subject.

A required string.

Text body

The content of the email to be sent as plain text.

The Text body will be stringified if it is a JavaScript Object Notation object or array.

The Text body field is for email clients that do not render HTML.

An optional string but required if the HTML body field is empty.

HTML body

The HTML content of the email to be sent.

An optional string but required if the Text body field is empty.

At least one of the two related fields — Text body and HTML body — must be filled in.

If only the Text body field is filled in, the email presents as plain text on all email clients.

If only the HTML body is filled in, text-only email clients display an error.

If both are filled in, the HTML body is displayed in email clients that render HTML, and Text body is displayed in text-only email clients.

Including both HTML and plain-text versions of an email’s body is best practice.

Attachments

A series of objects with the following format:

An optional array.

Attachment URL

URL to file (platform storage or external).

A required string.

Filename

Name of the attached file that will appear in the received email.

A required string.

An HTML body example

{
  "to": "email@example.com",
  "subject": "HTML content",
  "textBody": "Poor text content",
  "htmlBody": "<head>
 <meta charset=\"UTF-8\">
 <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
 <title>Sample Email</title>
 <style>
 body {
 font-family: Arial, sans-serif;
 background-color: #f4f4f4;
 margin: 0;
 padding: 20px;
 }
 .container {
 background-color: #ffffff;
 padding: 20px;
 border-radius: 5px;
 box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
 }
 .btn {
 display: inline-block;
 padding: 10px 15px;
 font-size: 16px;
 color: white;
 background-color: #007BFF;
 text-decoration: none;
 border-radius: 5px;
 }
 .btn:hover {
 background-color: #0056b3;
 }
 </style>
 </head>
 <body>
 <div class=\"container\">
 <h1>Hello, [Recipient's Name]!</h1>
 <p>Thank you for subscribing to our newsletter. We are excited to have you on board!</p>
 <p>Stay tuned for updates, tips, and exclusive offers just for you.</p>
 <p>To get started, click the button below:</p>
 <a href=\"https://www.example.com\" class=\"btn\">Get Started</a>
 <p>Best regards,<br>Your Company Name</p>
 </div>
 </body>
 </html>"
}

Output metadata

As a result of sending, you will get object results which contain result entities of sending messages for each recipient. It consists of:

To

A string. The email address of the recipient.

RecipientType

A string. Type of recipient. Possible values: to, cc, bcc.

Message

A string. The sending status of the recipient. Possible values:

Successful

OK, QUEUED

Unsuccessful

REJECTED, INVALID

MessageID

A string. The message’s unique identifier.

SubmittedAt

A string. The date the message was submitted in the format; YYYY-MM-DDTHH:mm:ss.SSSSSSSZ.

ErrorCode

A number. Deprecated parameter, always 0.