# Automate emailing invoices

This topic describes common Rebilly invoice email automations.
For a complete list of automation options, and how to configure them, see [Events](/docs/automations/event-types).

To send emails, you must configure at least one email address.
For more information, see [Add an email address](/docs/settings/email-delivery-settings#add-an-email-address).

## Send an invoice when it is issued

This process describes how to send the customer an invoice by email when it is issued.

1. In the left navigation bar, press .
2. In the **Data and alerts** section, press **Email notifications**.
3. In the **Event-based notifications** section, press **Billing events**.
4. Press the **Invoice issued** event.
5. Press **Create email notification**.
6. In the **Notification name** field, enter a unique name for the email notification.
7. In the **Labels** field, enter one or more labels to help categorize the email notification.
8. Optionally, to specify additional conditions on when the email is sent  1. In the **Conditions** section, clear the **No conditions** checkbox.
  2. In the **Select filter** dropdown, select a filter.
  3. In the next field, select an operation.
  4. In the next field, enter or select values.
  5. Optionally, to add another filter, press **Add filter**.
9. In the **Emails** section, press **Add email**.
10. In the **Title** field, enter a name.
This name is referenced in reports.
11. In the **From** field, select your email address.
If your address is not listed, press **Add email address**. 
To add an email address to email delivery settings, see [Add an email address](/docs/settings/email-delivery-settings#add-an-email-address).
12. In the **To** field, select a placeholder or enter an email address:
  - To send to the customer's primary email, select `{{invoice.customer.primaryAddress.emails.0.value}}`.
  - To send to the customer's notification email, select `{{customer.notificationEmails}}`. 
For more information, see [Manage notification emails](/docs/data-tables/manage-customer-information#manage-notification-emails).
13. In the **Subject** field, enter `New invoice issued`.
14. In the **Email content** field, compose your email. 
Press **Add placeholders**, to add dynamic content such as a payment link and customer information.
15. Select the **Attach invoice** checkbox.
16. Press **Save notification**.


## Send an upcoming renewal notification

This process describes how to send a customer an invoice by email in advance of the renewal date.

To use this automation, you must have a pricing plan with recurring settings, and invoice time shift must be active.
For more information, see [Create a product and pricing plan](/docs/settings/products-and-pricing).

1. In the left navigation bar, press .
2. In the **Data and alerts** section, press **Email notifications**.
3. In the **Event-based notifications** section, press **Billing events**.
4. Press the **Renewal invoice issued** event.
5. Press **Create email notification**.
6. In the **Notification name** field, enter a unique name for the email notification.
7. In the **Labels** field, enter one or more labels to help categorize the email notification.
8. Optionally, to specify additional conditions on when the email is sent  1. In the **Conditions** section, clear the **No conditions** checkbox.
  2. In the **Select filter** dropdown, select a filter.
  3. In the next field, select an operation.
  4. In the next field, enter or select values.
  5. Optionally, to add another filter, press **Add filter**.
9. In the **Emails** section, press **Add email**.
10. In the **Title** field, enter a name.
This name is referenced in reports.
11. In the **From** field, select your email address.
If your address is not listed, press **Add email address**. 
To add an email address to email delivery settings, see [Add an email address](/docs/settings/email-delivery-settings#add-an-email-address).
12. In the **To** field, select a placeholder or enter an email address:
  - To send to the customer's primary email, select `{{invoice.customer.primaryAddress.emails.0.value}}`.
  - To send to the customer's notification email, select `{{customer.notificationEmails}}`. 
For more information, see [Manage notification emails](/docs/data-tables/manage-customer-information#manage-notification-emails).
13. In the **Subject** field, enter `New invoice issued`.
14. In the **Email content** field, compose your email.
Press **Add placeholders**, to add dynamic content such as a payment link and customer information.
15. Select the **Attach invoice** checkbox.
16. Press **Save notification**.


## Send a paid invoice notification

This process describes how to send the customer an email when an invoice is paid.

1. In the left navigation bar, press .
2. In the **Data and alerts** section, press **Email notifications**.
3. In the **Event-based notifications** section, press **Billing events**.
4. Press the **Invoice paid** event.
5. Press **Create email notification**.
6. In the **Notification name** field, enter a unique name for the email notification.
7. In the **Labels** field, enter one or more labels to help categorize the email notification.
8. Optionally, to specify additional conditions on when the email is sent  1. In the **Conditions** section, clear the **No conditions** checkbox.
  2. In the **Select filter** dropdown, select a filter.
  3. In the next field, select an operation.
  4. In the next field, enter or select values.
  5. Optionally, to add another filter, press **Add filter**.
9. In the **Emails** section, press **Add email**.
10. In the **Title** field, enter a name.
This name is referenced in reports.
11. In the **From** field, select your email address.
If your address is not listed, press **Add email address**. 
To add an email address to email delivery settings, see [Add an email address](/docs/settings/email-delivery-settings#add-an-email-address).
12. In the **To** field, select a placeholder or enter an email address:
  - To send to the customer's primary email, select `{{invoice.customer.primaryAddress.emails.0.value}}`.
  - To send to the customer's notification email, select `{{customer.notificationEmails}}`. 
For more information, see [Manage notification emails](/docs/data-tables/manage-customer-information#manage-notification-emails).
13. In the **Subject** field, enter `New invoice issued`.
14. In the **Email content** field, compose your email.
Press **Add placeholders**, to add dynamic content such as customer information.
15. Select the **Attach invoice** checkbox.
16. Press **Save notification**.


## Send a welcome email to new customers

This process describes how to send new customers a welcome email which includes dynamically added content, such as their first name, last name, or other related customer information.

1. In the left navigation bar, press .
2. In the **Data and alerts** section, press **Email notifications**.
3. In the **Event-based notifications** section, press **Core events**.
4. Press the **Customer created** event.
5. Press **Create email notification**.
6. In the **Notification name** field, enter a unique name for the email notification.
7. In the **Labels** field, enter one or more labels to help categorize the email notification.
8. Optionally, to specify additional conditions on when the email is sent  1. In the **Conditions** section, clear the **No conditions** checkbox.
  2. In the **Select filter** dropdown, select a filter.
  3. In the next field, select an operation.
  4. In the next field, enter or select values.
  5. Optionally, to add another filter, press **Add filter**.
9. In the **Emails** section, press **Add email**.
10. In the **Title** field, enter a name.
This name is referenced in reports.
11. In the **From** field, select your email address.
If your address is not listed, press **Add email address**. 
To add an email address to email delivery settings, see [Add an email address](/docs/settings/email-delivery-settings#add-an-email-address).
12. In the **To** field, select a placeholder or enter an email address:
  - To send to the customer's primary email, select `{{customer.primaryAddress.emails.0.value}}`.
  - To send to the customer's notification email, select `{{customer.notificationEmails}}`. 
For more information, see [Manage notification emails](/docs/data-tables/manage-customer-information#manage-notification-emails).
13. In the **Subject** field, enter `Welcome to <your product name here> !`.
14. In the **Email content** field, compose your email.
15. Press **Add placeholders**, to add dynamic content such as customer first name and last name, or any other customer related information.
16. Press **Save notification**.


## Send a declined payment notification

This process describes how to send a declined payment email to a customer.

1. In the left navigation bar, press .
2. In the **Data and alerts** section, press **Email notifications**.
3. In the **Event-based notifications** section, press **Billing events**.
4. Press the **Renewal invoice payment declined** event.
5. Press **Create email notification**.
6. In the **Notification name** field, enter a unique name for the email notification.
7. In the **Labels** field, enter one or more labels to help categorize the email notification.
8. Optionally, to specify additional conditions on when the email is sent  1. In the **Conditions** section, clear the **No conditions** checkbox.
  2. In the **Select filter** dropdown, select a filter.
  3. In the next field, select an operation.
  4. In the next field, enter or select values.
  5. Optionally, to add another filter, press **Add filter**.
9. In the **Emails** section, press **Add email**.
10. In the **Title** field, enter a name.
This name is referenced in reports.
11. In the **From** field, select your email address.
If your address is not listed, press **Add email address**. 
To add an email address to email delivery settings, see [Add an email address](/docs/settings/email-delivery-settings#add-an-email-address).
12. In the **To** field, select a placeholder or enter an email address:
  - To send to the customer's primary email, select `{{invoice.customer.primaryAddress.emails.0.value}}`.
  - To send to the customer's notification email, select `{{customer.notificationEmails}}`. 
For more information, see [Manage notification emails](/docs/data-tables/manage-customer-information#manage-notification-emails).
13. In the **Subject** field, enter a subject or placeholder.
14. In the **Email content** field, compose your email.
15. Optionally, to use a premade HTML template:
  1. Press **Use template**.
  2. Select **Renewal invoice payment declined**.
  3. Edit the content as needed.
16. Press **Add placeholders**, to add dynamic content such as a payment link and customer information.
17. Select the **Attach invoice** checkbox.
18. Press **Save notification**.


When notifying a customer that a payment is declined, do not use the payment declined event.
In most cases, you do not want to send an email when a customer's first payment is declined.
If the first payment is declined, the customer's order is not activated.

## Send a past due invoice notification

This process describes how to send the customer an email notification when an invoice is past due.

1. In the left navigation bar, press .
2. In the **Data and alerts** section, press **Email notifications**.
3. In the **Event-based notifications** section, press **Billing events**.
4. Press the **Invoice past due** event.
5. Press **Create email notification**.
6. In the **Notification name** field, enter a unique name for the notification.
7. In the **Labels** field, enter one or more labels to help categorize the notification.
8. Optionally, to specify additional conditions on when the notification is sent  1. In the **Conditions** section, clear the **No conditions** checkbox.
  2. In the **Select filter** dropdown, select a filter.
  3. In the next field, select an operation.
  4. In the next field, enter or select values.
  5. Optionally, to add another filter, press **Add filter**.
9. In the **Emails** section, press **Add email**.
10. In the **Title** field, enter a meaningful title.
11. In the **From** field, select your address.
If your address is not listed, press **Add email address**. 
To add an email address to email delivery settings, see [Add an email address](/docs/settings/email-delivery-settings#add-an-email-address).
12. In the **To** field, select a placeholder or enter an email address:
  - To send to the customer's primary email, select `{{customer.primaryAddress.emails.0.value}}`.
  - To send to the customer's notification email, select `{{customer.notificationEmails}}`. 
For more information, see [Manage notification emails](/docs/data-tables/manage-customer-information#manage-notification-emails).
13. Optionally, to stay informed on all emails, press **Add BCC** and enter your email or a support email.
14. In the **Subject** field, enter a subject or placeholder.
15. In the **Email content** field, enter the content of the email.
16. Press **Add placeholders** to add placeholders to the email content, such as first name, last name, invoice number, and amount.
17. At the end of the email content, press **Add placeholders**, then select **Invoice payment link**. 
When customers click the invoice payment link, they are redirected to a payment form where they can pay the invoice.
18. Optionally, to attach the invoice to the email, select the **Attach invoice** checkbox.
19. Press **Save notification**.