What if we could bulk edit everything using the power of a CSV? In this lesson, we’ll cover exporting a CSV, and even importing and updating our Collection based on an updated CSV. Is it magic? It’s certainly close.
This is not Webflow. It’s a screenshot of Webflow. But if I move that out of the way, we can see the actual Webflow. And I have a full site built out here, and over in Collections, I have this rich database of literally everything.
Now let’s say I want to make a bulk change to the data. Can I go just one-by-one and make the changes by myself? I’d be here for days. Thankfully, the world invented Google Sheets and Microsoft Excel and Numbers on macOS.
[Grímur] And iOS. I’m on it now.
[Miguel] So am I.
[Grímur] Always one step ahead of us, Miguel.
[Miguel] No, Grimur. We’re still on step 1. Since we have our starting data here, we can export as is or we can filter our items and only export the items we want. For this example we’ll export the entire collection. And that downloads…a CSV.
Let’s open it on Google Sheets (but this should be similar for all spreadsheet software). And (when we–)
[Grímur] I’m trying to open this in VisiCalc…
[Miguel] Okay, almost all spreadsheet software. But when we do, we can make whatever changes we want. The goal is this: I want these changes to be reflected in Webflow.
So can I do a series of complex calculations and change the data for like 200 of these items.
[Grímur] I’m already doing that with this bluetooth keyboard.
[Miguel] I know. Everyone in the studio knows. But when we’re done with all these changes? Let’s export this as a CSV. Here’s how to do that on Google Sheets.
File… download… CSV.
By the way, if we used Excel, we could do that in Save as… and choose CSV from the dropdown.
In Numbers? We’d choose the export option for CSV. And VisiCalc?
[Grímur] Oh I can save dot dif, dot VC…
[Miguel] Once we’ve saved the CSV, it’s time…to move onto importing. Now, we can import without existing data. In other words, if this was a blank Collection? We could populate it via a CSV that has stuff inside. But since the item IDs were exported and they’re in the new CSV we just saved? Importing THIS CSV shows us the following.
…okay I didn’t click Open.
But when I do, importing this CSV shows us the following:
Do we have a header row? Of course we do. It’s the first row of titles that define/represent the data/fields. Let’s continue. And just like that, Webflow has identified existing content. (It’s matching content based on the item ID.) Again, this is REALLY important. Because Webflow refers to this ID (which got exported a minute ago), and now it says “Hey, this ID in the CSV you’re importing? It matches something you have in here already.”
So. We’ll want to update those items here.
But here’s where we can review our changes and decide not only what data to update (notice how it matches this automatically), but it’s where we can even choose the items to skip.
Now. Here’s the question: do we have to skip the stuff that hasn’t changed? Not really. But on really complex CMS items, it might make sense to skip an import if it’s a super complex thing with tons of data, especially if you’re having to sit through a longer import. (It’s up to you.)
When we’re ready? Import. And like magic, the data is reconciling with the existing Collection data based on what we just told it to do.
And just like that. All those changes we made in the spreadsheet? (The ones we changed/exported in the CSV?) They’re fully updated not only in our Collection, but anywhere we’re referencing that Collection.
But that’s the basic idea.
So. As a way to sort of review, you can repeat the process (and we usually do). Back to exporting? We can export a CSV at any time. We can make our changes in something like Excel…
[Grímur] I’m on Lotus 1-2-3.
[Miguel] Where are you getting all this hardware?!
[Grímur] Hoookay.
[Miguel] And when we save that CSV, we can re-import into Webflow. And based on the fact that the item IDs are the same? We can reconcile and import all those changes into our Collection.
And that’s an overview of exporting, importing, and updating Collections…in the Webflow CMS.