Integrate with SendGrid
If you want to automatically send an email from Next Matter, you can tap into Next Matter's built-in integration to reach out to external partners by email.
If you have your own email provider, you can achieve the same result using Custom integration.
Before you begin
- Check the required scopes to learn more about which data is shared between the apps.
- Understand how data references work. See Use data references. This will help you use the captured data in the workflow steps.
Good to know: Check out our ready-made templates available when you add a step and select Templates > 3rd party templates. You can use the templates to create a set of pre-configured steps.
Need a specific template? Click the Contact us button in the top right of the page and let us know.
Use Next Matter's built-in integration
- In the workflow in which you want to send an email, click + Add step.
- Select Step templates > Integrations > SendGrid - Send an email.
- Customize the Body. You'll be using Next Matter's built-in integration, so all other details have been populated for you. Note that your emails will be sent from the Next Matter email address.
Tip: You can use data references to populate the recipient's name or content.
{
"from": {
"email": "[email protected]",
"name": "SENDER_NAME"//enter a name
},
"personalizations": [{
"to": [{
"email": "RECIPIENT_EMAIL_EDDRESS"}],//enter the address
"dynamic_template_data": {
"email-subject": "SUBJECT",//enter the subject
"email-content": "EMAIL_TEXT"}//enter the contents of the email
}],
"template_id": "d-1aa0b4cd59214c18924a28c96ed78f7f",
"attachments": [//you can delete this part if you don't send an attachment
{
"content": "REFERENCE_TO_ATTACHMENT_FILE",//use the data reference to find the attachment if it was added to the process
"filename": "Attachments.zip"//enter the file name
}
]
}
If you want to send an email with an attachment, use the SendGrid - Send an email with attachment template.
Integrate with Sengrid with your own account
- In Sendgrid, go to Settings > API keys.
- Click Create API-Key and define the scopes for the integration. You can only generate the key if you're an admin.
- In Next Matter, open the process in which an email should be sent out and click + Add step.
- Select Integrations > Custom integration.
- Click Settings.
- Enter the following details:
- Method: POST
- URL: https://api.sendgrid.com/v3/mail/send
- Headers: Content-Type: application/json
- Headers: Authorization: Bearer SENDGRID_API_KEY
- Body: The body might look like the following:
{
"from": {
"email": "[email protected]",//change this for your company
"name": "EMAIL_SUBJECT"
},
"personalizations": [{
"to": [{
"email": "[email protected]"//this can be a Next Matter data reference
}],//copy and paste the enitire "to:"section for every user that should also receive this email
"cc": [{
"email": "[email protected]"
}],
"dynamic_template_data": {
"email-subject": "NEW_SUBJECT",
"email-content": "EMAIL_TEXT"
}
}],
"template_id": "d-1ab0b3cd57213c18225a28c96ed78f7f" //you can find the template in Sendgrid > Email Api> Dynamic Templates
}
- Save your changes. The step in which the email is sent out is now called Email automation.
For details on SendGrid email configuration, see the following Sengrid API documentation.
Updated 10 days ago