> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/analyze/integrated-webhooks/integrated-webhooks-common-questions/integrated-webhooks-creating-leads-through-elementor-forms.md).

# Integrated Webhooks - Creating leads through Elementor Forms

This example shows how to configure a form in Elementor (WordPress plugin) to send a webhook to Sprinthub and automatically create leads when it is submitted.

## Understanding Form Fields

When editing a form element, a mapping of the fields will be displayed. These fields will be sent to the Sprinthub webhook, with the label names used as keys in the JSON. The webhook generated by the configuration below will have the following format:

`{`\
&#x20; `"Name": "Enki Sprinthub",`\
&#x20; `"Email": "enki@sprinthub",`\
&#x20; `"Message": "Hello, I would like to know more about the platform"`\
`}`

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FE6JCRykUgEHmLKJW67R8%2FScreenshot_4.png?alt=media&amp;token=ba6a6fcb-8da0-4e8a-865d-4a15c07dbb49" alt=""><figcaption><p><em>Form fields.</em></p></figcaption></figure>

## Mapping the Webhook within Sprinthub

A passive webhook was created in Sprinthub to receive the data sent by this external form. The request body mapping must match exactly the format mentioned above, with identical names. The request method was configured as POST, using the 'Email' field as the lead identifier. This avoids lead duplication and makes it possible to identify leads already existing in the system.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FK8d28h1czdsphwWPDSMh%2FScreenshot_5.png?alt=media&amp;token=5abcccdb-60e8-4e1f-be6c-2efdb21c1632" alt=""><figcaption><p><em>Webhook mapping.</em></p></figcaption></figure>

## Elementor Forms - Adding a Webhook action

It is necessary to add the 'Webhook' action to the form in the 'Actions After Submit' option. This will allow you to insert the webhook link configured in Sprinthub.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FvfXvgFb2aGXt8nlXYMbw%2FScreenshot_2.png?alt=media&amp;token=d9699de5-65a6-47f4-a000-9b6d6090e53d" alt=""><figcaption><p><em>Adding a Webhook action.</em></p></figcaption></figure>

## Adding the 'Webhook URL' with the *access\_token*.

In the 'Webhook URL' field, enter the webhook link generated in Sprinthub, available on the left side of the page. Then add the `access_token` as a query parameter using the character `&`. The link will have the following format:

```
https://sprinthub-api-master.sprinthub.app/api/hook/criando-leads?i=instancia_demo&access_token=_JYmznRqZj9UKbV5gtMRgPfNKW0_m7va_6MJ8ABzl4ecwguvvD
```

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2Fe5HOTkfP50qO4wLseuZ9%2Fimage.png?alt=media&amp;token=1a96805d-9522-44c0-9fe4-8698e0b70ff7" alt=""><figcaption><p><em>URL within Sprinthub.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FH5qylH5kAZicDcRIcP1x%2FScreenshot_3.png?alt=media&amp;token=74361187-015e-4d0f-97d2-8017d14c3124" alt=""><figcaption><p><em>Field to insert the URL in Elementor.</em></p></figcaption></figure>

## Configuring Automatic Lead Creation

Finally, in the 'Automatic Lead Creation' section, enable the 'Enable automatic creation?' option. Make sure the lead fields are properly mapped to match the data received by the webhook. After saving and closing, the webhook will be configured to register leads directly from your WordPress platform with Elementor.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2F4Tgs1y8vyGfVlokHhkCZ%2Fimage.png?alt=media&amp;token=a3f8e9b9-dafb-49b3-bb6a-55a299d67f33" alt=""><figcaption><p><em>Automatic Lead Creation tab.</em></p></figcaption></figure>
