Vedavati
April 27, 2021

Integrating SendGrid with DronaHQ

SendGrid makes sending emails possible without the use of email servers. You can integrate SendGrid with the DronaHQ Studio to have reliable email delivery. You can send targeted, personalized, and customized messages, and emails to your customers. The powerful integration allows you to Customize emails you send with SendGrid, add Automations, update your CRM and Database.

You can make use of the SendGrid Integration for a host of areas like Email Marketing campaigns, signup forms, and so on.

Configuring SendGrid connector

The SendGrid Third Party connector is available under Connectors.

  1. Select SendGrid and click Continue.
    SendGrid Connector
  2. You can find several actions here to undertake your Email service-related functions.SendGrid Actions
  3. Add the Authenticated SendGrid Account. If you have already configured your account, you simply need to choose it from the list and click Continue. If you have not added the account then first configure the account and then proceed.
  4. Configure connector fields. Add a Connector name. Then depending upon the connector action type add the Connector’s Fields.
  5. Once all details are added, click Continue and add the Action Unique name and other details if any. Click Finish. Your connector configuration is now done.

Using SendGrid connector

Now let us consider a few scenarios to understand some of the functionalities available with this integration. Let us take the example to add the SendGrid connector in an Action flow. The connection and authentication process would be the same whether you use an action flow or workflow.

Send Mail without using a template

Now if you want to create your email campaign list and wish to send an email to the selected recipients you can make use of the Send Mail action.

The process is simple. You need to provide the list of recipients, add the email subject, email message body, and you are done. You would not select any template here.

Let us have a look at this example. We want to send an email to a new user who subscribes to the newsletter from the company. In this example, we will have an action button to send emails to selected users. We will not use a template here. However, you can use a Set Message Action from the Action flow to add a customized message.

So now whenever you run the form, select the recipients from the dropdown and click to trigger the email.

Send Email without Template

Send email using Dynamic Templates

Templates are not mandatory but if you want to create a template for your campaigns you can do so in your SendGrid account here. You can use this template that you have created in SendGrid and can also add the dynamic fields within the templates. When configuring the connector these dynamic fields would be listed out.

Now it is necessary to remember that SendGrid has Dynamic templates and Legacy Templates. SendGrid is easing out the legacy templates and allows you to migrate existing legacy templates to dynamic / marketing ones instead if you want to do it. However, if you need to use the legacy templates, they are supported yet.

For the Send Email action here let us first see how to use the Dynamic template. First, create a template in SendGrid under Dynamic templates. Add the Subject and the Message content and Save. You can view the Template ID as well. This will be the name and template id that would be available in the configuration of the connector.

 

Now when you configure the Connector, you should make sure that you add the Mandatory fields for From EMail, From Name, and To Email. It is important to remember that you should provide the Receiver’s Email by selecting from one of the list controls and passing it as a keyword. Do not add a string value. Any variables in the template would be provided as the dynamically generated fields. Assign the values according to your use case.

 

Once all the configuration settings are done, add the action unique name and click Finish.

Now when you preview or run the app you can see that the email would be sent from the email to the recipient’s email id. You would be able to view the email as per the template if you have chosen the template.

 

Note:

 
  1. If you are adding a template, the subject and message from the Template would override the Subject and Message from the Configuration.
  2. In case you do not select a template then make sure that you add the Subject and Message Body else it would appear blank in the Recipients email.
  3. When using the template, make sure the template is Active.

Send Email with Legacy Template

Like you have used the dynamic templates to send emails, you can also have a set of Legacy Templates which you may like to use. Even these are available and can be used with the Send Mail with Legacy Templates action of the SendGrid Connector.
It is pretty much similar to sending using default templates but provides you with a list of available Legacy templates you might have in SendGrid.

Select the template and add the necessary dynamic fields and your mail configuration would be done and ready.

 

Now in this example whenever you add a dynamic email text using a text / textarea control, then in the Legacy template the <%body%> would be replaced by that text and the variable with the value you specify.

Note:

 
  1. If you are adding a template, the subject and message from the Template would override the Subject and Message from the Configuration.
  2. In case you do not select a template then make sure that you add the Subject and Message Body else it would appear blank in the Recipients email.
  3. When using the template, make sure the template is Active.
  4. Double curly brackets are only supported for dynamic variables. Hence the templates in SendGrid would have to include dynamic variables using them only.

Configuring SendGrid Account

Now when you are adding a new account you need to use your SendGrid account authentication method. SendGrid has a simple token-based authentication. You can find all your account details on the SendGrid account page. When configuring the SendGrid connector following are the details that you would need.

  1. Add a Tag for your account name. This will be the name that would be shown in the list of accounts.
  2. API Key: You can see a list of your SendGrid API keys under Settings > API Keys section of your SendGrid account. If you want to create a new API key click Create API Key and then view it.
  3. Provide Access: Typically when you want to send the email through this method, provide Full Access. To provide API Key permission, under Edit API Key > API Key permissions, select Full Access and click Update.

When you click Create & View your API key would be generated. You can copy it to some secure file so that you can use the same key for Authentication later.

4. You can go to Settings and click Create API Keys in case you want to generate a new one.

Once all the above details are added, click Submit and you are done.

Copyright © Deltecs Infotech Pvt Ltd. All Rights Reserved