Seems like the image didn't load correctly in the original message. Here they are:
Summary:
Error:
Unable to compute iso trigger state
What’s happening:
The workflow fails while computing the latest message timestamp from a set of Microsoft Teams channel messages. During evaluation, one of the date fields cannot be parsed as a valid DateTime, causing the trigger state calculation to fail.
Root cause (likely):
A malformed or unexpected date/time value is present in the message payload (e.g. createdDateTime or a derived field). The exception is thrown when the logic attempts to:
- Convert a string to
DateTime
- Apply a LINQ
Max() operation over the message timestamps
-
Exception details:
System.FormatException: String was not recognized as a valid DateTime
at System.Convert.ToDateTime(String value)
at Newtonsoft.Json.Linq.JToken.op_Explicit
at System.Linq.Enumerable.Max(...)
Context:
- Messages come from a Teams channel with repeated posts (same PR review message sent multiple times).
- At least one item appears to contain an invalid or improperly encoded date string (e.g. URL‑encoded timestamp or unexpected format).
- This breaks the ISO trigger state evaluation, preventing the flow from progressing.
-
Impact:
- Teams trigger fails intermittently or consistently
- Flow does not advance or evaluate new messages
- Trigger state cannot be computed
-
Suggested investigation areas:
- Validate all
createdDateTime / lastModifiedDateTime values before conversion
- Guard
Max() logic against null/invalid date value
- Confirm whether any message metadata includes URL‑encoded or non‑ISO date strings
Unable to compute iso trigger state.
Items:
[
{
"replyToId": null,
"etag": "<ETAG>",
"messageType": "message",
"createdDateTime": "<ISO_DATETIME>",
"lastModifiedDateTime": "<ISO_DATETIME>",
"lastEditedDateTime": null,
"deletedDateTime": null,
"subject": "<SUBJECT>",
"summary": null,
"chatId": null,
"importance": "normal",
"locale": "en-us",
"webUrl": "<TEAMS_MESSAGE_URL>",
"onBehalfOf": null,
"policyViolation": null,
"eventDetail": null,
"id": "<MESSAGE_ID>",
"from": {
"application": null,
"device": null,
"user": {
"@odata.type": "#microsoft.graph.teamworkUserIdentity",
"id": "<USER_OBJECT_ID>",
"displayName": "<USER_NAME>",
"userIdentityType": "aadUser",
"tenantId": "<TENANT_ID>"
}
},
"body": {
"contentType": "html",
"content": "<MESSAGE_HTML_CONTENT>"
},
"channelIdentity": {
"teamId": "<TEAM_ID>",
"channelId": "<CHANNEL_ID>"
},
"attachments": [],
"mentions": [],
"reactions": []
}
]
Exception:
System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at System.Convert.ToDateTime(String value, IFormatProvider provider)
at Newtonsoft.Json.Linq.JToken.op_Explicit(JToken value)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Enumerable.MaxIEnumerable`1 source
at <EXPRESSION_CONTAINER>.Expression_<ID>(IProxyRequestContext context)