Actions icon indicating copy to clipboard operation
Actions copied to clipboard

Action proposal: Split/partition list of items to smaller lists/groups with a maximum size

Open somelinguist opened this issue 2 years ago • 2 comments

Description

Hello,

Would it be possible to have an action that takes an input list, then splits/partitions the items in the list into smaller lists that have a maximum size, and return the resulting lists?

As an example use case: I would like to take a large list of email addresses that subscribe to a newsletter, split the list into smaller lists that have a maximum size of N, and return the smaller lists/batches of emails to process in subsequent actions.

Thanks for the great app!

somelinguist avatar Jan 10 '23 17:01 somelinguist

This is a good idea, but currently not possible as the Shortcuts app crashes if it receives a nested array: https://github.com/feedback-assistant/reports/issues/377

I think the action should be called Chunk List.

sindresorhus avatar Jan 13 '23 10:01 sindresorhus

Thanks for the info!

somelinguist avatar Jan 13 '23 15:01 somelinguist