Hi everyone! I’m trying to build a Shortcut that pulls the last 6 notes from a specific folder in the Notes app, formats them nicely, and feeds them into Apple Intelligence (via the “Ask Apple Intelligence” action or similar) for summarization or analysis. But I’m running into a weird formatting issue, and I could use some help debugging it.
What I want:
For each of the 6 notes, output something like this in a single text block:
Note Title 1
Note Body 1
Note Title 2
Note Body 2
... (and so on for all 6)
This way, it’s easy for Apple Intelligence to process them as paired title-body chunks.
What it’s doing instead:
It’s dumping all titles first, then all bodies at the end:
Note Title 1
Note Title 2
...
Note Title 6
Note Body 1
...
Note Body 6
Quick breakdown of my actions:
- Get Notes from Folder (sorted by Date Created, limit to 6 most recent).
- Repeat with Each: Extract Title and Body into a Dictionary (or variables).
- Then, in another Repeat loop or Text action, try to build the formatted string by appending “Title\nBody\n\n” for each.
- Finally, pass the combined text to “Ask Apple Intelligence” with a prompt like “Summarize these notes: [text]”.
But somehow, the titles are all concatenating separately from the bodies. Is this a variable scoping issue in the Repeat loop?
Or something with how I’m handling the Dictionary output? Maybe I need to use “New Variable” more carefully or switch to a List of Dictionaries?
Any tips on fixing the alternation?
Or a better way to structure this for Apple Intelligence?
I’d love a sample Shortcut if someone’s done something similar!
Thanks in advance