How do I batch Summarize selected notes or a group?

Use a repeat to check each line. If it starts with # (note the space) throw it away. If it doesn’t add it to a list.