This project provides 4x scripts to manage Webflow CMS items by updating required fields and clearing fields in batch mode. In the rare cases where you have a deeply multi referenced site with a lot of CMS data it can take a long time to untangle.
By getting the collections and removing required fields we can clear every connection within an item and once done just run delete scripts to remove all data completely if needed.
The scripts are rate-limited to avoid hitting Webflow's rate limits.
USE AT YOUR OWN RISK. You are responsible for any data errors and/or manipulations caused on your Webflow site.
- Node.js
- npm
- A Webflow API token
-
Clone the repository:
git clone https://github.com/your-username/webflow-cms-manager.git cd webflow-cms-manager
-
Install the dependencies:
npm install
-
Create a
.env
file in the root directory of your project and add the following:API_TOKEN=your_webflow_api_token SITE_ID=your_webflow_site_id BASE_URL=https://api.webflow.com
This script processes all collections, updates required fields to be not required, and clears fields except for name
and slug
.
npm run clearall
This script processes a specific collection, updates required fields to be not required, and clears fields except for name and slug.
npm run clearspecific -- <collection_id>
This script deletes all items within all collections on the site. It retrieves all collections and their items, then deletes each item one by one. This is useful when you need to clear out all data across your entire Webflow site.
npm run deleteall
This script deletes all items within a specified collection. You need to provide the collection ID as an argument. The script retrieves all items in the specified collection and deletes each item one by one. This is useful when you need to clear out data from a specific collection without affecting other collections.
npm run deletespecific -- <collection_id>
The scripts use the bottleneck
library to limit API requests to 60 requests per minute to stay within Webflow's rate limits.
Feel free to submit issues and pull requests. For major changes, please open an issue first to discuss what you would like to change.