Re: Creating an automation to delete files on a SharePoint folder after 7 days, teams private group
Based on the screen shot, the error is because you typed the expression into the filter query rather than using the expression builder to create the expression in the filter query. If you look at my screen shot I posted, the expression is in a pink box, which indicates it was created with the expression builder. When your cursor is in the filter query box, this window will open. Choose the Expression tab and enter it there and press OK.

And I just noticed, I don't know what I was thinking when I gave you the earlier expression. This is the expression you want to use:
addDays(utcNow(),-7,'yyyy-MM-dd')