Unit introduction
Welcome to unit three of the “Introduction to operations and credits” course.
In the previous unit, we briefly covered bundles. Now, you’ll take a closer look at what they are and how they work. Bundles are one of the most integral parts of Make, they help to organize the data that our scenarios use.
In this unit you will explore:
- what a bundle of data is in Make
- examples of bundles that have already been used so far
- input bundles vs. output bundles
- how bundles are made up of individual items
What is a bundle?
You’ll see the term bundle a lot while building your scenarios, so it’s useful to define it. A bundle is a single package of data that moves through your scenario when it runs.
Think of it like this:
- If you’re sending a list of emails, each email is a bundle. Each bundle might include the recipient’s address, subject line, message content, and the date it was sent.
- If you’re working with a spreadsheet, each row is a bundle. A bundle could contain fields like name, email address, signup date, and status.
It’s a small package of data, made up of individual items, that flows through your scenario.
Let’s take a closer look at what bundles look like.
Bundles flow between modules in a scenario. For instance, a Weather module (Get current weather) might process information and pass a single bundle of data to a Google Sheets module (Add a Row). This single bundle then continues to flow through the scenario, potentially to a Router for further operations.
What does a bundle look like?
Let’s start by looking at what you have already created – open your Make Foundation use case, and click Run once.
This will execute the scenario and generate one or several bundles.
Clicking the (1) icon next to the Weather app will display the execution phases of the processed bundle. For example, a scenario might look like this:
In this example, a Weather module (Get current weather) sends data to a Router. The Router then directs the data to two separate Google Sheets modules (Add a Row), based on conditions like “1st: temperature above 20” and “2nd: temperature below 10”.
Note that within operations for the Weather app, there will be a single bundle. This will contain the input and the output.
In this example, the input bundle displays the options selected for location type (cities), and the city itself. The output bundle contains the result of the options you selected on the input bundle query.
Each output bundle contains items that can be mapped, e.g. temperature, description.
With other apps, if you perform multiple operations, you see multiple input and output bundles.
Execution Phases
The execution of a scenario involves several distinct phases:
- Initialization: Make starts the scenario execution after successfully fetching a bundle of data.
- Operation: Modules process the data bundle sequentially, executing all actions (e.g., reading, transforming, writing).
- Commit: If all operations succeed without error, the source data is marked as processed, and all changes are finalized in the target systems.
- Finalization: The run is logged as a success, resources are released, and the system waits for the next data bundle.
A closer look at bundles
As you can see from the bundle of the Weather app, there is an input and output contained in a single operation.
Think of the input and output bundle of each module as what you put in (the settings for the module) vs what you get out (the result).
For example if I put my dirty laundry bundle (input) into the washing machine (module), the output will be a bundle of clean clothing (output).
The items are the individual elements that make up the bundle. For example if the bundle is a laundry basket, then the items within the bundle are the T-shirts, trousers, socks etc.
The input
The Weather app is a great starting point for understanding the input of a bundle. The module settings require you to specify the location type (cities or coordinates) and your city. This gives the Weather app the information it needs to retrieve the output data.
Here’s an example of an input bundle:
INPUT
Bundle 1: (Collection)
City: London, UK
I want to enter a location by: name
If you select the operation above your Google Sheets → Add a Row module, the input will look drastically different: but it should look familiar. It will match the settings that you earlier defined in the module; e.g. the spreadsheet ID/name, the mapped values etc.
Note: Not all modules will show an input bundle. For example a Google Forms module will only provide an output. This is because it is searching for data from an external source.
The output
Next we should review the output bundle of the Weather app. You will notice many more options available to you: temperature, wind, cloudiness, sunrise, description etc.
These should look familiar to you - they are the items that you mapped earlier!
Here’s an example of an output bundle:
OUTPUT
Bundle 1: (Collection)
Coordinates: (Collection)
Temperature: 0.48
Atmospheric pressure: 1033
Air humidity: 94
Wind: (Collection)
Cloudiness: 100
Sunrise: 25 January 2023 07:49
Sunset: 25 January 2023 16:35
Status: Haze
Code: 721
Description: haze
Icon: http://openweathermap.org/img/w/50d.png
The output bundle contains all the mappable items that can be used in subsequent modules. These include:
- Coordinates
- Sunrise
25 January 2023 07:49 - Sunset
25 January 2023 16:35 - Temperature
0.48 - Atmospheric pressure
1033 - Air humidity
94 - Wind
- Cloudiness
100 - Rain
- Snow
- Code
721 - Status
Haze... - Description
haze - Icon
http://openweathermap.org/img/w/50d.png
Look at the output bundle for the Google Sheets → Add a Row module. This will look slightly different – it provides detailed information of each row that has been added.
Downloading bundles (optional)
It’s worth noting that you are able to download the JSON of your input / output bundles.
To do so, click the download icon and select download input/output bundles.
This will allow you to copy / paste the JSON data.
This will be explored further in the Make Advanced course!
Bundles – use case
Let’s see bundles in action on this use case; this scenario is designed to collect user feedback data from a Google Form which asks users to rate their satisfaction of their customer experience. They are asked in the form “how would you rate your customer experience out of 5”, as well as provide their email address.
If the user rating is 2 or lower, the details are mapped to a message and the customer experience team are notified immediately on Slack.
Google Forms
For this demo we have filled out the form 5 times. In 3 responses the user’s satisfaction rating is 2 or lower.
When the scenario is executed, it will produce 5 bundles = 1 bundle per form filled out.
Each bundle will contain a response from each user in the form of items: the time, the row number within the spreadsheet, the users email address, etc.
NOTE: The Watch Responses module will only perform one operation and consume one credit.
Filter
The filter has been configured to pass any rating that is less than or equal to 2.
Once the scenario has been executed, only 3 bundles will be passed through the filter.
If the bundle has a green tick next to it, then the criteria has been met and the data has been passed along the scenario.
NOTE: No credits are consumed for filtering data.
Slack
Finally, the Slack module output is split into 3 separate operations, one for each bundle that passed the filter.
Selecting one of these operations will show you the input and output bundles for it.
The input here is what has been created / mapped within the Slack module: the message and the channel it should go to.
The output here is a summary of the input, and confirms that the operation has been successful. This can be seen by the summary within Slack.
Note: This module consumed three credits.
Why are bundles so useful?
By now, you have learned what a bundle is, what an item is, and how bundles move through your scenario each time it runs.
Bundles and items are a crucial part of furthering your skill set with Make. They can be manipulated to fulfill a huge range of scenarios.
You’ll start working with bundles more actively in the upcoming Make Basics learning path. For now, let’s continue exploring other essential parts of building scenarios.
Wrap up
A bundle is a small package of data made up of individual items that flows through your scenario. For example, one email in a list or one row in a spreadsheet is a bundle.
Each module in Make works with input bundles (what you provide) and output bundles (the results). Bundles are made up of individual items, which are the separate pieces of data that make up the whole package.