Quantcast
Channel: Tachytelic.net
Viewing all articles
Browse latest Browse all 210

How to send awesome emails with Power Automate and SendGrid

$
0
0

There are many ways to send emails from Power Automate. This post will demonstrate how to build a flow to Send email from Power Automate with Sendgrid using dynamic templates.

There are many advantages to using SendGrid:

  • Ability to send from any alias in your domain.
  • Dynamic Templates are easy to maintain and build with SendGrid editor.
  • Simple to track email delivery.
  • Great solution if you are sending a high volume of emails.
  • SendGrid has comprehensive testing tools to ensure emails are deliverable.

The first part of the process is to create a dynamic template in SendGrid. I implemented a flow to send customer balance statements and the resulting email looked like this:

Image of a sample email template in SendGrid
Right-click save as to download the SendGrid Dynamic Template.

SendGrid will replace the values between the double curly braces with values supplied from Power Automate.

Once you have created your template SendGrid will assign a template ID. Copy the Template ID for the next step in Power Automate:

Image of Dynamic Template in SendGrid which will be used to send an email from Power Automate

Next, generate a SendGrid API Key for access from Power Automate and then you can build your flow. Here is my sample flow (click to zoom):

Image of Flow in Power Automate

Here is my JSON code:

{
  "from": {
    "email": "accounts@tachytelic.net",
    "name": "Tachytelic Accounts"
  },
  "personalizations": [
    {
      "to": [
        {
          "email": "paulie@tachytelic.net"
        }
      ],
      "bcc": [
        {
          "email": "accounts@tachytelic.net"
        }
      ],
      "subject": "Statement from Tachytelic.net",
      "dynamic_template_data": {
        "Current": "5,890.08",
        "Days0_30": "5,118.00",
        "Days30_60": "0.00",
        "Days60_90": "0.00",
        "Days90plus": "12,384.00",
        "CustomerName": "Sample Customer",
        "Total": "23,392.09"
      }
    }
  ],
  "template_id": "d-420f62e9c0074c899610f056b0141d11"
}

In Production flows like this one are used to:

The SendGrid template tools make it easy to create consistent branded emails from Power Automate. You can get a free account on their website to try it out.

The post How to send awesome emails with Power Automate and SendGrid appeared first on Tachytelic.net.


Viewing all articles
Browse latest Browse all 210

Trending Articles