# Webflow Integration

> Part of the [NextBlog documentation](https://nextblog.ai/docs.md). Live page: [https://nextblog.ai/docs/integration-webflow](https://nextblog.ai/docs/integration-webflow)

Push content to Webflow CMS collections with designer-friendly formatting. This integration creates items in your Webflow CMS automatically.

#### Prerequisites

Before you begin, make sure you have:

- A Webflow account with CMS access
- A Webflow site with a CMS collection set up for blog posts
- API access enabled for your site

### Step 1: Generate API Token in Webflow

#### 1.1 Visit Webflow Account Settings

1. Log into your Webflow account
2. Click on your profile icon in the top right
3. Select **"Account Settings"**

#### 1.2 Navigate to API Access

1. Log into your Webflow site settings like `https://webflow.com/dashboard/sites/YOUR_SITE/integrations`
2. In the left sidebar, click on **"Apps & Integrations"**
3. Scroll down to the **"API access"** section

#### 1.3 Generate API Token

1. Click the **"Generate API token"** button
2. Enter a name: `NextBlog Integration`
3. Select "Read & Write" permissions for the **"CMS"** scope
4. Click **"Generate Token"**
5. **Important:** Copy the API token immediately and save it securely. You won't be able to see it again!

### Step 2: Get Your Collection ID

#### 2.1 Open Webflow Designer

1. Log into your Webflow account
2. Open your site in the Webflow Designer

#### 2.2 Navigate to CMS Collections

1. In the left sidebar, click on **"CMS"**
2. Select your blog collection (or create a new one if needed)

#### 2.3 Get Collection ID

The Collection ID can be found in several ways:

- In the collection settings, look for the Collection ID field
- In the URL when viewing the collection: `https://webflow.com/design/site-name/collections/COLLECTION_ID`
- In the Webflow API documentation for your site

**Note:** The Collection ID is a long string of characters. Copy it carefully.

### Step 3: Set Up CMS Collection Fields

#### Required CMS Fields

Your Webflow CMS collection should have these fields (create them if they don't exist):

- `name` - Plain text field (required, for post title)
- `slug` - Plain text field (for URL slug)
- `post-body` - Rich text field (for post content)
- `post-summary` - Plain text field (for excerpt/description)
- `main-image` - Image field (for featured image, optional)

**Note:** Field names may vary. Adjust them in NextBlog settings if your collection uses different field names.

### Step 4: Configure Webflow Integration in NextBlog

#### 4.1 Navigate to Project Settings

1. Log into your NextBlog dashboard
2. Click on your project to open it
3. Click on **"Settings"**

#### 4.2 Enable Webflow Integration

1. Scroll down to the **"Webflow Integration"** section
2. Toggle the **"Enable Webflow Integration"** switch to ON

#### 4.3 Enter Webflow Credentials

Fill in the following fields:

- **Webflow API Token:** Paste the API token you copied in Step 1.3
- **Webflow Collection ID:** Paste the Collection ID you found in Step 2.3

#### 4.4 Test Connection

1. Click the **"Test Connection"** button
2. Wait for the test to complete
3. If successful, you'll see a green success message
4. If it fails, check your credentials and try again

#### 4.5 Save Changes

Click the **"Save Changes"** button to save your Webflow integration settings.

### How It Works

Once configured, here's what happens when you approve a blog post:

1. **Post Approval:** When you approve a blog post in NextBlog, the Webflow integration is triggered
2. **Content Conversion:** The markdown content is converted to HTML format
3. **Item Creation:** A new CMS item is created in your Webflow collection with:
  - Title in the `name` field
  - Slug in the `slug` field
  - HTML content in the `post-body` field
  - Description in the `post-summary` field
  - Featured image in the `main-image` field (if provided)
4. **Publishing:** The item is created in your Webflow CMS and can be published through your Webflow site

### Troubleshooting

#### Connection Test Fails

**Common issues:**

- **Invalid API token:** Make sure you copied the entire token correctly
- **Wrong Collection ID:** Verify the Collection ID is correct
- **Missing permissions:** Make sure your API token has access to the site and collection

#### Posts Not Publishing

**Check the following:**

- Make sure the integration is enabled in project settings
- Verify the connection test passes
- Check that you're approving posts (not just generating them)
- Verify your CMS collection has the required fields
- Look for error messages in your NextBlog dashboard

### Next Steps

Now that your Webflow integration is set up:

- Generate or create a blog post in NextBlog
- Review and approve the post
- Check your Webflow CMS - a new item should appear automatically!
- Publish the item through your Webflow site
