SendGrid Connector
Using Descope's connectors allows you to use SendGrid, a cloud-based SMTP provider that allows you to send emails without having to maintain email servers, in your authentication flow. This article will go through setting up the connector and including it in your flow.
Configure SendGrid connector
Descope uses your SendGrid API Key and Sender address to integrate with our service. Start at your dashboard. Navigate to the SendGrid connector: Dashboard -> Connectors -> SendGrid
Now, complete the required fields:
- Connector name: Custom name for your connector. This will come in handy when creating multiple connectors from the same connector template.
- Connector description: (Optional) Describe what your connector is used for.
- API Key: The API key used to authenticate with SendGrid services.
- Region: The region of the SendGrid API to use (Global or EU).
- Sender address: The email address from which the emails are going to be sent. Make sure those are registered properly in your server.
- Sender name: (Optional) The name of the sender to be added to sender address.
Dynamic Value Configuration
You may want to dynamically configure sender details depending on the tenant sending the message.
To do so, configure the value of Sender Address or Sender Name to be {{<dynamic-val>}}, replacing <dynamic-val> with the name of the dynamic value you would like to utilize.
Refer to the Template Options doc to learn how to set these dynamic values when using messaging connectors with our Flows or SDKs.
Testing
You can test if your connector's configuration is working properly simply by hitting the Test button and viewing the Test Results panel.

Save your configuration by hitting Create.
Add your SendGrid connector to a flow
Navigate to: Flows, choose your flow. Then, tap the create button
(designated via the + icon), select Connector, and choose SendGrid.
Click to set down the connector in your flow editor and fill out the fields:
- To: Who the email should be sent to. Setting this dynamically based on previous attributes is recommended (eg.
{{user.email}}). As you type in the input field, options appear. - Subject: Enter the subject of the email.
- Body: Enter the body text of the email.
- Use External Template: (Optional) Enable this to use a SendGrid template instead of the subject and body fields.
- External Template ID: (Optional) If
Use External Templateis enabled, enter the SendGrid template ID here. This will override the subject and body fields.

Now, link your connector at a logical point in your authentication flow, likely at the end of the flow after email has been submitted by the user.

That's it! Whenever a user goes through your authentication flow, the SendGrid connector will be automatically triggered.
Using SendGrid connector with Email Based Authentication
When using email-based authentication methods like Magic Link, Enchanted Link, or Email OTP, you can use the SendGrid connector to send the email to the user. To do so, choose SendGrid for the connector in the corresponding action in your flow.
You can also use SendGrid email templates instead of the default Descope messaging templates when using the SendGrid connector with email-based authentication. To do so, select Referenced SendGrid Template ID from the Template dropdown and provide the SendGrid template ID in the External Template ID field.
In order to pass dynamic values to your SendGrid template, add a row to Template Dynamic Keys and provide the key and value. The key should match the dynamic variable in your SendGrid template, and the value can be a static value or a dynamic value from your flow.
