---
title: "Create customer when webhook received"
description: "A ready-made Shopify Flow workflow. Create a Shopify customer from a form submission or lead sent to your webhook, tagged webhook-lead. Collects leads from landing pages, form tools and events straight into Customers."
canonical: "https://docs.workflow-webhooks.app/template-create-customer"
---

# Create customer when webhook received

Create a Shopify customer from a form submission or lead sent to your webhook, tagged webhook-lead. Collects leads from landing pages, form tools and events straight into Customers.

One trigger from Workflow Webhooks and Shopify's built-in actions, no other app needed.

![The workflow in Shopify Flow: Create customer when webhook received](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/557a1aa21b4849c9.jpg)
*The complete workflow as it looks in Shopify Flow.*

## What it needs

A webhook in Workflow Webhooks with this payload mapping. See [Payload mapping and Flow variables](https://docs.workflow-webhooks.app/payload-mapping.md).

| Field | What to map to it |
| --- | --- |
| `fieldOne` | The email address |
| `fieldTwo` | The first name |
| `fieldThree` | The last name |

A call to the webhook then looks like this:

```bash
curl -X POST https://<your webhook URL> \
  -H "Content-Type: application/json" \
  -d '{"email": "jane.doe@example.com", "firstName": "Jane", "lastName": "Doe"}'
```

> [!WARNING]
> **More than one webhook?**
> The Webhook Trigger fires for every webhook in your store. If you have more than one, add a condition on `webhookId` **Equal to** this webhook's id right after the trigger.

## Get the workflow

1. Download the `.flow` file attached at the bottom of this page.
2. In your Shopify admin open **Flow**, click **Import** and choose the file.
3. Check the steps, then click **Turn on workflow**.

The file is an export from Shopify Flow itself. Do not edit it by hand; change the workflow in Flow after importing it.

## How it works

1. **Webhook Trigger** starts the workflow each time your webhook URL is called and hands it the mapped fields.
2. **Condition** continues only when `fieldOne`, the email address, is not empty.
3. **Send Admin API request** runs `customerSet` with the email, first and last name and the tag `webhook-lead`, which creates the customer.

## Make it yours

- Change the tag `webhook-lead` to the name of the form or campaign.

> [!NOTE]
> **Good to know**
> If a customer with that email address already exists, Shopify rejects the request and Flow marks the step as failed. The existing customer is not changed.

## Next steps

- [Create your first webhook](https://docs.workflow-webhooks.app/getting-started.md) - create the webhook this workflow listens to.
- [Workflow templates](https://docs.workflow-webhooks.app/workflow-templates.md) - all templates.
- [History and troubleshooting](https://docs.workflow-webhooks.app/history-and-troubleshooting.md) - check that the webhook reached Flow.
