How to run azure logic app with condition on manual trigger

Azuretech 90 Reputation points
2024-01-28T11:08:52+00:00

I have a logic app where I have mentioned it to run on certain day of a week only ,something like below . But I want to add one condition , when I run the logic app manually , it should ignore the condition . HOw to execute this to ignore all mentioned condition when running it manually ?

triggers": {
            "Recurrence": {
                "conditions": [
                    {
                        "expression": "@equals(add(div(dayOfMonth(utcNow()),7),1),1)"
                    }
                ],
                "evaluatedRecurrence": {
                    "frequency": "Week",
                    "interval": 1,
                    "schedule": {
                        "hours": [
                            "8"
                          
                        ],
                        "minutes": [
                            0
                        ],
                        "weekDays": [
                            "Friday"                        "
                        ]
                    },
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,543 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Silvia Wibowo 6,041 Reputation points Microsoft Employee Volunteer Moderator
    2024-01-28T22:42:24.0433333+00:00

    Hi @Azuretech , I understand that you have a Logic App that has a Recurrence trigger and want to know if you can run it manually.

    When you run your Logic App from Azure Portal, like this screenshotUser's image The Logic App is run starting from the next step after Recurrence. So, it does not matter what you set in Recurrence. I have tried this in my Azure account. I have a daily recurring Logic App. It has run once today, and I can make it run again by clicking "Run" from Azure Portal - Logic App Designer. I verified in the Run History that the Logic App was run twice today: once from Recurring trigger and once from manual trigger.

    Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

    0 comments No comments

  2. MayankBargali-MSFT 70,936 Reputation points Moderator
    2024-01-29T11:09:06.1033333+00:00

    @Azuretech Thanks for reaching out.

    Unfortunately, there is no way to identify if the trigger was triggered due to the triggered condition or you have triggered the flow from azure portal or using the Azure management REST API.

    This would not be the accurate way/solution but could help up to some extent but not the viable solution. Based on the reoccurrence configuration in your workflow find the current time in logic app and compare if your logic app should be run during that time or not based on your occurrences scheduled (custom solution).

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.