Text page
Welcome to the second unit of the “Expanding my first scenario” course.
You will notice that your scenario is really starting to expand. In the previous unit, you learned how to implement a router into your scenario.
This was an important step as it outlines the aim for this unit: add a filter.
As in the previous units, ensure that you have your Make Foundation Use Case open.
You will be adding more to it in this session!
Text page w/landscape image
A filter is a tool that allows specific data to be passed – or restricted, within the flow of a scenario.
Filters will provide you with an idea of how to start controlling and manipulating data. For example:
A social media account could generate and save posts if they contained the words make.com.
To describe this in real-world terms, is to think of attending a concert: only those with a ticket will be allowed in. Those without a ticket cannot enter.
Your filter here would be: if person has a ticket → let them in.
TABBED SEQUENCE LANDSCAPE INTRO TEXT
There are so many possibilities with what you can filter in Make. These are called operators.
Let’s explore the four most common operators.
Basic operators
Data will be passed through the filter if it does / does not exist.
Example: pass data in your scenario if the word Make exists in an email address.
Text operators
Text operators give us many options to work with. Let’s use the example of a social media post:
A scenario watches a social media account for posts, and can filter data that contains text:
- Equal to: “Make Academy”, or
- Contains the word: “Make Academy” or
- Does not contain the word: “Make Academy” or
- Starts with the word: “Hello”
Numeric operators
Numeric operators are useful for returning numeric values. Let’s consider the use of your Make Foundation scenario:
Your scenario watches the weather, and can filter data based on the temperature if it is:
- Equal to: 20 degrees, or
- Greater than: 20 degrees, or
- Less than: 15 degrees, or
- Greater than or equal to: 25 degrees, or
- Less than or equal to: 10 degrees
Datetime operators
Datetime operators will filter results based on a defined time. As an example, imagine you have an e-commerce store:
You want to filter orders made outside of your working hours, so you can prioritize them the next day.
You could filter:
- Later than: 5PM, or
- Earlier than: 7AM, or
- Later than or equal to: 5PM (this would be useful for any orders made at exactly 5PM)
Text page w/landscape image
For the purpose of this next exercise, you will need to add two more sheets to Google Sheets. Open your Google Sheet named Make Foundation Use Case, and add two additional sheets. Name these Above 20 and Equal to or below 20. You will find out why shortly.
CAROUSEL - 6- IMAGE - PORTRAIT
The following stages will illustrate how to add a filter.
Ways to add a filter
Filters can be added in two ways.
- Left-click on any route between two modules. This will automatically load the filter prompt.
- Right-click on any route between two modules. Select Set up a filter.
Configuring your filter - notes
This brings up the filter configuration screen.
The first editable field is Label.
This is not a required field, but it is strongly suggested that you add a label. It can be a name or description which will be reflected on the scenario interface.
Labels make your filters more organized, which makes your life easier in case you need to make any changes to your scenario later.
Add a label here called Temperature above 20.
Adding conditions + data types
Next you are going to add a condition. As the label suggests, you want to add a condition that temperature is above 20.
In the first condition field, map Temperature. Here you will see other items that can be mapped as part of the filter.
NOTE: It is useful to know what kind of data type you are working with for your filters. Hover over the field that you want to map to find out the data type. In the case here you know that temperature is a numeric value, this is shown in the format of
<number>.
Other values here can be <date> and <text> for example. You will learn more about data types in the Make Basics learning path.
Selecting an operator
Next select the dropdown below the field that you have mapped.
By default this will display as Text operators: Equal to:
Scroll down to Numeric operators: Greater than. Click this in order to populate the operator field. You can also search for your required operator by typing in the search field.
Finally in your last field, type 20.
Click OK. Make sure that you save your scenario.
Changing the destination of our course
The final step is to open our first Google Sheets → Add a row module.
On the configuration screen, navigate to Sheet Name. You will notice in here there are now 3 sheets - Sheet 1 / Above 20 / Equal to or below 20.
Select Above 20, and then click OK.
Remember to save your scenario.
Text page w/landscape image
Here is how your scenario should look now: you’ll notice that the settings icon has changed from a wrench to a filter.
Your scenario should begin with a Weather module (Get current weather) connected to a Router. From the Router, there are two paths. The first path has a filter for “Temperature above 20” and leads to a Google Sheets module (Add a Row). The second path has a filter for “Temperature less than or equal to 20” and leads to another Google Sheets module (Add a Row).
For your next task, add a filter to the second module that adds temperature less than or equal to 20.
You have now enhanced your scenario by adding filters - it will process information to two different sheets based on the values that you have specified - click Run once and see it in action! Go to your Google Sheet to see what happened.
Note: here would be a great opportunity to try using the Auto-align / Explain flow tool in your scenario.
This will give you an idea of the order in which your automation will be processed.
Text page
This concludes your unit on filters. You have covered a lot here and are really starting to unlock the potential of Make.
By now you should have an understanding of:
- What are filters
- What kind of data can be filtered
- How to add and configure a filter
You will expand even further on filters in the next unit.
When ready, start the following unit More options with filters.