Job Runner

Send E-mail with Attachments using SendGrid

Summary

Send e-mail using Web API of SendGrid.

How to Use

To use this Do, you need to issue an API key with your SendGrid account. Grant the API key the Mail Send permission.

Specify the files attached to the email in the record and attachment file field. All files included in the specified record × attachment file field will be directly attached to the email.

To send an email without attaching a file, use “Send E-mail using SendGrid”.

Parameter

Set SendGrid API Key, To (recipient), From (sender), Subject, Body, Kintone API Token, Record with Attachment, and Attachment.

SendGrid API Key

Specify the API key created by SendGrid. Mail Send permission is required.

To (Recipient)

Specify the recipient of the email. The following formats are available:

  • One email address
  • Array of email addresses
  • The result obtained by setting the information to be obtained to all in “Get User Profile”.

They can be specified in the expression, so if the link field contains an email address, it can also be defined as follows:

= Link

Please note that the values of the user selection field cannot be specified. To send an email to the user selected in the user selection field, first get the email address with “Get User Profile”.

If there are no recipients, an error will occur.

From (Sender)

Specify the sender’s email address. Specify with one email address. When specified in array format, only the first element is used, and the subsequent elements are ignored.

You cannot leave it blank.

Subject

Specify the subject of the email. You cannot leave it unspecified.

Body

Specify the body of the email. You cannot leave it blank.

API Token

Specify the API token of the source app for “Record with Attachment.”

This API token requires record viewing permissions.

Record with Attachment

Specify the records obtained in advance.

If there are multiple records, files will be collected from all records to be attached.

If there are no records, no error will occur. In this case, the email will be sent without attachments.

Attachment

Select the attachment field from “Record with Attachment.”

If multiple files are attached in an attachment field, all files will be attached to the email.

If no files are in the attachment field, no error will occur.

Restrictions

  • HTML format emails cannot be sent.

  • If the total size of the files attached in the attachment field exceeds 10MB, an error will occur.

    • This 10MB is not the size of the email but the limit for the attachment file size in Kintone. In addition to this limit, the maximum email size, including the body, is checked according to SendGrid’s specifications.
  • The limits on the size of emails that can be sent, the number of recipients, and so on, are in accordance with SendGrid’s specifications.

  • You cannot check whether the email has actually arrived with Customine. You can check on the SendGrid screen.

  • Email open tracking and tracking of attachment downloads are not possible.