By default, Cloudpress will export all pages from your Notion database when you export the Collection. However, in most cases, you may want to export a limited set of pages.
Let’s take an example where you have configured your Collection to export blog posts from Notion to your CMS and are using a Kanban board in Notion to manage those blog posts.
In the example above, blog posts can move through various stages during their lifetime. Initially, when we have an idea for a blog post, we will add it to the Ideas column. Then, when we plan out our content schedule and assign a publication date for a blog post, we move it to the Up next column.
Once a writer picks up a blog post and starts writing it, it will be moved to the In progress column. Finally, when the blog post is done, and we are ready to export it, it will be moved to the Done column.
Understandably, we would only want to export items in the Done column and not any other items in the database.
Specify a filter
To specify a filter for a Collection, open the Collections page in Cloudpress and clicking on the collection. Navigate to the Filter tab.
You create a filter by adding a condition or a set of conditions. Click on the Add condition button to add a new condition. Each condition consists of three sections:
- The property dropdown allows you to select the Notion database property you want to filter by. Cloudpress supports adding filters for Notion select, multi-select, status, and rich text properties.
- The operator allows you to select the condition operator and depends on the property type.
- The value field allows you to specify the value you want to match against. Depending on the type of property, this may be a text field allowing you to type any value or a dropdown allowing you to select from a set of predefined values.
Using the blog example above, you can select the Status field, the is operator, and the Done value. This states that we want to filter items where the “Status is Done”
Finally, you can click the Save Changes button to save your filter.
Preview your filter
Cloudpress allows you to preview your filter to ensure that the filter criteria you specified is correct. To do this, click the Preview Filter button. Cloudpress will inform you of the number of items returned by your filter and well as display a list with the items that match the filter criteria.
Specify complex filters
You can specify complex filters by adding additional criteria or filter groups. Suppose you want to update your filter so only blog posts that are done by the author “Jill Anderson” are exported. You can add a second condition by clicking on the Add condition button again and entering the criteria for the second filter condition.
You will also see a condition combinator - “AND” or “OR”. If you select “AND”, both conditions must be met. If you specify “OR”, then either of the conditions must be met.
You can specify even more complex criteria by adding a condition group. Suppose we want to include blog posts where the status is either “Done”, or the status is “In Progress” for the author “Jill Anderson”.
To do this, you can add the first condition and then add a group by clicking the Add group button.
An empty condition group is added, and you can click the Add condition button inside the group to add conditions to that group. The final filter for the criteria specified above is as follows:
Deleting conditions and groups
You can remove a condition from the filter by clicking the trashcan icon next to the condition.
Likewise, you can removed a group from the filter by clicking the trashcan icon next to the group.