Capturing the data from org-agenda-list

Hello org-roamers!

One thing I’ve wanted to do for a long time is figure out how to use org-mode items with dates in a way that worked with my current processes. I am not organized around an org mode agenda, but want to incorporate elements of agendizing into my life.

Each month, I start a new file with all sorts of notes I take during that month, lots of ideas and notes and links to other nodes and so forth.

This week, the week with my son’s birthday in it, it occured to me that I could do this: have a recurring item for his birthday in a node about him, and when I create the monthly note file for October, pull in all the items scheduled via org-schedule and org-deadline to fall in October, and put copies of those todos into my new monthly file.

I tried to do this via org-agenda-list, but the only way I could figure out to do it was to run that command, go into it’s buffer, copy the contents, filter the contents for TODOs, and paste the results into my new buffer. But that seems like a stupid way to do it, compared to having the org-agenda-list function, or one like it, just return it’s result so I can process it in the normal functional style.

Has anyone ever tried incorporating info collected up by org-agenda into their own functions?