Unofficial community-maintained Pulumi provider for Webflow. Not affiliated with Pulumi Corporation or Webflow, Inc.
npm install @jdetmar/pulumi-webflow






> ⚠️ Unofficial Community Provider
>
> This is an unofficial, community-maintained Pulumi provider for Webflow. It is not affiliated with, endorsed by, or supported by Pulumi Corporation or Webflow, Inc. This project is an independent effort to bring infrastructure-as-code capabilities to Webflow using Pulumi.
>
> - Not an official product - Created and maintained by the community
> - No warranties - Provided "as-is" under the MIT License
> - Community support only - Issues and questions via GitHub
Manage your Webflow sites and resources as code using Pulumi
The Webflow Pulumi Provider lets you programmatically manage Webflow resources using the same Pulumi infrastructure-as-code approach you use for cloud resources. Manage sites, pages, collections, redirects, webhooks, assets, and more. Deploy, preview, and destroy Webflow infrastructure alongside your other cloud deployments.
- Deploy Webflow resources as code - Define sites, pages, collections, redirects, webhooks, assets, and more in TypeScript, Python, Go, C#, or Java
- Preview before deploying - Use pulumi preview to see exactly what will change
- Manage multiple environments - Create separate stacks for dev, staging, and production
- Version control your infrastructure - Track all changes in Git
- Integrate with CI/CD - Automate deployments in your GitHub Actions, GitLab CI, or other pipelines
1. Prerequisites
2. Installation
3. Quick Start - Start here
4. Authentication
5. Verification
6. Get Help
7. Version Control & Audit Trail
8. Multi-Language Examples
9. Next Steps
10. Contributing
---
Before you begin, make sure you have:
pulumi version (requires v3.0 or later)---
The Webflow provider installs automatically when you first run pulumi up. For manual installation:
``bashAutomatic installation (recommended - happens on first pulumi up/preview)
Just run the Quick Start below, and the provider will install automatically
---
Quick Start
$3
This quick start walks you through deploying a robots.txt resource to your Webflow site using TypeScript. The entire process takes about 5 minutes once prerequisites are met.
$3
`bash
Create a new directory for your Pulumi project
mkdir my-webflow-project
cd my-webflow-projectInitialize a new Pulumi project
pulumi new --template typescriptWhen prompted:
- Enter a project name: my-webflow-project
- Enter a stack name: dev
- Enter a passphrase (or leave empty for no encryption):
`This creates:
-
Pulumi.yaml - Project configuration
- Pulumi.dev.yaml - Stack-specific settings
- index.ts - Your infrastructure code
- package.json - Node.js dependencies$3
`bash
Get your Webflow API token (see Authentication section below if you don't have one)
Set your token in Pulumi config (encrypted in Pulumi.dev.yaml)
pulumi config set webflow:apiToken --secretWhen prompted, paste your Webflow API token and press Enter
`What's happening: Your token is encrypted and stored locally in
Pulumi.dev.yaml (which is in .gitignore). It's never stored in plain text.$3
Replace the contents of
index.ts with:`typescript
import * as pulumi from "@pulumi/pulumi";
import * as webflow from "@jdetmar/pulumi-webflow";// Get config values
const config = new pulumi.Config();
const siteId = config.requireSecret("siteId"); // We'll set this next
// Deploy a robots.txt resource
const robotsTxt = new webflow.RobotsTxt("my-robots", {
siteId: siteId,
content:
User-agent: *User-agent: Googlebot
Allow: /, // Standard robots.txt allowing all crawlers
});
// Export the site ID for reference
export const deployedSiteId = siteId;
`
`bashFind your Webflow site ID (24-character hex string) from Webflow Designer
You can find it in: Project Settings > API & Webhooks > Site ID
Need help finding your site ID?
- In Webflow Designer, go to Project Settings (bottom of sidebar)
- Click API & Webhooks
- Your Site ID is displayed as a 24-character hex string (e.g.,
5f0c8c9e1c9d440000e8d8c3)$3
`bash
Install dependencies
npm installPreview the changes Pulumi will make
pulumi preview
`Expected output:
`
Previewing update (dev): Type Name Plan Info
+ webflow:RobotsTxt my-robots create
Resources:
+ 1 to create
Do you want to perform this update?
> yes
no
details
`$3
`bash
Deploy to your Webflow site
pulumi up
`When prompted, select yes to confirm the deployment.
Expected output:
`
Type Name Plan Status
+ webflow:RobotsTxt my-robots create createdOutputs:
deployedSiteId: "5f0c8c9e1c9d440000e8d8c3"
Resources:
+ 1 created
Duration: 3s
`$3
1. Open Webflow Designer
2. Go to Project Settings → SEO → robots.txt
3. You should see the robots.txt content you deployed!
$3
`bash
Remove the resource from Webflow
pulumi destroyWhen prompted, select 'yes' to confirm
`Congratulations! You've successfully deployed your first Webflow resource using Pulumi! 🎉
---
Authentication
$3
1. Log in to Webflow
2. Go to Account Settings (bottom left of screen)
3. Click API Tokens in the left sidebar
4. Click Create New Token
5. Name it something descriptive (e.g., "Pulumi Provider")
6. Grant the following permissions:
- Sites: Read & Write
- Redirects: Read & Write (if using Redirect resources)
- Robots.txt: Read & Write (if using RobotsTxt resources)
7. Click Create Token
8. Copy the token immediately - Webflow won't show it again
$3
`bash
Option 1: Pulumi config (recommended - encrypted in Pulumi.dev.yaml)
pulumi config set webflow:apiToken --secretOption 2: Environment variable
export WEBFLOW_API_TOKEN="your-token-here"Option 3: Code (NOT RECOMMENDED for production - security risk)
Don't do this in production code!
`$3
- ✅ DO use Pulumi config with
--secret flag (encrypts locally)
- ✅ DO use environment variables in CI/CD pipelines
- ✅ DO keep tokens in .env files (never commit to Git)
- ❌ DON'T commit tokens to Git
- ❌ DON'T hardcode tokens in your Pulumi program
- ❌ DON'T share tokens via email or chat
- 🔐 Rotate tokens regularly - Create new tokens and retire old ones monthly$3
For GitHub Actions or other CI/CD:
`yaml
.github/workflows/deploy.yml
env:
WEBFLOW_API_TOKEN: ${{ secrets.WEBFLOW_API_TOKEN }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pulumi/actions@v6
with:
command: up
`---
Verification
$3
`bash
Check Pulumi is installed
pulumi versionCheck the Webflow provider is available
pulumi plugin ls | grep webflowShould output something like:
resource webflow 1.0.0-alpha.0+dev
`$3
`bash
Inside a Pulumi project directory:
pulumi previewIf authentication fails, you'll see an error like:
Error: Unauthorized - Check your Webflow API token
`$3
1. In Webflow Designer:
- Check that your resource appears in the appropriate settings (robots.txt, redirects, etc.)
- Verify the configuration matches what you deployed
2. Via Pulumi:
`bash
pulumi stack output deployedSiteId
# Should output your 24-character site ID
`3. Via Command Line:
`bash
# View your stack's resources
pulumi stack select dev
pulumi stack # View detailed resource information
pulumi stack export | jq .
`---
Get Help
- Troubleshooting Guide - Comprehensive error reference and solutions
- FAQ - Answers to common questions
- Examples - Working code for all resources
- GitHub Issues - Report bugs
- GitHub Discussions - Ask questions
---
Version Control & Audit Trail
Track all infrastructure changes in Git for compliance and auditability. Features include automatic audit trails, code review via pull requests, and SOC 2/HIPAA/GDPR-ready reporting.
See the Version Control Guide for Git workflows, commit conventions, and audit report generation.
---
Multi-Language Examples
The Quick Start uses TypeScript. Complete examples for all languages are in examples/quickstart/:
- TypeScript | Python | Go
Each includes setup instructions, complete code, and a README.
---
Next Steps
Once you've completed the Quick Start:
$3
- Deploy multiple resource types (Redirects, Sites, etc.)
- Use the examples/ directory for real-world patterns
- Check docs/ for comprehensive reference documentation$3
- Create separate stacks for dev, staging, and production
- Use different site IDs for each environment
- See: examples/stack-config/$3
- Multi-site management: examples/multi-site/
- CI/CD integration: examples/ci-cd/
- Logging and troubleshooting: examples/troubleshooting-logs/$3
- Pulumi Documentation
- Getting Started with Pulumi
- Pulumi Best Practices$3
- Pulumi Community Slack
- Pulumi GitHub Discussions---
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
$3
- Report bugs - Found an issue? Create a GitHub issue
- Submit improvements - Have an idea? Create a discussion
- Contribute code - Fork the repo, make changes, and submit a pull request
- Improve documentation - Help us document features and patterns
---
License
This project is licensed under the MIT License - see LICENSE file for details.
---
Troubleshooting Quick Reference
| Problem | Solution |
|---------|----------|
| Plugin not found |
pulumi plugin install resource webflow |
| Invalid token | Check Webflow Account Settings → API Tokens |
| Invalid site ID | Verify in Webflow Designer → Project Settings → API & Webhooks |
| Deployment times out | Check internet connection, try again |
| Token format error | Ensure you're using the full API token (not just a prefix) |
| Site not found | Verify site ID matches the site where you want to deploy |
| Need detailed logs | Enable debug logging: PULUMI_LOG_LEVEL=debug pulumi up` - See Logging Guide |For more troubleshooting help and detailed logging documentation:
- Logging and Debugging Guide - Comprehensive guide to structured logging features
- Troubleshooting Guide - Common issues and detailed solutions
- Changelog - Release history and notable changes
---
Ready to get started? Jump to Quick Start above! 🚀