---
title: "Send an automated email campaign upon form submission"
slug: "send-an-automated-email-campaign-upon-form-submission"
abstract: ""
---
# Send an automated email campaign upon form submission

When a contact completes and submits a form, you can use this information to personalize an email message and initiate an automated email campaign. Email messages are sent to both known and anonymous contacts.

> [!note]
> In some cases, the format of the data entered does not match what you want to include in the email message. You can [change the format](https://doc.sitecore.com/xp/en/developers/exm/102/email-experience-manager/create-a-pipeline-processor-to-convert-form-data-in-a-custom-personalization-token.html) to meet your requirements.

To send an automated email campaign upon form submission:

1. [Create an automated email campaign](https://doc.sitecore.com/xp/en/users/exm/102/email-experience-manager/create-an-email-campaign.html "Create an email campaign"), select **Activate message now**, and then click **Activate message**.

    ![Email Experience Manager showing the Delivery options for an automated email campaign.](https://doc.sitecore.com/api/markdown-image/xp/en/users/exm/102/email-experience-manager/images/EXM_93_Send_email_campaign_2.png)

2. [Create a form](https://doc.sitecore.com/xp/en/users/102/sitecore-experience-platform/design-a-form.html) with the fields described in the following table, using the settings in the **Form element**s pane, on the **General** tab.

    ![Example of a form showing the Form elements pane.](<https://doc.sitecore.com/api/markdown-image/xp/en/users/exm/102/email-experience-manager/images/Sending%20automated%20campaign%2092+.png>)

    | Form element | Label | Field name | Description |
    | --- | --- | --- | --- |
    | **Basic** section |  |  |  |
    | Email | Email Address | Email Address | This is a required field used to send the email message. |
    | Checkbox | I consent to receive emails in accordance with privacy policies. I understand I can opt out at any time. | Consent to receive marketing emails | This check box indicates that the contact has explicitly consented to have marketing email messages sent to them. |
    | Single-line text | Full Name | Full name | The value field is used as a personalization token. |
    | **Structure** section |  |  |  |
    | Submit button | Submit | Submit | Associate the **Send Email Campaign Message** submit action with the button to send an email campaign message. |

    > [!note]
    > For all settings not in the table, accept the default.

3. On the canvas, click the **Submit** button you added to the form and, on the **General** tab, in the **Submit actions** section, click the **Add** (+) button and click **Send email campaign message**.
4. In the **Select email campaign message** dialog box, from the list, click the email campaign you created in step 1. Only email campaigns that are active are available.
5. In the **Select email field**, click *Email Address*, which the used along with the identification source to identify the contact who will receive the email message.
6. In the **Specify the identification source** field, click Forms as the one you want to use.
7. In the **Select the consent field**, select *Consent to receive marketing emails* that you defined in Step 2.

    > [!note]
    > We recommended that the consent field is a check box. To comply with GDPR legislation, for example, the consent field needs to be a check box.

8. In the **Send Email Campaign Message** dialog box, click **\+ Add token**.
9. In the **Token name** field, specify the token name (for example, *fullname*) and, in the **Form field**, click *Full Name* that you defined in Step 2.

    ![Select email campaign message dialog box.](<https://doc.sitecore.com/api/markdown-image/xp/en/users/exm/102/email-experience-manager/images/Send%20automated%20campaign%2092+.png>)

    > [!important]
    > When you [insert a token](https://doc.sitecore.com/xp/en/users/exm/102/email-experience-manager/insert-a-token-in-a-message.html "Insert a token in a message") into the email message to personalize it, you must use the same token name that you define here.

10. Click **OK** and then save your changes.