Article published on the 29th of October, 2025.
This article extends the following articles:
Contents
1. Introduction
In this article, we build on previous discussions by demonstrating how to use the AI-generated email reply suggested after analyzing an incoming message.
When the AI processes an unstructured email, it not only extracts structured metadata for case creation but also generates a recommended response to the sender.
We will show how to leverage this suggested reply, combined with a Microsoft Graph call, to send the email as part of the case creation workflow.
Specifically, we will need to go through the following steps:
- Set up a credential which allows us to send e-mails as a user
- Set up a Graph endpoint configuration to send e-mails
- Set up a custom form in our process, allowing the user to select whether to send the reply, and tweak the reply message as needed
- Add a Send a HTTP request step in our process to send out the e-mail
2. Setting up credential
In this section, we will add a new credential so that we can send e-mails as a user, using a Graph call.
We begin in the Http endpoint library in the WorkPoint 365 administration:
- In the Http endpoint library, under Credentials we click the "Add" button.
- In the "Title" field, we give the credential configuration a fitting title.
- For "Credential Type", we select "Azure AD User Delegated".
- In the "Tenant" field, we provide our tenant ID.
- In the "Scope" field, we provide the following scope: https://graph.microsoft.com/Mail.Send
- Finally, we click the "Add" button.
The following pop-up message should appear:
- In the pop-up, we click "Yes" to confirm.
The credential configuration should now appear in our Http endpoint library:
Next, we set up a new endpoint configuration so we can call the Graph and send e-mails.
3. Configuring HTTP Endpoint
In this section, we will set up a new endpoint configuration in which we call the Graph, provide the endpoint with subject, body, and a recipient, which then sends an e-mail as the logged in user.
We begin in the HTTP endpoint library:
- In the HTTP endpoint library, under Http Endpoints, we click the "Add" button.
- In the "Title" field, we provide a fitting title for the endpoint configuration.
- In the "Parameters" section, we have added the three parameters we need in order to send the message; Subject, Body, and To.
- In the "Url" field, we provide the following Graph endpoint Url: https://graph.microsoft.com/v1.0/me/sendMail.
- In the "Http(s) endpoint action" field, we select "Post".
- In the "Body" field, we provide the following:
{
"message": {
"subject": "[Subject]",
"body": {
"contentType": "HTML",
"content": "[Body]"
},
"toRecipients": [
{
"emailAddress": {
"address": "[To]"
}
}
]
}
}
Note that we reference the information from our parameters in the body content. This means that when we send the HTTP request, as part of the WorkPoint Automate step, we can specify the subject, body content (which is the suggested reply from our AI model), and the recipient (which we already have access to from the original e-mail).
- In the "Credential" field, we select the MSGraph.Send.Mail credential we set up earlier in this article.
We can now test the endpoint configuration by simply typing an e-mail address into the "To" parameter test value, along with a test subject and body:
- With out test data filled, we click the "Test" button.
After a short while, our demo user John Doe has received the e-mail, coming from our Demo Administrator account:
- We can now add he endpoint configuration, after which i should appear in our HTTP endpoint library:
Next, we can edit our Create case from e-mail process and add first a Custom form for reviewing the suggested reply, and then a Send http request step to send the e-mail.
4. Updating the Create case from e-mail process
In this section, we will add a Custom form to our Create case from e-mail process, in which the user can review and edit the suggested reply from the AI model, and select whether to send the reply or not.
Currently, the Create case from e-mail process is configured as follows:
Next, we add a Custom form at the end of the process:
Here we have added a Custom form and given it a fitting title and description. We have also renamed it to "ReplyDetails".
In the Options tab, we have set up the following two fields:
The "Send reply" field is a boolean with the following configuration:
In the "Value" field, we have given the following adaptive expression:
true
This ensures that the boolean is set to "Yes" by default
The "Reply" field is a Note field with the following configuration:
In the "Value" field, we have provided the following adaptive expression:
json(AnalyzeEmail.output[1].content[0].text).SuggestedReply
This ensures that we get the suggested reply from the AI model into the Note field so that the user can review and edit it.
In the "Hidden" field, we have used the following adaptive expression:
not(ReplyDetails.sendReply)
This makes it so that if the user selects not to send the reply (i.e. by setting "Send reply" to "No"), then the reply field is hidden.
Next, we add another Send HTTP request step to the end of the process:
Here we again have provided a fitting title and description for the step, and we have renamed it "SendReply".
In the Options tab, we have made the following configuration:
- In the "Endpoint (from endpoint library)" field, we select the "Send Mail" endpoint we created earlier.
- In the "Subject" parameter, we have hard-coded the "Reply from Northwind" message, but if our AI model had provided us with a fitting subject, we could have selected to use that here bu accessing it from the "AnalyzeEmail" output.
- In the "Body" parameter, we have selected the reply body from our Custom form. With this configuration, the reviewed and/or edited reply from the AI model is used as the body text for the reply e-mail.
- In the "To" parameter, we point to the original sender of the e-mail which the process is executed on. This means that the person who originally sent us the e-mail the AI model analyzed will receive our response.
We can now save and publish the process and test it out:
- With an e-mail selected, we run the Create case from e-mail process from Express 365.
The process now opens and the AI model reads and analyzes the e-mail content:
When the AI model is done analyzing the e-mail we see our Entity form, filled with information that the AI model has extracted from the e-mail:
Next, we click Continue, after which the process creates the new case, along with a set of suggested tasks:
Once those two steps are completed, we are presented with the Custom form, which shows a boolean for sending the e-mail, as well as the suggested reply:
Clicking "Continue" will take us to the final step, which sends the reply to the original sender:
After a little while, the original sender receives the reply:
Comments
0 comments
Please sign in to leave a comment.