Send an email from am Automation runbook
2 minute read
Using SendGrid you can send email from Azure Automation.
Requirements
- SendGrid account
- Azure Automation account
- User-assigned managed identity
SendGrid account setup
Create a SendGrid account
- In the Azure marketplace search for ‘Twilio SendGrid’
- Choose plan (there is a free plan that limits sending 100 emails a day)
- Choose a subscription and other details to host the SendGrid SaaS
Configure the SendGrid account
Once setup you will need to configure the new account which can be started by clicking the button in the Azure portal or referencing an email sent to your account from SendGrid.
Create a sender identity
Your sender identity is the “from” email address your recipients will see in their inbox.
- Creat the new sender with the details required
API keys
API Keys authenticate your application, mail client, or website with Twilio SendGrid services. Unlike a username and password, API keys are scoped to provide access only to the services you select. You can also delete and create API keys without impacting your other account credentials. For these reasons, Twilio SendGrid requires you to connect to its services using API keys.
- In the SendGrid portal navigate to settings then API keys
- Name the API key something useful
- Create a full access API key
- Copy the API key and store is somewhere secure; an Azure Key Vault is a good choice
References
Last modified July 21, 2024: update (e2ae86c)