This article documents sending an email with a dynamic template using the SendGrid connector.
Content:
Design a dynamic transactional template
- Open the Dynamic Transactional Templates page and click “Create a Dynamic Template”.
- Add a unique Dynamic Template Name and then click “Create”.
- Copy the Template ID for the newly created template, which you will find in the list of templates. This will be used to send the email in Qlik Automation.
![chooste template.png chooste template.png](https://community.qlik.com/t5/image/serverpage/image-id/112488i44C67DD1CB2AE405/image-size/large?v=v2&px=999)
- To begin editing your new template, click “Add Version”.
- Select a pre-made design or start from scratch.
- Customize your template and save it. For more information on using Handlebars, see Using Handlebars.
Sending a transactional email
- From the left menu, select the "SendGrid" connector.
- Drag and drop the "Send Email" block.
- Fill in the necessary information and fill in the template ID that was copied when creating the dynamic template.
This "Template Id" field is required when using dynamic templates.
- Add the "Dynamic Template Data" that should be used with the Handlebars for that template.
The Data should be a JSON Object that looks like this:
![dynamic template JSON.png dynamic template JSON.png](https://community.qlik.com/t5/image/serverpage/image-id/112489i7F230F83DC278D20/image-dimensions/589x521?v=v2)
- Add that data item by item using the key and value of each item, or use the "Raw Input".
![Dynamic Template Data.png Dynamic Template Data.png](https://community.qlik.com/t5/image/serverpage/image-id/112490i67BDA448C159A014/image-dimensions/596x537?v=v2)
- Click on "Run".