Send Email using the SendGrid dynamic template in webMethods.io Integration Workflow
Tags: sendgrid, integration, template, tutorial
Published: 2021-10-13 08:35:56

---
title: Send Email using the SendGrid dynamic template in webMethods.io Integration Workflow
published: true
date: 2021-04-20 09:23:42 UTC
tags: #sendgrid, #integration, #template, #tutorial
canonical_url: https://tech.forums.softwareag.com/t/send-email-using-the-sendgrid-dynamic-template-in-webmethods-io-integration-workflow/240681/1
---

## Summary:

This article describes the step-by-step process of creating the Integration Workflow for sending email using the **SendGrid** Connector in **[webMethods.io](http://webMethods.io) Integration**

## Pre-requisites:

- The user needs to have a working **SendGrid** account to access the **SendGrid Email API**
- Working **[webMethods.io](http://webMethods.io) Integration** cloud tenant

## Contents:

Section 1: Create API Key in **SendGrid** settings required for authentication to access the **SendGrid Email API**  
Section 2: Create Dynamic Template in **SendGrid** which can be used to send emails using the dynamic templates  
Section 3: Creating the integration workflow for sending email using the dynamic template in **[webMethods.io](http://webMethods.io) Integration**

## Steps:

**Section 1. Create API Key in SendGrid settings required for authentication to access the SendGrid Email API**

1. Login to the [SendGrid](https://sendgrid.com/) using your **SendGrid** credentials
2. Once you logged in, navigate to **Settings > API Keys**
3. Click **Create API Key** , enter the **API Key Name** and select **Full Access** under **API Key Permissions**
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/0/f/0f9698f22833db885940d5d24e7dcce9769fdbf8_2_690x486.png)
4. Click **Create & View** , copy the API Key value generated and click **Done**
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/7/7/77437722fc0f47af7d87b988b7a65b9e023ebf0e_2_690x292.png)

**Section 2. Create Dynamic Template in SendGrid which can be used to send emails using the dynamic templates**

1. Navigate to **Email API > Dynamic templates**
2. Click **Create a Dynamic Template** , enter the name and click **Create**
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/c/a/caba7337dda52e64163b9792a6cb993cce2a4116.png)
3. Click **Add Version** to select or add email design to the template
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/e/4/e4550261654e4a06ae33a7504f9e729c039e9934_2_690x207.png)
4. Create Dynamic Template Version by selecting the email design
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/b/6/b6f859927ca7971e5af7ba6cf0b5ace92ca2b759_2_500x500.png)
5. Edit to design the email dynamic template and test your email
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/e/d/ed8f9e5f08ff1b2fdf5deab065e26185afd486e2_2_690x306.jpeg)
6. Save your changes and copy the **Template ID** to use it later for testing the send email API using the dynamic template
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/a/0/a0465ece368cb209c26034a008b587f4abeabb29_2_690x201.png)

**Section 3. Creating the integration workflow for sending email using the dynamic template in [webMethods.io](http://webMethods.io) Integration**

1. Create new Workflow, edit Workflow Name, enter the name and click **Done**
2. From the **Connectors** palette, select the **SendGrid** connector and drag it onto the panel
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/8/1/81655f9bf8ba7d04eadb1f2241d53946ea53fa47.png)
3. Click **Settings** to edit, select Action **sendMail** and click **+** to add account for **SendGrid** connection
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/8/6/867c9d192ace432e5f355b99ec21decc95f3f04f_2_431x500.png)
4. Enter **API Key** and click **Add** to add the account
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/0/e/0e67ff172721f5ea99fcc0d202bd9a3dd2d30f7f_2_346x500.png)
5. Click **Next** to configure the Action by entering the required input parameters
6. Enter the values for the required input parameters as shown below,
_personalizations > to(list): Enter the list of user email addresses and names to receive the email_  
_from: Enter the from email address and name_  
_subject: Enter the email subject_  
_template\_id: Enter the template ID of the dynamic template created_
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/8/7/871706f0ee97cbece067514a0f5e9f1f228bd52c_2_639x500.png)
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/4/8/48d598073f4ecbb8ac258e12552c5f1d2f90afe5_2_643x500.png)
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/c/3/c347c05297740100f9164bce5f56058fc515835a_2_646x500.png)
7. Click **Next** and click **Test** to test the action and verify
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/b/e/be39b68e3473a83fefcffe0a72b187002430b5fc_2_690x357.png)
8. If Test is successful, click **Done** and **Save** the workflow
9. Click **Run** to execute the workflow and verify if the email is sent
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/c/d/cda5a09dc63aa25d428fcf759bd12179104406e8_2_690x208.png)

[Read full topic](https://tech.forums.softwareag.com/t/send-email-using-the-sendgrid-dynamic-template-in-webmethods-io-integration-workflow/240681/1)