Skip to main content

Webflow Scripts

Download

Download Webflow Scripts — zip containing the script and README.

Resources for the Webflow-hosted pacing.agency site, split into three areas:

SectionWhat's in it
Snippets & HacksSmall HTML embeds and page-level scripts — back button, nav highlighting, scroll-to-top, and more.
MCP PromptsCursor AI prompts for SEO audits, keyword optimisation, style refactoring, and slider building.
CMS Scripts (below)Python scripts for backing up, exporting, and syncing Webflow CMS data.

CMS Backup & Export Scripts

Python scripts using the Webflow library. Run from the repo root.

Install the Webflow library:

pip install --user webflow

backup_cms.py

Backs up all CMS collections and items to a timestamped JSON archive.

python3 scripts/resources/webflow/scripts/backup_cms.py

Output: backups/backup-YYYYMMDD-HHMMSS/ — site info, all collections with schemas, all items, and a backup manifest.


scrape_all_data.py

Full data export across all endpoints accessible with read-only permissions.

python3 scripts/resources/webflow/scripts/scrape_all_data.py

Output: exports/export-YYYYMMDD-HHMMSS/ — site info, CMS, pages, assets, forms, components, comments, config, activity, and an export manifest.


import_cms.py

Restores CMS data from a backup. Currently read-only — shows what would be imported without writing.

python3 scripts/resources/webflow/scripts/import_cms.py backups/backup-20251209-120000

Write permissions required to actually import.


sync_blog.py

Syncs published blog posts from Webflow CMS to Docusaurus as MDX files with optional Gemini AI rewriting.

./scripts/resources/webflow/scripts/run-sync.sh

Features:

  • Fetches only published posts (not drafts or archived)
  • Uses /live endpoint for full published content
  • Converts HTML to Markdown; downloads and optimises images
  • Gemini AI enhancement (requires GEMINI_API_KEY) — rewrites in Pacing tone, British English
  • Never overwrites existing posts; full error logging

Output: docusaurus/blog/YYYY-MM-DD-slug.mdx · docusaurus/static/img/blog/

Requirements: WEBFLOW_API_KEY (required) · GEMINI_API_KEY (optional) · Python 3.7–3.13


API Key Setup

Store WEBFLOW_API_KEY in the root .env file. Read-only permissions cover: Assets, CMS, Comments, Components, Forms, Pages, Sites, site activity, and site config.

Never commit API tokens to version control.