Webflow publishing creates draft CMS items in the collection you choose. PageOptimized verifies the collection before saving the connector.
Official Webflow references:
- Get collection details: https://developers.webflow.com/data/reference/cms/collections/get
- Create collection items: https://developers.webflow.com/data/reference/cms/collection-items/staged-items/create-item
- List collection items: https://developers.webflow.com/data/reference/cms/collection-items/staged-items/list-items
Before you start
- Confirm you have access to the Webflow workspace and site.
- Confirm the site has a CMS collection for blog posts or content pages.
- Confirm you can create API tokens for the site or workspace.
- Open PageOptimized in another tab.
- Go to the project.
- Open Publishing > Connections.
- Find the Webflow card.
Step 1: create or copy a Webflow API token
- Open Webflow.
- Open the workspace or site settings area where API access is managed.
- Create a new API token for PageOptimized, or copy an existing token created for this workflow.
- Give the token CMS read permission.
- Give the token CMS write permission.
- Copy the token.
- Store it somewhere secure until you paste it into PageOptimized.
Step 2: copy the collection ID
- Open the Webflow CMS collection that should receive drafts.
- Open the collection settings or API details.
- Copy the collection ID.
- If you use the Webflow API, you can also retrieve collection details from the collections endpoint and copy the collection ID from the response.
- Do not use the site ID as the collection ID.
- Do not use the collection display name as the collection ID.
Step 3: confirm field slugs
PageOptimized always sends these Webflow fields:
- name: the CMS item name.
- slug: the CMS item slug.
- Your body field slug: the article body.
- Your excerpt field slug, if you provide one: the meta description or summary.
To find the field slugs:
- Open the collection settings in Webflow.
- Open the fields list.
- Find the rich text field where article body content should go.
- Copy its field slug, not its display label.
- Paste that value into Body field slug in PageOptimized.
- Find the plain text or text area field used for summaries.
- Copy its field slug.
- Paste that value into Excerpt field slug if you want excerpts synced.
- If you do not use an excerpt field, leave Excerpt field slug blank.
Step 4: save in PageOptimized
- Return to PageOptimized.
- Paste the API token into API token.
- Paste the collection ID into Collection ID.
- Paste the body field slug.
- Paste the excerpt field slug if you use one.
- Leave Require approval on if drafts should need approval before Xavier creates them.
- Click Save Webflow.
- PageOptimized verifies the collection through the Webflow API.
- Click Create draft item.
- Open Webflow CMS.
- Confirm a draft CMS item appears in the selected collection.
What PageOptimized sends when creating a draft
- isArchived is false.
- isDraft is true.
- fieldData.name is the article title.
- fieldData.slug is the article slug.
- fieldData for the body slug is the article content.
- fieldData for the excerpt slug is the summary if an excerpt slug is configured.
Troubleshooting
- If Save Webflow fails, confirm the token has CMS read permission.
- If Create draft item fails, confirm the token has CMS write permission.
- If Webflow returns a collection error, check that you pasted the collection ID, not the site ID.
- If Webflow returns a field error, confirm the body and excerpt values are field slugs.
- If the draft appears in the wrong collection, copy the intended collection ID again.
- Check the Audit Logs tab in PageOptimized for the exact Webflow response.