Webflow CMS Skill
Credentials
- API Token:
WEBFLOW_API_TOKEN environment variable
- Site ID:
WEBFLOW_SITE_ID environment variable
- Site:
Image Upload Workflow
OPTION 1: Webflow Native (PREFERRED — but requires asset upload permission)
const { WebflowClient } = require('webflow-api');
const fs = require('fs');
const client = new WebflowClient({
token: process.env.WEBFLOW_API_TOKEN
});
async function uploadAsset(filePath, fileName) {
const fileBuffer = fs.readFileSync(filePath);
const arrayBuffer = fileBuffer.buffer.slice(
fileBuffer.byteOffset,
fileBuffer.byteOffset + fileBuffer.byteLength
);
return await client.assets.utilities.createAndUpload(
process.env.WEBFLOW_SITE_ID,
{ file: arrayBuffer, fileName }
);
}
⚠️ NOTE: The Personal Access Token may not have asset upload permissions (401 Unauthorized). If this fails, use Zernio workaround below.
OPTION 2: Zernio Workaround (RECOMMENDED when native fails)
# 1. Upload to Zernio
zernio media:upload /path/to/image.jpg
# Returns: {"url": "https://media.zernio.com/temp/..."}
# 2. Use the Zernio URL in Webflow PATCH
curl -X PATCH "https://api.webflow.com/v2/collections/<ID>/items/<ITEM_ID>" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{"fieldData": {"cover": {"url": "https://media.zernio.com/temp/..."}}}'
Collections
Museums Collection
- Collection ID:
<COLLECTION_ID>
- Fields: name, slug, museum-description, cover (Image), article (RichText), url-naar-collectie (Link), city (PlainText), pic-1 (Image)
- Item IDs: See museums section below
Events Collection
- Collection ID:
<COLLECTION_ID>
- Fields: name, date-time, location, location-link, gallery, cover-image (Image), event-short-description, event-description, google-maps-embed (RichText), event-passed
Arts Collection
- Collection ID:
<COLLECTION_ID>
- Fields: title, slug, category, image (Image), description
FAQs Collection
- Collection ID:
<COLLECTION_ID>
Common Operations
# List collections
curl -s "https://api.webflow.com/v2/sites/<SITE_ID>/collections" \
-H "Authorization: Bearer <TOKEN>"
# Get items
curl -s "https://api.webflow.com/v2/collections/<COLLECTION_ID>/items?limit=20" \
-H "Authorization: Bearer <TOKEN>"
# Update item (PATCH)
curl -s -X PATCH "https://api.webflow.com/v2/collections/<COLLECTION_ID>/items/<ITEM_ID>" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{"fieldData": {"field-slug": "value"}}'
# Update image field
curl -s -X PATCH "https://api.webflow.com/v2/collections/<COLLECTION_ID>/items/<ITEM_ID>" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{"fieldData": {"cover": {"url": "https://..."}}}'
# Publish site
curl -s -X POST "https://api.webflow.com/v2/sites/<SITE_ID>/publish" \
-H "Authorization: Bearer <TOKEN>" \
-H "Content-Type: application/json" \
-d '{}'
Museums (11 items)
| ID |
Naam |
City |
<ITEM_ID> |
Stedelijk Museum Amsterdam |
Amsterdam |
<ITEM_ID> |
Collectie Gelderland |
Arnhem |
<ITEM_ID> |
Fries Museum |
Leeuwarden |
<ITEM_ID> |
Museum Boijmans Van Beuningen |
Rotterdam |
<ITEM_ID> |
Museum De Lakenhal |
Leiden |
<ITEM_ID> |
SCHUNCK |
Heerlen |
<ITEM_ID> |
Museum Het Valkhof |
Nijmegen |
<ITEM_ID> |
Rijksmuseum Twenthe |
Enschede |
<ITEM_ID> |
Stedelijk Museum Schiedam |
Schiedam |
<ITEM_ID> |
TextielMuseum |
Tilburg |
<ITEM_ID> |
Museum Het Domein |
Sittard |
Events (5 items)
| ID |
Naam |
Gallery |
Date |
<ITEM_ID> |
Heem |
Fries Museum |
28 Apr 2024 – 27 Apr 2025 |
<ITEM_ID> |
33 1/3 RPM |
De Vishal |
7 Sep – 13 Oct 2024 |
<ITEM_ID> |
Copilot, Voice and Vision |
Galerie Fons Welters |
2 Nov – 21 Dec 2024 |
<ITEM_ID> |
Connecting Threads |
GPS Gallery |
9 Jan – 17 Jan 2026 |
<ITEM_ID> |
Art Rotterdam 2026 |
Rotterdam Ahoy |
27 – 29 Mar 2026 |
Error Codes
- 401: Invalid token or no asset upload permission
- 404: Collection/item not found
- 429: Rate limited — wait 60s
- validation_error: Missing required field
Notes
- Image fields use
{"url": "..."} format, not plain URL string
- RichText fields need valid HTML
- Asset upload via native API may fail with 401 if token lacks permissions → use Zernio workaround
1---2name: webflow-23description: Operate Webflow CMS for Weblyfe client sites, including collections, item updates, image fields, publishing, and asset-upload fallbacks.4---56# Webflow CMS Skill78## Credentials9- **API Token**: `WEBFLOW_API_TOKEN` environment variable10- **Site ID**: `WEBFLOW_SITE_ID` environment variable11- **Site**: <webflow-site-domain>1213## Image Upload Workflow1415### OPTION 1: Webflow Native (PREFERRED — but requires asset upload permission)1617```javascript18const { WebflowClient } = require('webflow-api');19const fs = require('fs');2021const client = new WebflowClient({22 token: process.env.WEBFLOW_API_TOKEN23});2425async function uploadAsset(filePath, fileName) {26 const fileBuffer = fs.readFileSync(filePath);27 const arrayBuffer = fileBuffer.buffer.slice(28 fileBuffer.byteOffset,29 fileBuffer.byteOffset + fileBuffer.byteLength30 );3132 return await client.assets.utilities.createAndUpload(33 process.env.WEBFLOW_SITE_ID,34 { file: arrayBuffer, fileName }35 );36}37```3839**⚠️ NOTE:** The Personal Access Token may not have asset upload permissions (401 Unauthorized). If this fails, use Zernio workaround below.4041### OPTION 2: Zernio Workaround (RECOMMENDED when native fails)4243```bash44# 1. Upload to Zernio45zernio media:upload /path/to/image.jpg46# Returns: {"url": "https://media.zernio.com/temp/..."}4748# 2. Use the Zernio URL in Webflow PATCH49curl -X PATCH "https://api.webflow.com/v2/collections/<ID>/items/<ITEM_ID>" \50 -H "Authorization: Bearer <TOKEN>" \51 -H "Content-Type: application/json" \52 -d '{"fieldData": {"cover": {"url": "https://media.zernio.com/temp/..."}}}'53```5455## Collections5657### Museums Collection58- **Collection ID**: `<COLLECTION_ID>`59- **Fields**: name, slug, museum-description, cover (Image), article (RichText), url-naar-collectie (Link), city (PlainText), pic-1 (Image)60- **Item IDs**: See museums section below6162### Events Collection63- **Collection ID**: `<COLLECTION_ID>`64- **Fields**: name, date-time, location, location-link, gallery, cover-image (Image), event-short-description, event-description, google-maps-embed (RichText), event-passed6566### Arts Collection67- **Collection ID**: `<COLLECTION_ID>`68- **Fields**: title, slug, category, image (Image), description6970### FAQs Collection71- **Collection ID**: `<COLLECTION_ID>`7273## Common Operations7475```bash76# List collections77curl -s "https://api.webflow.com/v2/sites/<SITE_ID>/collections" \78 -H "Authorization: Bearer <TOKEN>"7980# Get items81curl -s "https://api.webflow.com/v2/collections/<COLLECTION_ID>/items?limit=20" \82 -H "Authorization: Bearer <TOKEN>"8384# Update item (PATCH)85curl -s -X PATCH "https://api.webflow.com/v2/collections/<COLLECTION_ID>/items/<ITEM_ID>" \86 -H "Authorization: Bearer <TOKEN>" \87 -H "Content-Type: application/json" \88 -d '{"fieldData": {"field-slug": "value"}}'8990# Update image field91curl -s -X PATCH "https://api.webflow.com/v2/collections/<COLLECTION_ID>/items/<ITEM_ID>" \92 -H "Authorization: Bearer <TOKEN>" \93 -H "Content-Type: application/json" \94 -d '{"fieldData": {"cover": {"url": "https://..."}}}'9596# Publish site97curl -s -X POST "https://api.webflow.com/v2/sites/<SITE_ID>/publish" \98 -H "Authorization: Bearer <TOKEN>" \99 -H "Content-Type: application/json" \100 -d '{}'101```102103## Museums (11 items)104| ID | Naam | City |105|----|------|------|106| `<ITEM_ID>` | Stedelijk Museum Amsterdam | Amsterdam |107| `<ITEM_ID>` | Collectie Gelderland | Arnhem |108| `<ITEM_ID>` | Fries Museum | Leeuwarden |109| `<ITEM_ID>` | Museum Boijmans Van Beuningen | Rotterdam |110| `<ITEM_ID>` | Museum De Lakenhal | Leiden |111| `<ITEM_ID>` | SCHUNCK | Heerlen |112| `<ITEM_ID>` | Museum Het Valkhof | Nijmegen |113| `<ITEM_ID>` | Rijksmuseum Twenthe | Enschede |114| `<ITEM_ID>` | Stedelijk Museum Schiedam | Schiedam |115| `<ITEM_ID>` | TextielMuseum | Tilburg |116| `<ITEM_ID>` | Museum Het Domein | Sittard |117118## Events (5 items)119| ID | Naam | Gallery | Date |120|----|------|--------|------|121| `<ITEM_ID>` | Heem | Fries Museum | 28 Apr 2024 – 27 Apr 2025 |122| `<ITEM_ID>` | 33 1/3 RPM | De Vishal | 7 Sep – 13 Oct 2024 |123| `<ITEM_ID>` | Copilot, Voice and Vision | Galerie Fons Welters | 2 Nov – 21 Dec 2024 |124| `<ITEM_ID>` | Connecting Threads | GPS Gallery | 9 Jan – 17 Jan 2026 |125| `<ITEM_ID>` | Art Rotterdam 2026 | Rotterdam Ahoy | 27 – 29 Mar 2026 |126127## Error Codes128- **401**: Invalid token or no asset upload permission129- **404**: Collection/item not found130- **429**: Rate limited — wait 60s131- **validation_error**: Missing required field132133## Notes134- Image fields use `{"url": "..."}` format, not plain URL string135- RichText fields need valid HTML136- Asset upload via native API may fail with 401 if token lacks permissions → use Zernio workaround