“I’d like to automatically resubmit an expired Power Automate flow, but what should I use as the ‘Trigger Name’ in the Resubmit Flow action?”
While each Power Automate flow is limited by the 29 and half days of runtime, sometimes it’s not enough. Especially if it’s an approval flow, where some tasks can take longer than expected. Users can ignore them despite reminders or need more time to make the decision, and the flow times out.
Luckily, Power Automate has an action that can resubmit a flow. Not so luckily, it’s another not-so-easily configurable action as it asks for ‘Trigger Name’. What value does it expect?
Get the trigger name from flow JSON
The ‘Trigger Name’ is not something you can get directly flow the flow as it’s hidden in the background, in the flow JSON. To get the name you’ll have to export the flow to .zip package.
Type in some name, it doesn’t matter what it’ll be, and click on the Export button at the bottom.
Extract the downloaded .zip file and navigate in the folder structure until you get to the definition.json file.
Open it in some text editor, e.g. in Visual Studio Code which is my favourite. Search for the text “triggers” to find the flow trigger in that JSON, the ‘Trigger Name’ is the first property of this object. In this example it’s the ‘When_an_item_is_created_or_modified’.
Copy the value in the ‘Resubmit Flow’ action and add an expression to extract the current flow run ID. The flow will resubmit itself once it reaches the step.
You can “extend” a Power Automate flow run duration if you resubmit the flow again before it times out, but you’ll need the ‘Trigger Name’ value it asks for. Once you extract it from the flow JSON the action itself is quite straightforward – pick the environment, pick the flow, type in the trigger name and use an expression to specific which run it should resubmit. The flow will restart using the same inputs as the original one.
It’s surely not something to use in all your flows, but it might be an extension to the restartable approval flows as proposed in the previous article that’ll give your users more time to process their tasks (if needed).