Skip to main content
Related agents: Lead management (HubSpot).

What it does

Your contact form sends the lead’s data to a webhook URL. The workflow takes the phone number, converts it to international format, waits one minute, and launches the outbound call with the agent you specify. That one-minute wait is deliberate: it gives the lead time to close the form so they aren’t still looking at the screen when the call comes in. It’s a call-launching workflow: unlike pre-, during-, or post-call workflows, it isn’t assigned to the agent — it runs on its own and is what originates the call.

How it works

How the webhook works

The Receive contact form trigger is a Catch Webhook: as soon as you publish the workflow, it generates its own unique URL. Any request that hits that URL fires a new run, no matter where it comes from. It doesn’t require any particular structure: it accepts the request body as-is and exposes it whole under trigger.body, with each field available by its own name — for example trigger.body.phone. But the trigger doesn’t know in advance which fields will arrive, so until you show it a sample, the following steps have nothing to offer you in the selector. That’s why, every time you want to use a new piece of data coming from the webhook, you first need to generate sample data that includes it: In Generate sample data, click Test trigger, select the POST method, go to the Body tab with type JSON, and write a sample with the same fields and names your form sends:
After clicking Send, the workflow saves that result, and from then on the three fields appear in later blocks, ready to drag in. The names have to match your form’s exactly: the Normalize phone number block looks for phone inside the body, and if your form sends it as telefono or phone_number, it won’t find it and the run fails right there.

What the normalization actually does

The code step cleans the number and adds the international prefix. In order:
  1. Removes spaces, dashes, dots, and parentheses.
  2. If it starts with 00, replaces it with +.
  3. If it doesn’t start with +, adds the country prefix: if the number already starts with the prefix it’s kept as-is, and if not, it strips the leading national-trunk 0 (if any) and then adds the prefix.
  4. Checks that the result is a + followed by 8 to 15 digits.

What you need

  • A phone number to call from
  • The Lead management (HubSpot) agent, or any other agent you want to use
  • A form that can send data to a webhook URL; it should ask for both the email and the phone number

Getting started

1

Copy the template

From the Workflows section, open the template catalog and copy it. The workflow is created disabled.
2

Point your form at the webhook

Copy the Receive contact form trigger’s URL and set it as the destination in your form.The workflow expects the phone number in body.phone. If your form sends it under a different name — telefono, phone_number, data.phone — change the number field of the Normalize phone number step to match yours.
3

Adjust the country prefix

In the Normalize phone number code step, the defaultCountryCode field ships as 34. Change it if your leads are from another country. It only applies to numbers that arrive without a prefix: ones already in international format are left as-is.
4

Adjust the wait (optional)

The Wait before calling step is set to 1 minute. Raise or lower it as you prefer, keeping in mind that immediate contact tends to work better the more recent the form submission.
5

Select the number and the agent

In the Make outbound call step, the piece has an “Origin number” dropdown. Select the number you want to call from there.In that same step, the Agent version field ships empty. Select the agent version that will take the call. If you leave it blank, the default published version of the agent linked to the number is used.
6

Pass the lead's data to the agent

The Dynamic Variables field of the Make outbound call step ships empty. This is where you pass the agent the data that comes from the form.This matters especially if you’re going to use the Post-call lead management (HubSpot) workflow: it looks up the contact and sends the email using the mail variable, and if you don’t define it here, it arrives empty and finds and sends nothing.Add at least:Also add the name or any other form data you want to use in the prompt as a dynamic variable. Adjust the paths to match your form’s actual field names.
7

Publish and enable the workflow

Publish the workflow and make sure it’s enabled. While it’s disabled, the webhook triggers nothing.
8

Test it

Submit the form with your own phone number and check that the call comes in a minute later. Check the number dialed in the call logs: it’s the fastest way to spot that the normalization doesn’t match the format your form sends.

Before publishing

  • One call per submission. Every request to the webhook triggers a call. If your form resubmits or the lead sends it twice, it calls twice: the workflow doesn’t check for duplicates.
  • No retries. If they don’t answer, there’s no second attempt.
  • No time-of-day check. The workflow calls at whatever hour the form arrives, including nights and weekends. The agent prompt’s hours block is for booking appointments, not for deciding when it’s okay to call. If you need this, add a condition before the call step.
  • The number has to arrive in the webhook. If body.phone arrives empty or with text, the normalization step fails and the workflow stops there.
  • It doesn’t validate that the number exists, only that it’s correctly formatted. A well-formed but nonexistent number is still dialed.
  • The dynamic variables arrive empty out of the box. Without them, the agent knows nothing about the lead beyond their phone number, and the post-call workflow is left without the email.

Next Steps

Lead management

The agent that takes this call.

Post-call lead management (HubSpot)

What happens when the call ends.

The Diga Piece

Reference for the Make Call action.

Dynamic Variables

Pass the form’s data to the agent’s prompt.