-
Notifications
You must be signed in to change notification settings - Fork 3
Prerequisites SendGrid
amccook edited this page Sep 7, 2023
·
7 revisions
In order to use Turbonomic Webhooks with SendGrid, the following prerequisites must be configured. This outlines the bare-minimum steps required to integrate Turbonomic Webhooks with SendGrid. For more advanced usage of SendGrid, please refer to their docs.
- Create a SendGrid Account
- Generate your SendGrid API key
- Create a Dynamic Template
If you don't already have one, configure a SendGrid account. SendGrid offers a Free Plan which allows you to send 3000 emails/month.
- Navigate to https://sendgrid.com/
- Click
Start for free
in the top right corner. - Follow the prompts to create a Free account.
- In the SendGrid portal, go to
Email API
>Integration Guide
>Web API
>Choose
- When asked to "Choose the language you want to use," locate
cURL
and selectChoose
- In section 2, provide a name for your API Key. Click
Create Key
- Record your API key for use later on.
- To verify your SendGrid API is working, follow instructions in section 4 to
Run the code
. Then clickNext: Verify Integration
- Go to
Email API
>Dynamic Templates
>Create a Dynamic Template
- Provide a name for your template. In this example, name it
TurboResizeEmail
> ClickCreate
- Locate the template you just created and click
Add Version
- Hover over
Blank Template
and clickSelect
- Locate
Design Editor
and clickSelect
- In the Dynamic Version Settings, provide a Version Name. In the
Subject
field, write:Turbonomic: VM Resize Notification - {{displayName}}
- Click on the
Build
tab and click/drag theText
box onto the template page.
- Paste the following text into the text box. This is an example template for executing On-Prem VM Resize actions in Turbonomic.
Your VM, {{displayName}}, has been resized from {{currentValue}} {{valueUnits}} to {{newValue}} {{valueUnits}}. You can review its utilization here: https://{{turboUrl}}/app/index.html#/view/main/{{uuid}}/details Details: - Status: {{actionState}} via {{actionMode}} by {{userName}} at {{updateTime}} - Instance: {{displayName}} - Details: {{details}} - Reason: {{risk_subCategory}} - Commodity: {{risk_reasonCommodities}}
- At the top, click
Save
. And click back arrow at the top to return to theDynamic Templates
page. - Expand the template, and make note of the Template ID. You will use this Template ID in the Turbonomic Webhook wherever you see the variable
<SENDGRID_DYNAMIC_TEMPLATE_ID>
- Lastly, to complete the SendGrid setup, navigate to
Settings
>Sender Authentication
> Click theVerify a Single Sender
button. This will verify ownership of a single email address to use as a sender in the Turbonomic webhook wherever you see the variable<FROM_EMAIL_ADDRESS>
- You can now test the example by adding the
On-Prem VM Resize
action webhook to Turbonomic.