Skip to content

Resonia-Health/veilmail-webflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Veil Mail Webflow Integration

A backend service that connects Webflow sites with Veil Mail for form submissions, Memberships sync, and embeddable signup forms — with automatic PII protection and CASL/GDPR compliance.

Use this if you run a Webflow site and want to route form submissions to a real email platform instead of Webflow's built-in email (which is limited) or manually exporting CSV lists. Veil Mail adds automatic PII scanning, CASL consent tracking for marketing sends, audience management, and embeddable signup forms that Webflow doesn't provide natively.

Related: Veil Mail product · Node.js SDK · Signup forms docs

Features

  • Form Integration - Automatically sync Webflow form submissions to Veil Mail audiences
  • Member Sync - Sync Webflow Memberships users to Veil Mail
  • Embeddable Forms - Generate customizable signup forms to embed anywhere
  • Webhook Processing - Real-time sync via Webflow webhooks

Prerequisites

  • Bun 1.1+
  • PostgreSQL database
  • Webflow account with API access
  • Veil Mail account

Setup

1. Install Dependencies

cd integrations/webflow
bun install

2. Configure Environment

Create a .env file:

# Server
PORT=3001
APP_URL=https://your-webflow-integration.com
DASHBOARD_URL=https://app.veilmail.xyz

# Database
DATABASE_URL=postgresql://user:password@localhost:5432/veil_webflow

# Webflow OAuth
WEBFLOW_CLIENT_ID=your_client_id
WEBFLOW_CLIENT_SECRET=your_client_secret
WEBFLOW_WEBHOOK_SECRET=your_webhook_secret

# Security
JWT_SECRET=your-jwt-secret-key

3. Set Up Database

bun run db:generate
bun run db:push

4. Start Development Server

bun run dev

Webflow App Setup

1. Create Webflow App

  1. Go to Webflow Dashboard > Integrations > Apps
  2. Click "Build an app"
  3. Configure:
    • App Name: Veil Mail
    • Redirect URI: {APP_URL}/auth/callback
    • Scopes: sites:read, forms:read, forms:write

2. Configure Webhooks

In your Webflow app settings, add webhooks:

Trigger URL
Form submission {APP_URL}/webhooks/form-submission
Membership user added {APP_URL}/webhooks/membership

API Endpoints

Authentication

Method Endpoint Description
GET /auth/connect Start OAuth flow
GET /auth/callback OAuth callback
POST /auth/disconnect/:siteId Disconnect site

Sites

Method Endpoint Description
GET /api/sites List connected sites
GET /api/sites/:siteId Get site details
PATCH /api/sites/:siteId Update site settings

Forms

Method Endpoint Description
GET /api/sites/:siteId/forms List forms
POST /api/sites/:siteId/forms Configure form
GET /api/sites/:siteId/submissions List submissions
POST /api/sites/:siteId/submissions/retry Retry failed syncs

Embed Forms

Method Endpoint Description
GET /api/embed-forms List embed forms
POST /api/embed-forms Create embed form
PATCH /api/embed-forms/:formId Update embed form
DELETE /api/embed-forms/:formId Delete embed form
GET /embed/form/:formId Render embed form
GET /embed/script/:formId Get embed script
POST /embed/submit/:formId Submit embed form

Embedding Forms

Using Script Tag

<div id="veil-mail-form-{formId}"></div>
<script src="https://your-integration.com/embed/script/{formId}"></script>

Using iframe

<iframe
  src="https://your-integration.com/embed/form/{formId}"
  style="width: 100%; min-height: 300px; border: none;"
></iframe>

Deployment

Fly.io

# Install Fly CLI
brew install flyctl

# Create app
fly launch

# Set secrets
fly secrets set WEBFLOW_CLIENT_ID=xxx
fly secrets set WEBFLOW_CLIENT_SECRET=xxx
fly secrets set DATABASE_URL=xxx
fly secrets set JWT_SECRET=xxx

# Deploy
fly deploy

Docker

FROM oven/bun:1.2-alpine
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
COPY . .
RUN bun run build
CMD ["bun", "start"]

Architecture

src/
├── server.ts           # Express server setup
├── routes/
│   ├── auth.ts         # OAuth flow
│   ├── webhooks.ts     # Webflow webhooks
│   ├── embed.ts        # Embeddable forms
│   └── api.ts          # Management API
├── services/
│   └── veil.ts         # Veil Mail API client
└── prisma/
    └── schema.prisma   # Database schema

License

MIT - Copyright (c) 2025-present Resonia Inc

About

Webflow integration for Veil Mail — form submissions, Memberships sync, embeddable signup forms, and secure email delivery with automatic PII protection and CASL compliance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors