Insites Docs Developers guide NotificationsAdding attachments to an email notification

Adding attachments to an email notification

Last updated on August 03, 2024.

This guide discusses how to attach files to an email notification.

Prerequisites

To understand this tutorial, it is necessary to understand the concept of email notifications. You are using the email notification created in a previous tutorial: Creating an Email Notification

Steps

Attaching a file to an Email Notification is a one-step process:

  • Step 1: Include the 'attachments' JSON file in the Email Notification

Step 1: Include the 'attachments' JSON file in the Email Notification

Add the JSON to the Email Notification created in a previous tutorial:

app/emails/welcome_user.liquid

Now, the attachment will be included when you send an email.

You can use in the field, as long as it evaluates to valid JSON. The expected JSON is in the following format:

You can also mark any attachment's as .
Inline attachment means that some types of files will be displayed inside the email content by some email clients.
By default, attachments have set to , which means they are only available for download to email clients.

Note

You can include up to 9 attachments. Note that the total size must not exceed 20MB.

Next Steps

Congratulations! You have sent an Email Notification with an attachment. Now you can learn about creating an SMS Notification: Creating an SMS Notification

Have a suggestion for this page?

Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.