Webflow: Bulk updating multiple reference fields for CMS items

Hi Parabola Community :wave:t2:

This is my first post. I’ve loved learning from everyone so far & hopefully someone can shed some light on this for me :arrow_down: :bulb:

I’m looking for a way to go through ~1020 CMS items in a collection which are Suburbs , map those suburbs to each other based on a pre-determined dataset I have in Google Sheets here. (they already have latitude, longitude & postcodes too)

All Webflow Item IDs have been mapped and are ready to go, I just haven’t seemed to be able to find a workflow which allows you to do this in one hit – only this Integromat + Zapier + Webflow example Preformatted Text and this Webflow Forum Post which seems to only rely upon someone submitting a form.

The end result is to have every single CMS Item populated like this example one from Bondi Beach (with surrounding suburbs) below:

Hey Frazer,

This should be totally doable.

Looking at your Google sheet, I am assuming that the first 2 columns represent the name of the suburb you want to update, and all subsequent columns are other suburbs to connect to that one.

Something to note is that you have some suburbs, such as Abbotsford, which say they are near by themselves. Logically, I assume you want to remove those, but also I think Webflow will not let you make that circular reference.

First, let’s get those relations into a many-to-many mapping table. Meaning we want 1 row per combination of Suburb and nearby Suburb. At this point, we only need the IDs too.

So do the following:

  1. Use a Column Filter to only keep the ID columns
  2. Use an Unpivot step to unpivot all columns except the 00 Item ID column.

At this point you should have 3 columns - your 00 item ID, a column of other suburb IDs, and a column of the old column headers.

You can use an If/Else step at this point to determine if any row has the same ID in both columns, and then use a Row Filter to remove those.

This data is now representing the relationships of each suburb to each of its surrounding suburbs. Now let’s get this into the format to sent to Webflow. We want every ID that is going to be associated with a certain ID to be in a single cell, all grouped up.

Use a Merge Values step, set it to merge the Value column that contains the related suburb IDs, use a comma without a space after it as the delimiter, and then use the 00 Item ID column as the grouping column in the final section of this step.

This should reduce your row count, and create a column of merged IDs.

Now you can use the Webflow Export to Update those items, mapping the column of merged IDs to your Surrounding Suburbs field.

1 Like

Brian, if I could give you a high five right now I would.

Knowing you can do this kind of thing this easily this has changed everything for us. Thank you so much for taking the time to step things out too.