CSV Export of all CMS Collections at the same time

The script below allows the CSV export of all CMS collections of the currently opened Webflow project. Just run the code below from the console while on the Webflow Designer view.

I’m leaving this more for myself for future reference, but it might be a useful snippet for anyone:

const sleep = (milliseconds) => {
  return new Promise(resolve => setTimeout(resolve, milliseconds))

const collectionMenuEntries  = document.querySelectorAll(`[data-automation-id="cms-collections-list"] > div`)

for await (const menuEntryEl of collectionMenuEntries){
    await sleep(3000);
    const exportButton = document.querySelector(`[data-automation-id="cms-collection-export-button"]`)

Two things to keep in mind:

  1. I’m not sure if Webflow also uses ‘Virtualized lists’ for the list of CMS collections. In case the collectionMenuEntries variable doesn’t hold references to all the CMS collections links, just zoom out your browser as much as you can to the point of you being able to see all the collection lists on your viewport.
  2. I don’t love the hardcoded value of 3000ms value for the sleep in that code. It was a quick and dirty solution and it worked, but given its ‘hardcoded’ aspect, it might not work at all times. Keep that in mind.