· 2 min · TextMeFlow Team

Sending a WhatsApp confirmation on a JotForm submission

JotForm is a popular choice for intake forms, quote requests and sign-ups because the drag-and-drop builder is fast and the free tier is already usable. As with most form tools, you usually don't want to wait until someone opens the dashboard to notice a new submission — you want to text the sender a WhatsApp confirmation right away. JotForm has a built-in webhook integration for this, but it behaves a bit differently from most other form tools, and that affects how you build your endpoint.

The difference from Typeform: multipart instead of JSON

Typeform (see forwarding a Typeform submission) sends a clean JSON payload with an HMAC signature. JotForm sends its webhook as multipart/form-data, including a field called rawRequest: a JSON string with the raw answers, indexed by question id (for example q3_name, q4_phoneNumber). There's no signing secret — JotForm doesn't sign the request at all. That means you have to make sure only JotForm can call your endpoint yourself; more on that in step 3.

Step 1: add the webhook in JotForm

Open your form, go to Settings → Integrations, search for "Webhooks" and enter your own endpoint URL (for example https://yourdomain.com/jotform-hook.php?token=a-long-random-token). From then on, JotForm sends a POST to that URL on every submission.

Step 2: look up the question ids

In the form builder, click the phone number field and note its question number (visible in the builder's URL, or under Form → Properties → Question IDs). You need this to read the right field out of rawRequest — JotForm doesn't use fixed field names like "phone", only the number it assigns per question.

Step 3: the PHP endpoint

<?php
$expectedToken = "a-long-random-token";
if (($_GET["token"] ?? "") !== $expectedToken) {
    http_response_code(401);
    exit("invalid token");
}

$raw = json_decode($_POST["rawRequest"] ?? "{}", true);

$name = $raw["q3_name"] ?? "there";
$phone = $raw["q4_phoneNumber"]["full"] ?? $raw["q4_phoneNumber"] ?? null;
$consent = $raw["q5_whatsappConsent"] ?? null;

if (!$phone || $consent !== "Yes") {
    http_response_code(200);
    exit("no consent or no number, nothing sent");
}

$text = "Thanks for your submission, {$name}! We'll be in touch soon.";

$ch = curl_init("https://api.textmeflow.eu/v1/messages");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "Content-Type: application/json",
        "Authorization: Bearer YOUR_API_KEY",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "to" => $phone,
        "text" => $text,
    ]),
]);
curl_exec($ch);
curl_close($ch);

http_response_code(200);

JotForm's phone number field sometimes returns a substructure (full, area, phone) instead of a single string, depending on how the field is configured — check this with a test submission before going live. The textmeflow API expects a valid E.164 number with a leading +. The full endpoint reference is in the API docs.

No signature means you secure the endpoint yourself

Without HMAC verification, a secret token in the query string, as above, is the bare minimum: without it, your endpoint ignores the request. To tighten it further, log the submissionID from the payload too and ignore duplicate calls with the same id — JotForm can retry a webhook after a failed first attempt, and without that check you'll send the same WhatsApp confirmation twice.

Things to watch

  • Consent first: only send a message if the submitter explicitly agreed to it, for example via a checkbox or choice field. Without that consent you're sending unsolicited messages, which also hurts your sending reputation over time.
  • Rate limits: a spike in submissions (after a campaign or trade show) can hit your plan's limits — see the rate limits docs for the exact numbers per plan.
  • No server of your own? Without PHP hosting you can build the same flow without code: JotForm has a native app in Zapier and Make that you can connect directly to the textmeflow integration — see the integrations docs.
  • Error handling: check the HTTP status code of the curl call and log a failed send, otherwise it disappears silently.

Conclusion

JotForm's webhook lacks the signing that Typeform has, but with a token in the URL and a short check on the phone number field you get the same automatic WhatsApp confirmation from a small, stateless PHP endpoint. For more complex follow-up steps — updating a CRM, creating a task, an internal notification — reach for an automation tool instead of cramming everything into one script.

Don't have an account yet? Start for free with 50 messages a month, forever — no credit card needed. Create a free account.

Want to send WhatsApp messages via API yourself?

Free forever up to 50 messages/month. Scan a QR and send your first message within 5 minutes.

Free forever