Forum Discussion
arwadhahri
Oct 15, 2024Copper Contributor
How can I make an Azure Logic App only execute during a certain window of time?
I have a logic app that retrieves all security incidents from Microsoft Sentinel and sends them to a Teams channel. Notifications in Microsoft Teams are always received between 9 PM and 5 AM. I ...
- Oct 15, 2024
The error message you're seeing (WorkflowRunActionTypeUnSupported) indicates that there is a problem with the Recurrence trigger in your Logic App. This error typically occurs when the Recurrence trigger is not placed correctly or used in a way that is unsupported.
Please try these steps.
1. Ensure Recurrence is the First Step:
The Recurrence trigger must be the first step in your Logic App. Double-check that it's at the very beginning.
2. Use the Right Recurrence Trigger:In your Logic App designer, search for "Recurrence" under the Schedule section and add it as the trigger. Do not use Recurrence as an action later in the workflow.
3. Delete and Re-add the Recurrence Trigger:If the issue continues, delete the current trigger and add it again from the Schedule section.
Kidd_Ip
Oct 16, 2024MVP
You may consider setup Recurrence Trigger with condition to check the time, sending notification may refer below as sample:
{
"definition": {
"triggers": {
"Recurrence": {
"recurrence": {
"frequency": "Minute",
"interval": 15,
"startTime": "2024-10-16T07:00:00Z",
"endTime": "2024-10-16T17:00:00Z",
"timeZone": "UTC",
"weekDays": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
]
}
}
},
"actions": {
"Condition": {
"actions": {
"If_true": {
"actions": {
"Get_Incidents": {
"type": "ApiConnection",
"inputs": {
"method": "get",
"path": "/incidents",
"authentication": {
"type": "ManagedServiceIdentity"
}
}
},
"Send_to_Teams": {
"type": "ApiConnection",
"inputs": {
"method": "post",
"path": "/messages",
"authentication": {
"type": "ManagedServiceIdentity"
},
"body": {
"content": "@{body('Get_Incidents')}"
}
}
}
}
}
},
"expression": "@and(greaterOrEquals(formatDateTime(utcNow(), 'HH'), '07'), lessOrEquals(formatDateTime(utcNow(), 'HH'), '17'))"
}
}
}
}