Re: Daily Variable Increment on New Email Trigger
@JojoS
Actually, I came up with something much simpler. Two different flows, but the core of both is a simple text file in your FTP folder called something like FileMax.txt. The file contents could be something as simple as varFileName = 0.
The first flow has a recurrence trigger that runs at midnight every night, followed by an FTP Update File action.

(I realized after I posted this, that I have two different file contents. Pretend the one above says "varFileName = 0")
That will reset the counter back to zero each day.
The second flow is your thing just as you had it, but we'll set the initial number by using the FTP Get file content action and point it to your text file. That will get you "varFileName = 0" which we can parse and add 1 to all in one step. Put a compose after the get file content with this expression:
add(int(split(body('Get_file_content'),' = ')[1]),1)
Here's an explanation of that, and also a video on the Split() function:

- Then you want to update your text file with the new starting number from the output of the compose above. You can do this with an FTP Update File and in the File Content area, just have "varFileName = " and then the dynamic output from your compose above. It should look like this:

Which will update the text file and ready it for the next file:

Give that a go, hopefully it's enough to get you going in the right direction. Keep us posted either way.
-Ed
If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.