How to set up correct filters for Creating and Updating items in Webflow CMS

:bullseye: What is your goal?

I want to connect LetsReg events (https://www.letsreg.com/no/) with a Webflow CMS collection. My goal is to get the Webflow CMS automatically populated with the event information from LetsReg.

:thinking: What is the problem?

My problem lies with setting up filters correctly:

  • When to Update a CMS item
  • When to Create a CMS item

Also, my second problem is to avoid CMS items get duplicated.

:test_tube: What have you tried so far?

I have created a successful flow where the CMS gets populated with correct event data. That works perfectly. As soon as I start trying out different options to get the conditional logic working - I hit a wall. I’ve been trying to use “Event ID” (LetsReg ID) as the filter by which the flow should check whether this CMS item exists in the CMS or not.
If this “Event ID” exists in the CMS collection - update the item
If this “Event ID” doesn’t exist in the CMS collection - create the item.

So far, I managed to create a flow with a working filter that block creation of new CMS items if the “Event ID’s” match but I’m sure it’s not an ideal flow as I can’t create a second route with the update item.

I tried with an Array Aggregator + Webflow List Items - couldn’t get the filters to work.
I tried with a Text Aggregator _ Webflow List Items - I got the filter to work but now I can’t add the “Update CMS Item” to work as it requires an ID from the CMS Item.

I’ve uploaded screenshots with flows where I use the Text Aggregator and the Array Aggregator.

:camera_with_flash: Screenshots: scenario setup, module configuration, errors



You can like keep this with only the Text Aggregator. You can update your filters to contains and does not contains toString(Iterator > event_id)but you need to add something inside the update flow to filter by event_id

Hi Karmic!
Thank you for your response.

Yep, that’s what I had in filters. But I don’t understand what I should add to the “Webflow Update an Item” module, particularly in the “Item” field since I don’t have it as one of the options.

If I use the “Array Aggregator” instead of the text aggregator, then I have the “Item ID” from the Array Aggregator to map to this field “Item”.

You can like do it like this with a new flow: (Replace your Text Aggregator with Iterator)

Trigger > Iterator (LetsReg Events) > Search Webflow (EventID) & Add Filter (EventID) > Router > Route 1: Update Item (EventID >= 1) > Route 2: Create Item (EventID = 0)

Karmic,

Not sure I understand the flow now. You said to substitute the “Text Aggregator” with the “Iterator” but in the flow you don’t have a second iterator. Am I missing something?
Also, “Search Webflow” doesn’t exist as a module in make, unfortunately