Collections for Beginners: Making Your Workflow Easier

We all group items in our daily lives, whether it's stamps, coins, books, or even rocks. But what exactly are collections, and how can they make tasks easier? A collection is simply a group of items that are related in some way. Organizing items into collections makes them easier to manage and work with.

In your workflows, you might find yourself needing to work with multiple items at once—like extracting several files from an email attachment, processing a list of files, or reading multiple rows from a Google Sheet. That’s where Zenphi’s collection actions come in. These actions help you loop through these collections, saving you time by processing all the items in a collection at once.

Zenphi’s Collection Actions Explained

Zenphi offers several powerful actions to help you work with collections, whether you need to loop through items, filter them, or group them into smaller collections. In this guide, we’ll explore three key actions: Foreach Item, Parallel Foreach Item, and Query Collection. Plus, we’ve created a YouTube tutorial to walk you through these actions step by step:


  1. Foreach Item Action

    The Foreach Item action lets you go through each item in a collection—like the names of files in a Google Sheet—and perform tasks on them one by one. For example, you could delete shared access to a file, change a file’s name, and more. This action, also known as a Foreach Loop, will complete all the tasks for one item before moving on to the next.
  2. Parallel Foreach Item Action

    But what if you want to process tasks for all your items simultaneously? That’s where the Parallel Foreach Item action comes in. It works like the Foreach Item action but processes all items in the collection at the same time. This is helpful when you have tasks that don’t depend on each other and can be completed concurrently.
    However, it’s important to use Parallel Foreach with caution. Some applications, like Google Sheets, don’t support parallel processing well. If your loop interacts with an application that might struggle with parallelism, it’s safer to stick with the regular Foreach action. A good rule of thumb is to use Parallel Foreach only when you’re certain it won’t cause issues, and when in doubt, go with the Foreach action. To learn more about how to implement the Foreach Loop action instead check out this short video explaining how:
  3. Query Collection Action

    Filtering and grouping items within a collection is a common task—like filtering rows in a Google Sheet based on a specific value in Column C or grouping user files by email. The Query Collection action lets you do just that. With this action, you can modify existing collections to extract crucial information or pinpoint specific items you want to work with.

Getting the Most Out of Zenphi’s Collection Actions

With Zenphi’s collection actions, you can save time and manage your data more effectively. Whether you’re looping through items, processing them in parallel, or filtering and grouping them, these tools are designed to help you get the job done efficiently.