How to Send WordPress Contact Form Notifications to Slack (Free, No Zapier)
A practical guide to routing WordPress contact form submissions into a Slack channel in under 15 minutes — covering plugins, Zapier, and the free direct-webhook method used by real agencies.
Why every WordPress site owner should route form submissions to Slack
The default WordPress contact form (whether Contact Form 7, WPForms, Gravity Forms, Elementor Forms, or Fluent Forms) delivers new submissions to an email inbox. That inbox is usually shared, rarely opened outside business hours, and often filtered as “promotions” by Gmail or Outlook.
Meanwhile, your team already lives in Slack. Sales, support, and operations all check Slack notifications instantly on their phones, but they rarely open the info@ inbox on a Saturday night. The result is a predictable pattern: a website lead comes in at 8pm on a Friday, the buyer messages three competitors while waiting, and by Monday morning your lead is cold.
Sending WordPress form submissions directly into a Slack channel closes that gap. Notifications arrive in seconds, on every team member’s phone, and anyone can reply immediately. Response times drop from hours to minutes, and conversion rates on high-intent inquiries usually rise significantly.
The three ways to connect WordPress to Slack (compared)
There are three practical paths for routing WordPress form submissions into Slack. Each has a different tradeoff between setup effort, ongoing cost, and flexibility.
Option 1 — A dedicated Slack plugin (WP Slack Notifications, WPForms Slack addon, or similar). Fastest to install, but many require a paid WPForms Pro license or lock premium features behind a subscription. Formatting is usually rigid and hard to customize.
Option 2 — A middleware service (Zapier, Make, Pabbly Connect). Point-and-click configuration and works with almost every WordPress form plugin, but costs $20–$50 per month indefinitely. Zapier’s free tier is limited to 100 tasks per month, which fills up quickly on a busy site.
Option 3 — A direct Slack webhook powered by a lightweight serverless function. Zero monthly cost, unlimited submissions, full control over the message format, and works with every WordPress form plugin. This is what real agencies and technical teams use once they cross Zapier’s free tier. The rest of this guide walks through this method.
Step 1 — Create your Slack incoming webhook
Slack incoming webhooks are the free, built-in way for external services to post messages into a channel. To create one:
Open Slack in a browser, navigate to your workspace admin, and go to the Slack API app management page. Click “Create New App”, choose “From scratch”, name it something like “Lead Notifier”, and pick your workspace. Under “Incoming Webhooks” toggle the feature on. Click “Add New Webhook to Workspace”, choose the channel you want leads to post to (a private #new-leads channel is a good default), and copy the webhook URL.
The URL will look like https://hooks.slack.com/services/T0000/B0000/xxxxxxxx. Treat it like a password — anyone with it can post to that channel. Never commit it to a public repository.
Step 2 — Deploy a free serverless function on Cloudflare Pages
Cloudflare Pages Functions run at Cloudflare’s edge network for free (100,000 requests per day on the free tier — more than enough for any small-to-medium business). This function receives the form submission and forwards it to Slack.
Create a new folder called functions/api and inside it a file called submit.js with the following code. The webhook URL should be stored as an environment variable named SLACK_WEBHOOK_URL in the Cloudflare Pages dashboard, not hardcoded here.
export async function onRequestPost({ request, env }) {
const body = await request.json().catch(() => ({}))
const name = body.name || 'Unknown'
const contact = body.email || body.phone || 'no contact'
const message = body.message || body.msg || '(no message)'
const site = body.site || 'WordPress'
const text = `📩 *New lead from ${site}*\n*Name:* ${name}\n*Contact:* ${contact}\n*Message:* ${message}`
await fetch(env.SLACK_WEBHOOK_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ text }),
})
return new Response(JSON.stringify({ ok: true }), {
headers: { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' },
})
}Step 3 — Deploy the function to Cloudflare
Deploying is a two-command process using Cloudflare’s CLI, Wrangler. From the folder containing your functions/ directory, run: npx wrangler pages deploy . --project-name=your-project-name. Cloudflare will upload the function and give you a live URL like https://your-project-name.pages.dev/api/submit.
Important — the Cloudflare dashboard’s drag-and-drop upload does not correctly register Pages Functions. You must use the Wrangler CLI, otherwise your /api/submit endpoint will silently return your homepage instead of running the function. This is one of the most common issues teams hit when doing this integration for the first time.
Once deployed, add SLACK_WEBHOOK_URL as an environment variable (marked as a Secret) in the Cloudflare Pages project settings, then redeploy.
Step 4 — Point your WordPress form at the new endpoint
How you connect the form depends on which plugin you use. For most modern plugins the pattern is the same — add a small snippet of JavaScript that intercepts the form submission and POSTs it to your Cloudflare endpoint in addition to (or instead of) the default email delivery.
For Contact Form 7, add this to your theme’s footer.php or via a plugin like Code Snippets. For Elementor Forms, use the “Webhook” action inside the form settings and paste your Cloudflare URL directly — no JavaScript needed. For WPForms, use the built-in webhooks addon (paid) or add the JavaScript approach instead. For Gravity Forms, use the Webhooks addon or a small JavaScript listener.
document.addEventListener('wpcf7mailsent', async function (event) {
const inputs = event.detail.inputs
const data = {}
inputs.forEach((i) => { data[i.name] = i.value })
await fetch('https://your-project-name.pages.dev/api/submit', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
name: data['your-name'],
email: data['your-email'],
message: data['your-message'],
site: window.location.hostname,
}),
})
})Step 5 — Test it end-to-end
Submit your live contact form with a test entry. Within five seconds you should see a formatted notification appear in your chosen Slack channel with the name, contact, message, and site source.
If nothing appears, check three things: your Cloudflare Function logs (visible in the Pages dashboard), whether the SLACK_WEBHOOK_URL environment variable is set correctly, and whether your form JavaScript is actually firing (check the browser Network tab). Ninety percent of the time the issue is a missing environment variable or a form plugin that hasn’t triggered the JavaScript event.
Beyond Slack — WhatsApp, Microsoft Teams, Discord, and email
The same function pattern works for other notification channels. WhatsApp requires the WhatsApp Business Cloud API and a one-time Meta Business verification, but the API is free at low volumes. Microsoft Teams uses incoming webhooks similar to Slack. Discord uses webhooks that are essentially identical to Slack’s format. Email fallback can be added using Resend, SendGrid, or Mailgun.
A common production setup is a hybrid — Slack for the operations team, WhatsApp for the sales team’s on-call rotation, and email as a fallback for archival. All three can be triggered from the same Cloudflare Function with a few extra fetch calls.
When this method is worth it (and when it’s not)
The direct webhook method makes sense when you’re getting more than 5–10 leads per month, when you want to avoid recurring subscription costs, when you need to route notifications to multiple channels, or when you’re managing several client sites and want a repeatable setup. It’s the standard approach for agencies and technical teams.
It’s not worth it if you get only one or two leads per month and don’t mind checking email — a free WPForms email notification works fine at that volume. It’s also not worth it if you’re not comfortable editing WordPress theme files or using a code snippets plugin — in that case, a plugin like WP Slack Notifications is the faster path.
For everyone in between — typical small businesses, agencies, real estate teams, medspas, home services, and Shopify brands — the free direct-webhook method pays for itself the first month you would have paid Zapier.
See a live version of this system running now
See the live demo