cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User II
Super User II

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
New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (96,459)