• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Tachytelic.net

  • Sco Openserver
    • Sco Unix Support
    • SCO Openserver Installation ISOs
    • SCO Openserver Binaries
    • Add a Hard Drive to an Openserver 5 Virtual Machine
    • Install SCO Vision SQL-Retriever ODBC Driver on Windows 10
    • License Expired on Virtual SCO Openserver Installation
    • How to reset the root password on SCO Openserver 5
  • Scripting
    • PowerShell
      • Add leading zeros
      • Check if a File Exists
      • Grep with Powershell
      • Create Environment Variables
      • Test for open Ports
      • Append to a Text File
    • VBScript
      • Check if a File Exists
      • lpad and rpad functions
      • Windows Update E-Mail Notification
  • Office 365
    • Connect to Office 365 with PowerShell
    • Add or remove an email alias using Powershell
    • Change Primary email address of Active Directory user
    • How to hide an AD user from the Global Address List
    • How to hide mail contacts from the Global Address List
    • Change the primary email address for an account with PowerShell
    • Change Primary email address of an AD User
    • Grant a single user access to access to all calendars
    • Forward email to an external address using Powershell
    • Convert shared mailbox to user mailbox with Powershell
  • Get in Touch
  • About Me
    • Privacy Policy

How to send awesome emails with Power Automate and SendGrid

August 19, 2020 by Paulie Leave a Comment

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": "[email protected]",
    "name": "Tachytelic Accounts"
  },
  "personalizations": [
    {
      "to": [
        {
          "email": "[email protected]"
        }
      ],
      "bcc": [
        {
          "email": "[email protected]"
        }
      ],
      "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:

  • Send large batches of customer statements.
  • Send PDF Invoices which are generated from a word template
  • Notify customers of delivery of goods.

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.

Filed Under: Power Platform Tagged With: Power Automate

Reader Interactions

Leave a Reply Cancel reply

Primary Sidebar

Power Automate Support Image
Link to my LinkedIn Profile

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 107 other subscribers.

Go to mobile version