How to Send an SMS When a WordPress Form Is Submitted
You can send an SMS when a WordPress form is submitted by pairing your form plugin with Twilio and a workflow layer that sits between them. WordPress has no built-in SMS feature, so you need three things: a form plugin, an SMS gateway account (Twilio is the standard choice), and something to connect the two and fire the message automatically on each submission.
This tutorial uses a visual workflow builder to make that connection. The same logic applies regardless of which form plugin you use, because the workflow layer handles the routing.
We tested this setup on Contact Form 7, WPForms, Gravity Forms, Fluent Forms, Ninja Forms, and Elementor Forms. All of them work.
Before we get into steps, one thing worth knowing: every approach covered by competing guides assumes the happy path works perfectly. This one does not. We cover what breaks, what the error messages mean, and how to get delivery receipts you can actually check.
What You Need Before You Start
- A form plugin already installed with at least one live form collecting submissions.
- A Twilio account with a verified phone number and enough credit. Twilio’s trial accounts restrict sending to verified numbers only, which is enough for testing but not for live sites. See Twilio’s SMS quickstart documentation for account setup.
- Your Twilio credentials: Account SID, Auth Token, and the sending phone number. All three live in the Twilio Console under Account Info.
- A workflow automation plugin installed and active on your WordPress site. The steps below use Krom Automation, which handles the form trigger, the Twilio connection, and the message body all in one canvas.
If you are starting from scratch, the installation guide takes under five minutes. Once active, you will see a Krom Automation menu item in your WordPress admin sidebar.
Step 1: Connect Your Form Plugin as the Trigger
Open Krom Automation and click Add New Workflow. You will land on the visual canvas. Click the trigger node (the top card on the canvas) and search for your form plugin by name.
The supported form triggers include Contact Form 7, WPForms, Gravity Forms, Fluent Forms, Ninja Forms, and Elementor Forms. Each one fires when a form is submitted on your site.
After selecting the trigger, you will see a dropdown listing every form currently active on your site. Select the specific form you want to respond to, or leave it set to “Any form” if you want the workflow to fire for all submissions.
Documentation for each form plugin integration covers the exact fields each trigger exposes:
- Contact Form 7 integration: triggers, actions, and automation examples
- WPForms integration: triggers, actions, and automation examples
- Gravity Forms integration: triggers, actions, and automation examples
- Fluent Forms integration: trigger, setup, and automation examples
- Ninja Forms integration: trigger, setup, and automation examples
- Elementor Forms integration: trigger, setup, and automation examples
Step 2: Add the Twilio Action
Click the + button below the trigger node to add an action. Search for “Twilio” and select Send SMS. You will see three fields: To Number, From Number, and Message Body.
The To Number field accepts a static phone number or a merge tag that pulls the submitter’s number from the form. If your form collects the submitter’s phone number, you can reference it here with a merge tag such as {{field:phone}}.
The exact tag name depends on your form plugin and what you named the field. See the merge tags documentation for the full syntax.
The From Number must match the Twilio phone number you provisioned. Enter it in E.164 format: +1 followed by the area code and number for US numbers, for example +12025551234.
The Message Body supports free text and merge tags together. A useful admin alert might read: “New submission from {{field:name}}, {{field:email}}. Submitted at {{submission:date}}.” Keep messages under 160 characters to avoid multi-part SMS charges, which Twilio bills per segment.
An SMS that just says “New form submission” is almost useless. Including the submitter’s name and email in the message body is the difference between a notification and actual information.
Step 3: Enter Your Twilio Credentials
When you select the Twilio action for the first time, the panel asks for your Account SID and Auth Token. These authenticate every API call the workflow makes. Paste them from the Twilio Console and click Save Connection.
The credential is stored once at the site level and reused across all workflows. You do not re-enter it for each workflow you build. If you ever rotate your Twilio credentials, update them once in the connections panel and all workflows pick up the change immediately.
For the full setup reference covering Twilio alongside Slack, Discord, and Telegram, see the messaging integrations documentation.
Step 4: Send SMS to Both Admin and Submitter
A common need is to notify two people on a single submission: the site admin gets an alert, and the submitter gets a confirmation. You can do both in one workflow.
After the first Twilio action node, click + again to add a second Twilio action beneath it. The first action targets your admin number (a fixed value).
The second targets the submitter’s number via merge tag. Both fire in sequence every time the form is submitted.
If you only want the confirmation SMS to send when the submitter’s phone field is filled in (since it may be optional), add a conditional branch between the trigger and the second action. Set the condition to check whether the phone field is not empty.
The Yes path fires the SMS; the No path does nothing. This prevents Twilio errors from blank number fields, which is one of the most common failure causes in production.
Step 5: Route Different Forms to Different Recipients
Agencies and teams often need form-specific routing. A contact form goes to the sales team.
A support form goes to the helpdesk number. A job application form goes to HR.
The cleanest way to handle this is one workflow per form. Set each workflow’s trigger to a specific form rather than “Any form”, then set the Twilio To Number to the team phone number for that form. Each workflow is independent, so enabling, disabling, or editing one has no effect on the others.
If you have many forms and prefer a single workflow, you can use conditional branching on a hidden field that identifies the form source. The conditions and branching documentation covers multi-path logic in detail.
One workflow per form is almost always the right choice. It is easier to debug, easier to disable one form without touching others, and easier to hand off to a client.
Step 6: Test Before Going Live
Use the workflow simulator to do a dry run with zero side effects. The simulator fires the workflow logic and shows you what each node would receive and send, without actually calling the Twilio API or delivering a real SMS.
Once the simulator confirms the logic is correct, submit your form for real. Open the workflow’s execution log immediately after.
You will see a row for the submission with a status of Success or Failed, the exact payload sent to Twilio, and the response Twilio returned. That response is the most useful debugging tool you have.
What to Do When SMS Fails to Send
Every guide on this topic assumes the happy path. Here is what actually breaks and how to fix it.
Failure Checklist: Work Through These in Order
- Check the execution log first. Open the workflow, click Execution History, and find the failed run. The log shows the exact Twilio API response code. That code tells you everything.
- Error 21211 (Invalid To phone number). The number in the To field is not in E.164 format, or the form field was empty. Add the conditional branch described in Step 4 to catch empty fields before the Twilio action fires.
- Error 21608 (Unverified number on trial account). Twilio trial accounts can only send to numbers you have explicitly verified in the console. Either verify the number in Twilio or upgrade to a paid account.
- Error 20003 (Authentication failure). Your Account SID or Auth Token is wrong. Return to the connections panel, re-enter both values, and re-save.
- Error 21614 (Not a mobile number). The destination number is a landline. Twilio cannot deliver SMS to landlines. Validate phone number format in your form before submission if this is a recurring issue.
- Workflow never fires at all. Check whether the form plugin integration is active under Krom Automation’s integrations panel. Some form plugins require a small compatibility setting to be enabled. Also confirm the workflow itself is set to Active, not Paused.
- SMS sends but arrives late. The workflow runs via WordPress Cron (Action Scheduler). On very low-traffic sites, WP-Cron fires late when no page loads occur. Configure a real server-side cron job to call wp-cron.php every minute. See WordPress.org’s documentation on hooking WP-Cron into the system task scheduler.
Automatic Retry and Failure Notifications
When an action fails, the workflow engine automatically retries with configurable backoff. You also receive a failure notification by email so you are not discovering problems hours later when a lead has already gone cold. The execution log keeps a full per-step audit trail, so you can see exactly which step failed and what the upstream service returned.
Including Form Field Data in the SMS Body
Merge tags let you inject live submission data into the SMS message body. The tag format is {{field:field_name}} where field_name matches the field identifier in your form plugin.
| What you want in the SMS | Example merge tag | Notes |
|---|---|---|
| Submitter’s name | {{field:name}} |
Use the field’s slug, not its label |
| Submitter’s email | {{field:email}} |
Useful for admin follow-up |
| Submitter’s phone | {{field:phone}} |
Can be used as the To Number directly |
| Form name | {{form:title}} |
Helpful when one workflow covers multiple forms |
| Submission date and time | {{submission:date}} |
Formats to your WordPress timezone setting |
| Any custom field | {{field:your_field_slug}} |
Check your form plugin for the field slug |
Keep the total character count in mind. A standard SMS segment is 160 characters.
Twilio charges per segment, so a 320-character message costs twice as much as a 160-character one. For admin alerts, name, email, and timestamp in 160 characters is usually enough.
Cost Comparison: Approaches Side by Side
There are three practical approaches to sending SMS on form submission in WordPress. Here is what each one costs and what it trades off, so you can decide before committing time to setup.
| Approach | Year 1 cost (estimate) | Execution limit | Debugging visibility | Multi-form routing |
|---|---|---|---|---|
| Workflow plugin (free tier) + Twilio | Twilio API cost only (~$0.0079 per SMS in US, at time of writing) | No run caps on free tier | Full per-step execution log | Yes, one workflow per form |
| WPForms + Twilio Add-On | WPForms Elite ~$299/year + Twilio costs | No run caps | Limited, no per-step log | Yes, per form setting |
| Zapier (WPForms + Twilio Zap) | ~$240/year for 750 tasks/month, as of September 2026 | 750 tasks/month on Professional plan, overages charged | Zap history, 7 days on free | Yes, one Zap per form |
The workflow plugin approach carries no per-task charge at any tier. You pay Twilio directly for each SMS at their standard rate, which is roughly $0.0079 per outbound message in the US (this figure comes from Twilio’s published SMS pricing page and is subject to change). At 500 form submissions a month, that is under $4 in SMS costs with no platform surcharge on top.
Per-task billing punishes success. A site that doubles its form submissions doubles its automation bill overnight, with no warning and no way to cap it.
How to Add a Delay Before Sending
Some use cases need a gap between form submission and SMS delivery. A booking confirmation might send immediately, but a follow-up reminder might go out 24 hours later. You can add a delay node between the trigger and the Twilio action by clicking the + and selecting Delay.
Set the delay to any number of minutes, hours, days, or weeks. The workflow pauses at that node and resumes when the delay expires, using Action Scheduler to run in the background without holding up page loads. The delays and scheduling documentation covers the full configuration.
Other Tools Worth Knowing About
If you are building a form submission pipeline, you will likely want to do more than send one SMS. Pollify is wpRigel’s Gutenberg-native poll and survey plugin.
It builds polls as real blocks inside the editor, so there are no shortcodes to paste and no separate interface to manage. It pairs well with form-based workflows when you need quick structured feedback rather than a full form.
Commandify is a command palette for the WordPress admin. Press Cmd or Ctrl plus K to jump to any screen, search content, or run admin actions without navigating menus.
It is the only WordPress command palette with real WooCommerce order, product, and customer commands built in. For teams managing multiple sites or workflows, it removes a significant amount of daily clicking.
Next Steps
The setup described here takes roughly 15 to 20 minutes from a fresh install to a working SMS notification on form submission. The Twilio trial account is enough to test with.
Once you have confirmed the message arrives correctly and the execution log shows a clean run, you can extend the same workflow to add a second SMS for the submitter, a conditional branch for optional phone fields, or a delay for follow-up messages. Each of those is an additional node on the same canvas, not a separate plugin or integration to configure.
Try Krom Automation free on WordPress.org
Frequently Asked Questions
Does WordPress have built-in SMS, or do I need a plugin?
WordPress has no built-in SMS feature. You need a form plugin, an SMS gateway account (Twilio is the standard choice), and a workflow layer to connect them. The workflow layer handles authentication, message formatting, and retry logic when delivery fails.
Can I send SMS without a Twilio account?
Twilio is the most widely supported gateway for WordPress automation. Some alternative gateways exist, such as ClickSend and Vonage, but Twilio has the broadest documentation and the most reliable deliverability. If you use a different gateway that exposes an HTTP API, you can connect to it via an HTTP Request action, though this requires more configuration than a native Twilio integration.
Can I include what the user typed into the form inside the SMS?
Yes. Merge tags let you insert any form field value into the SMS message body.
Use the syntax {{field:field_slug}} where the field slug matches your form plugin’s field identifier. The merge tags documentation explains how to find field slugs for each supported form plugin.
What happens if the SMS fails to deliver?
The execution log records the exact Twilio response code for every failed delivery. The most common causes are an invalid phone number format (error 21211), an unverified number on a Twilio trial account (error 21608), or wrong API credentials (error 20003). The workflow engine retries automatically on transient failures and sends a failure notification email so you are not discovering problems hours later.
Can different forms send SMS to different recipients?
Yes. Create one workflow per form, set each trigger to a specific form, and set each Twilio action’s To Number to the relevant recipient. This keeps each form’s routing independent so you can enable, disable, or edit one without affecting the others.