cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
e-learn
New Member

If no response, SLA create a notification and flag the email

Situation:

 

Emails are received in inbox.

And I intend to (define maximum response time 1 day of SLA).

 

If there is no response to the email (sent), you must create a notification and flag the email (inbox and mobile notification).

 

Is it possible to create this check on inbox messages?

 

Thanks.

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @e-learn,

 

Yes, I believe that would possible. As an example I created a flow which will demonstrate up to the step of the check if the message has been sent. This will be checked after exactly 1 day, based on the receivedDateTime of the message.

 

You can use the ConversationId and ReceivedTime attributes from the When a new email arrives (V3) trigger.
 
1. Calculate your SLA for your Time to First Response based on the Received Time value. I have added it to a variable called TTFR. You can use this expression. Btw, use the addMinutes if you want to do some testing 😉

addDays(triggerOutputs()?['body/receivedDateTime'], 1, 'yyyy-MM-ddTHH:mm:ssZ') 

receivedtimevariable.png
  
2. Add a Delay until. Use the earlier mentioned TTFR variable

delayuntil.png

 

3. Add a HTTP action after the delay. Configure it to connect with the Graph API to retrieve messages from your sent items.


Btw, as an alternative I tried to use the Get emails action with a search query on conversationId, but I didn't manage to get that working though. 

getsentmail02.png

 

4. Add a parse json action, to parse the response of that HTTP action. I have only used body/value part of the json response.

parsejsonsentmail.png

 

This is the schema btw:

{
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "@@odata.etag": {
                "type": "string"
            },
            "id": {
                "type": "string"
            },
            "createdDateTime": {
                "type": "string"
            },
            "lastModifiedDateTime": {
                "type": "string"
            },
            "changeKey": {
                "type": "string"
            },
            "categories": {
                "type": "array"
            },
            "receivedDateTime": {
                "type": "string"
            },
            "sentDateTime": {
                "type": "string"
            },
            "hasAttachments": {
                "type": "boolean"
            },
            "internetMessageId": {
                "type": "string"
            },
            "subject": {
                "type": "string"
            },
            "bodyPreview": {
                "type": "string"
            },
            "importance": {
                "type": "string"
            },
            "parentFolderId": {
                "type": "string"
            },
            "conversationId": {
                "type": "string"
            },
            "conversationIndex": {
                "type": "string"
            },
            "isDeliveryReceiptRequested": {
                "type": [
                    "boolean",
                    "null"
                ]
            },
            "isReadReceiptRequested": {
                "type": [
                    "boolean",
                    "null"
                ]
            },
            "isRead": {
                "type": [
                    "boolean",
                    "null"
                ]
            },
            "isDraft": {
                "type": [
                    "boolean",
                    "null"
                ]
            },
            "webLink": {
                "type": "string"
            },
            "inferenceClassification": {
                "type": "string"
            },
            "body": {
                "type": "object",
                "properties": {
                    "contentType": {
                        "type": "string"
                    },
                    "content": {
                        "type": "string"
                    }
                }
            },
            "sender": {
                "type": "object",
                "properties": {
                    "emailAddress": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "address": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "from": {
                "type": "object",
                "properties": {
                    "emailAddress": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "address": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "toRecipients": {
                "type": "array",
                "items": {
                    "type": "object",
                    "properties": {
                        "emailAddress": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "address": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "required": [
                        "emailAddress"
                    ]
                }
            },
            "ccRecipients": {
                "type": "array"
            },
            "bccRecipients": {
                "type": "array"
            },
            "replyTo": {
                "type": "array"
            },
            "flag": {
                "type": "object",
                "properties": {
                    "flagStatus": {
                        "type": "string"
                    }
                }
            },
            "@@odata.type": {
                "type": "string"
            },
            "meetingMessageType": {
                "type": "string"
            },
            "type": {
                "type": "string"
            },
            "isOutOfDate": {
                "type": "boolean"
            },
            "isAllDay": {
                "type": "boolean"
            },
            "isDelegated": {
                "type": "boolean"
            },
            "responseType": {
                "type": "string"
            },
            "startDateTime": {
                "type": "object",
                "properties": {
                    "dateTime": {
                        "type": "string"
                    },
                    "timeZone": {
                        "type": "string"
                    }
                }
            },
            "endDateTime": {
                "type": "object",
                "properties": {
                    "dateTime": {
                        "type": "string"
                    },
                    "timeZone": {
                        "type": "string"
                    }
                }
            },
            "recurrence": {}
        },
        "required": [
            "@@odata.etag",
            "id",
            "createdDateTime",
            "lastModifiedDateTime",
            "changeKey",
            "categories",
            "receivedDateTime",
            "sentDateTime",
            "hasAttachments",
            "internetMessageId",
            "subject",
            "bodyPreview",
            "importance",
            "parentFolderId",
            "conversationId",
            "conversationIndex",
            "isDeliveryReceiptRequested",
            "isReadReceiptRequested",
            "isRead",
            "isDraft",
            "webLink",
            "inferenceClassification",
            "body",
            "sender",
            "from",
            "toRecipients",
            "ccRecipients",
            "bccRecipients",
            "replyTo",
            "flag"
        ]
    }
}

 


5. Add a filter array, filter by the conversationid from the original message from the trigger action. In my example I stored it in a variable called ConversationId.

filterarray_conversationid.png

6. Check if the Filter Array is empty. In my example I am just using a Compose action. However you could obviously use a condition or something similar like that.

checkemptyfilterarray.png

HI @Expiscornovus 

Thank you very much for your dedication and solution.

 

In fact, looking for a simpler check.

 

https://emea.flow.microsoft.com/en-us/galleries/public/templates/2b5075ef950548339116c00149b7d6f4/re...

 

*Instead of being checked on the flag, I want to check my inputs (inbox) and outputs (sent).

 

The SLA can be confusing here.

The solution must go through: Check the message ID, or another parameter, if the email received in my inbox, was answered by me (in 1 day).

 

Is it possible to check with simpler parameters?

 

Thanks,
Regards

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,550)