Scripting changing perspectives in sidebar

I’d like to create presets to be triggered from toolbar of specific Perspectives that show in the Perspectives sidebar. Is there a way to automate the starring of the perspectives to be included in the sidebar from the Perspective window?

I’ve looked at the Automation API and could find anything directly spiking that out.

I used Keyboard Maestro to create floating palettes that group similar perspectives together.

I had so many perspectives that I want to find a way to group workflows together. I have a daily inbox KM floating palette to go through my various inboxes. Then I have a daily review floating palette that allows me to see all the perspectives I use to go through my end-of-day daily review.