Python
Integrate Python with Webflow's REST API to automate CMS content updates, process form submissions with custom logic, sync e-commerce inventory, and build AI-powered features on external servers.
How to integrate Python with Webflow
Python integration with Webflow handles complex backend logic, external system synchronization, machine learning pipelines, and custom data transformations that Webflow's visual interface can't manage. Webflow generates semantic HTML and handles your frontend while Python processes data, connects to external APIs, manages database operations, and runs automated workflows on your own infrastructure.
Webflow developers integrate Python through three methods. Build with the Webflow API and official Python SDK (webflow-python) for direct programmatic control with synchronous and asynchronous clients. Use automation platforms like Zapier or Make to trigger external Python-powered services and APIs through visual workflow building. Or embed Python-powered widgets or applications through HTML Embed elements and iframes for user-facing functionality.
Build with Webflow and Python API
Install the library via pip or poetry according to the PyPI package documentation:
pip install webflow
Authentication requires a bearer token generated in your Webflow site settings under Integrations > API Access. According to the Webflow Authentication Reference, two token types are available. Site Tokens provide simple single-site access and work best for server-to-server integrations. OAuth Tokens enable multi-site or user-specific access through an OAuth 2.0 flow for applications accessing multiple user accounts.
Common integration patterns include CMS content synchronization from external databases, form submission processing with custom validation logic, e-commerce inventory automation across multiple platforms, and membership management through external authentication systems.
Important: Verify that your Python SDK version matches the Webflow API version you're using. The SDK updates sometimes lag behind API changes. Check the GitHub releases page to confirm compatibility before starting development.
Automate CMS content operations
The CMS API Reference provides create, read, update, delete, and publish operations on collection items. This powers content migration scripts, automated publishing workflows, and synchronization from external content sources.
List all collections using GET /collections, then manage items within each collection using GET /collections/{collection_id}/items for listing, POST /collections/{collection_id}/items for creation, and PATCH /collections/{collection_id}/items/{item_id} for updates.
from webflow.client import Webflow
client = Webflow(access_token="your_api_token")
# List collections
collections = client.cms.collections.list(site_id="site_id")
# Create new item
new_item = client.collections.items.create(
collection_id="collection_id",
field_data={
"name": "Product Name",
"slug": "product-name",
"is-draft": True # Creates as draft by default
}
)
# Update existing item (works on both draft and published items)
updated_item = client.collections.items.update(
collection_id="collection_id",
item_id="item_id",
field_data={"price": 24.99}
)
# Publish items when ready
client.collections.items.publish(
collection_id="collection_id",
item_ids=["item_id"]
)
The isDraft flag controls whether changes appear immediately on your live site. Set isDraft: true to stage changes without affecting published content, then publish when ready. This replaces the older three-step workflow that required unpublishing, updating, and republishing items.
Process form submissions with custom logic
The Forms API Reference provides read-only access to form submissions through GET /forms/{form_id}/submissions. The API cannot create submissions programmatically. Forms must be submitted through Webflow's client-side interface.
Retrieve form submissions using the Webflow Forms API for integration with CRMs, email platforms, or custom databases. Use the client.forms.submissions.list(form_id="form_id") method with the official Webflow Python library to retrieve submissions and integrate them into your preferred platforms.
# List form submissions
form_submissions = client.form_submissions.list(form_id="form_id")
Form submissions from Webflow webhooks require security validation through HMAC signature verification to prove the webhook came from Webflow:
from flask import Flask, request, jsonify
import hmac
import hashlib
import json
app = Flask(__name__)
WEBHOOK_SECRET = 'your_webflow_webhook_secret'
def verify_webhook_signature(payload_body, signature_header):
"""
Verify Webflow webhook signature using HMAC SHA256
Required for all production webhook implementations per Webflow security documentation
"""
computed_signature = hmac.new(
key=WEBHOOK_SECRET.encode('utf-8'),
msg=payload_body,
digestmod=hashlib.sha256
).hexdigest()
return hmac.compare_digest(computed_signature, signature_header)
@app.route('/webhooks/webflow', methods=['POST'])
def handle_webflow_webhook():
# Get raw request body for signature verification
payload_body = request.get_data()
signature = request.headers.get('x-webflow-signature')
# Verify signature as per Webflow security requirements
if not verify_webhook_signature(payload_body, signature):
return jsonify({'error': 'Invalid signature'}), 401
# Parse JSON payload
payload = request.get_json()
# Handle form submission event
if payload.get('triggerType') == 'form_submission':
for submission in payload.get('data', []):
email = submission.get('email')
name = submission.get('name')
# Process submission data securely
print(f"Processing form submission: {name} ({email})")
# Return 200 OK immediately to acknowledge receipt per Webflow requirements
return jsonify({'status': 'success'}), 200
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)
Key security and implementation requirements from Webflow documentation:
- Always verify HMAC signatures before processing any webhook data
- Return HTTP 200 immediately upon receipt to prevent unnecessary retries
- Use
.get_data()rather than.get_json()for signature verification to access raw payload - Process webhooks asynchronously to ensure fast response times
- Implement idempotency handling since Webflow may deliver webhooks multiple times
Sync e-commerce products and inventory
The E-commerce API provides product catalog automation through endpoints including GET /sites/{site_id}/products for listing products, POST /sites/{site_id}/products for creation, and PATCH /products/{product_id}/skus/{sku_id} for inventory updates.
Update product inventory quantities using the PATCH endpoint for SKUs. Price and inventory updates reflect immediately on the storefront:
# Update product inventory
updated_sku = client.products.skus.update(
product_id="product_id",
sku_id="sku_id",
sku_data={
"inventory": {"quantity": 100},
"price": 29.99
}
)
Price and inventory changes appear immediately on the storefront according to the Webflow Ecommerce API Documentation.
Manage users and memberships
The Users API Reference provides user management capabilities through GET /sites/{site_id}/users for listing site members and PATCH /users/{user_id} for profile updates. The API currently supports list and update operations only. User creation and deletion are not available in the current API version. Use the invite endpoint as a workaround to add new users to your Webflow site.
Use automation platforms for visual workflows
Automation platforms like Zapier, Make, and n8n run Python code directly within workflows triggered by Webflow events. Zapier's "Code by Zapier" action and Make's Code App execute Python scripts inline when Webflow triggers fire without requiring separate hosting infrastructure for simple automation tasks.
Zapier supports Webflow triggers including form submissions, new orders, and CMS item changes. The Code by Zapier action executes Python 3.7.2 code with the standard library, requests module, and StoreClient for data persistence. External libraries beyond these cannot be installed. Create Zaps that trigger on Webflow events, run Python validation or transformation logic, and send results to external services.
Make provides more Python capabilities through its Code App with support for pandas, requests, and other common libraries. According to the Make Code App Documentation, Enterprise users gain access to third-party library imports and extended runtime. The visual scenario builder includes conditional logic and error handling branches.
n8n runs Python code through its Execute Command node by activating a Python virtual environment within shell commands. While setup requires more technical knowledge than Zapier or Make, n8n provides maximum flexibility for complex custom logic once properly configured.
These platforms work well for form processing workflows requiring external API calls, CMS content enrichment from third-party data sources, webhook-based event processing for real-time updates, and notification systems that route data based on conditional logic.
Embed Python applications with HTML Embed elements and iframes
Python web applications integrate with Webflow through two native methods. HTML Embed elements work for inline widgets within page sections. Iframes work for full application embedding. Both methods require hosting your Python application externally on platforms like AWS Lambda, Heroku, Replit, or PythonAnywhere, then inserting them into Webflow pages.
This pattern works for data visualizations, interactive calculators, real-time dashboards, and AI-powered chat widgets where Python handles backend processing on external servers while Webflow provides the page structure.
Host Python applications on platforms like AWS Lambda, Heroku, Replit, or PythonAnywhere, then embed them using iframes:
<iframe
src="<https://your-python-app.herokuapp.com>"
width="100%"
height="600px"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
loading="lazy">
</iframe>
Dynamic CMS integration works by passing parameters through iframe URLs to Flask or FastAPI applications that accept query parameters and render appropriate content based on Webflow CMS data.
What you can build
Integrating Python with Webflow provides backend automation, external system synchronization, and custom functionality that extends beyond Webflow's visual interface.
- Automated content publishing system: Pull product data from an external inventory management system using Python, transform it to match your Webflow CMS schema, publish hundreds of product items with the official
webflow-pythonSDK, and keep inventory synchronized through scheduled sync operations - AI-powered content recommendations: Build a recommendation engine by creating a Python backend service that processes Webflow CMS data and form submission events via webhooks, applies custom recommendation logic to update CMS content, and displays personalized content suggestions based on visitor patterns
- Multi-platform order management: Create a Python backend that receives Webflow e-commerce orders via the
ecomm_new_orderwebhook, processes order data, integrates with external payment processors and shipping carriers, syncs order status back to Webflow via the CMS API, and maintains real-time inventory updates across multiple sales channels - Custom membership portal with external authentication: Develop a Python-powered authentication system that handles user registration, login, password resets, and access control in your own database, then use the Webflow Users API invite endpoint to add member accounts while maintaining user data in your own database for complex business logic
Frequently asked questions
The Webflow Authentication Documentation specifies bearer token authentication as the primary method. Generate tokens in your Webflow site settings, then include them in the Authorization header as Bearer YOUR_API_TOKEN. The official Webflow Python SDK handles authentication automatically by accepting your token during client initialization. For applications serving multiple users, implement OAuth 2.0 using the SDK's built-in OAuth support with automatic token refresh.
No, the Forms API is read-only. Forms must be submitted through Webflow's client-side interface in the browser. The API provides GET /forms/{form_id}/submissions for retrieving submissions after they occur, enabling integration with CRMs and email platforms. For backend form processing, implement webhook receivers using the form_submission event documented in the Working with Webhooks guide.
The official Webflow Python SDK provides type hints that map Python types to Webflow field types. String fields accept Python strings, number fields require integers or floats, and boolean fields expect True or False. Reference fields need the referenced item's ID as a string value, while multi-reference fields accept lists of item IDs. Rich text fields require HTML-formatted strings with proper tags. Date fields use ISO 8601 format strings. Common errors stem from mismatched types, missing required fields, or incorrect field slug names that don't match your CMS schema. Use the List Collection Items endpoint to see example field structures and data types for your collection to inspect existing items and confirm field names and formats before creating or updating items programmatically. The official SDK's type definitions help prevent these field validation errors by providing type safety across all API operations.
Deployment method depends on scale and complexity according to technical requirements. For small projects under 10,000 daily requests, use serverless platforms like AWS Lambda or Vercel Functions documented in AWS Lambda's Python guide and Vercel's Python runtime documentation. These provide automatic scaling and pay-per-request pricing. For medium-scale projects handling 10,000 to 1 million daily requests, implement AWS Lambda with SQS queuing or Google Cloud Functions with Pub/Sub to buffer traffic spikes, with automatic scaling managed by the serverless platform.
Description
Python is an open-source programming language developed under an OSI-approved license and designed for rapid development and backend automation.
This integration page is provided for informational and convenience purposes only.

Quickbooks
Connect QuickBooks with Webflow through automation platforms like Zapier, Make.com, and Integrately to sync customer records and orders, create invoices from e-commerce transactions, and record financial data from form submissions.

MySQL
Connect MySQL with Webflow through middleware platforms or custom APIs to enable database-driven content, real-time product catalogs, and complex user management systems beyond native CMS capabilities.

Microsoft Teams
Connect Microsoft Teams with Webflow through third-party automation platforms like Zapier or Make.

Metamask
Add MetaMask wallet connections to your Webflow site using custom code to build Web3 experiences including wallet connections, NFT minting, and token-gated content.

AWS Lambda
Connect AWS Lambda with Webflow to add serverless backend processing for custom form handling, dynamic content automation, payment workflows, and coordinating multiple API calls.

Firebase Studio
Connect Firebase Studio with Webflow by deploying Firebase Studio applications as standalone web apps that embed in or link from Webflow, or by integrating Firebase backend services like Authentication, Firestore, and Cloud Functions directly into Webflow pages through custom code or tools like Wized.Retry

Strava
Connect Strava's fitness tracking platform with Webflow to display athlete activities, build community engagement features, and automate content creation.

Google Sheets
Connect Google Sheets with Webflow to manage CMS content through familiar spreadsheet interfaces, capture form submissions, and synchronize inventory data.

Givebutter
Connect Givebutter with Webflow to collect donations using embedded widgets or build custom workflows through the API.


