Insites Docs Developers guide NotificationsCreating an Email Notification

Creating an Email Notification

Last updated on June 26, 2024.

This guide discusses creating an Email Notification to send a welcome email to a newly signed-up user.

Prerequisites

To follow the steps in this tutorial, you must understand notifications. You are using the sign-up form you created in a previous tutorial.

Steps

Creating an Email Notification is a three-step process:

  • Step 1: Create an email notification
  • Step 2: Invoke notification directly via GraphQL 'email_send'
  • Step 3: Connect the notification to the sign-up form

Step 1: Create an email notification

app/emails/welcome_user.liquid

Step 2: Invoke notification directly via GraphQL 'email_send'

All parameters provided via GraphQL as the argument will be accessible in every Email Notification property as a variable (or to make it compatible with Form).

This is how you can prepare the HashObject for this mutation:

Step 3: Connect the notification to the sign-up form

Edit the file to associate this email with it. The email notification name is a file path relative to the directory without extension.

For app/emails/welcome_user.liquid - the part in bold is the name (physical_file_path).

Newly registered users will receive the email when they submit the form.

Please note: if you are working on a staging environment, you must also configure your test emails, as the platform supresses all emails on staging Instances to avoid spamming real users during tests.

Next Steps

Congratulations! You have created an Email Notification. Now you can learn about using email layouts: Using Email Layouts

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.