I’ve been exploring how to retrieve the latest entities in table storage and how this could trigger an automation process. Whether this is via Logic Apps or Power Automate, I needed a solution where a new entry triggered my flow.
Here’s my guide on how I’ve achieved this which I hope you may find useful to adopt into your workflow scenario.
Connector & Configuration
Firstly, set up the trigger, in my instance I will be using a recurrence.
Secondly, search for the Azure Table Storage ‘Get entities’ connector in your flow.
Thirdly, select the table storage to read from. Additionally expand the drop down menu and add a new paramater ‘Filter Query’ to the connector.
Here’s how we’re going to filter the results to our requirements. Change this to suit your specific needs and conditions.
Inside the Filter Query paste the following query:
Timestamp gt datetime
Within the dynamic content menu on the right, select the expression heading, then add the required condition. In my example I needed to check the latest entities from the last 15 minutes. Although you can use other time queries like below.
Last 15 minutes example:
Last 1 hour example:
Add Partition or Row Key filter
This can be expanded further to look for specific partition or row keys to be returned for example.
Finally, running the Logic App manually I can see my test key is showing in the entity result. This key is new, and within my 15 minute filter query.
A nice way to stop the flow if the list of entities returned is null would be to add a condition below looking for your relevant text match before proceeding with the rest of your actions.
This is a great way to build a process out if you rely on a table storage entry record for a particular process trigger. For example, I’m using the above in a process used to trigger automatic creation of an Azure Resource Group.
Filteirng the query allows great control on the result of the ‘get entities’ action to make the desired return data specific to what you need to filter on, excluding unnecessary row data.
If using Power Automate you’ll need a premium license for the connector. Check out the Microsoft Docs for more information on the connectors.
Thanks for reading!