Create daily notes for several days

Hi, I´m able to retrieve all my workouts for each day from the health app and I would like to include this info for each day in their correspondent daily notes. I was already able to create a daily note (not for the current day) and include the info of the workouts that I did that day.

The problem? I´m not able to make the loop work to create several daily notes.

So i select a range of dates from 04/08 till today and im able to make the shortcut create the first note and include the text that i want but when it supposed to pass to the next day (04/09) the loop stops and the note is not created.

Does someone know how to create that kind of loop?

Thank you very much.

1 Like

That is a really good question. I wanted to do a similar thing and I was not able to do it because of the same reason. I hope that someone can help.

1 Like

Hi @Alejandro_San_Pedro, hi @Gato, welcome to the forum!

If you can’t say for certain where exactly the loop stops, I’d suggest starting with the bare minimum, i.e. the loop itself, to make sure it works on its own. If it does, add the creation of empty notes (just for testing purposes). If that works, too, add appending the text etc.

Let me know how it goes or if I misunderstood your question, and it’s already an issue with one of AFO’s actions!

Side note: Create Note supports gracefully doing nothing when the note already exists; if you make use of that, you could simplify the Check For Existence Of Note + If/Then setup with an unconditional Create Note + Append Text To A Note.

Thank you for your answer. I could finally make the loop works but now im facing another issue…this is more a general shortcut question but…is there anyway to continue with a date loop if an a If statment is not?

Imagine that i have one range of dates and im increasing that date everytime i do something. Inside that loop I have an if statement that says:

If (repeat index) has any value:
Do whatever
End if

And then i have more actions….

The issue here is that if that if that repeat index is empty the loop stops and it does not continue with the date loop. Any suggestions?

Thank you very much.

The repeat index can’t be empty… if it were, you’d be outside the loop. The repeat item might be, though.

A screenshot might help me get a better understanding, I think!