> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hiveku.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow Recipe: Auto-Sync Leads to Your CRM

> Automatically add form submissions to your CRM as new contacts with tags

Every form submission on your site becomes a tagged contact in the Hiveku CRM — with zero manual data entry.

<Info>
  Before you start: you'll need a form on your site and a CRM pipeline with at least one stage. See [Manage CRM Contacts](/how-tos/crm-contacts) if you haven't set up your pipeline yet.
</Info>

## The Flow at a Glance

<CardGroup cols={3}>
  <Card title="1. Webhook trigger" icon="bolt">
    Receives form submissions
  </Card>

  <Card title="2. Create contact" icon="user-plus">
    Add to CRM with tags
  </Card>

  <Card title="3. Notify (optional)" icon="bell">
    Slack, email, or sequence
  </Card>
</CardGroup>

## Step 1: Create the Workflow

<Steps>
  <Step title="Start a new workflow">
    Go to **Workflows** > **New Workflow**. Name it something obvious like `Website Form → CRM`.
  </Step>

  <Step title="Add a Webhook trigger">
    Click **Add Trigger** > **Webhook**. Copy the generated URL and wire it to your form's submit handler. Details in the [Slack notifications recipe](/how-tos/workflow-slack-notifications) if you need a code example.
  </Step>

  <Step title="Add a Create CRM Contact action">
    Click **+ Add Action** > **Create CRM Contact**. Fill in the field mappings:

    * **Name:** `{{trigger.name}}`
    * **Email:** `{{trigger.email}}`
    * **Phone:** `{{trigger.phone}}`
    * **Tags:** `website-lead`, `{{trigger.source || 'homepage-form'}}`
    * **Stage:** `New` (or your initial pipeline stage)
  </Step>

  <Step title="Save and enable">
    Click **Save**, flip the **Enabled** toggle, and submit a test form. The contact should show up in the CRM in under 10 seconds.
  </Step>
</Steps>

<Tip>
  Not sure which stage to use? Keep it simple — one "New" stage is fine to start. You can always add more stages later, and the workflow keeps working.
</Tip>

## Template Shortcut

If you want the whole flow (webhook + CRM + Slack + email sequence) in one click, start from a template instead:

**Workflows > New > Form Lead → CRM + Notifications**

It ships with sensible defaults; you just swap in your Slack URL and CRM stage.

## Adding Optional Steps

### Notify the Team

Add a second action after the CRM step — either an **HTTP Request** to a Slack webhook (see the [Slack recipe](/how-tos/workflow-slack-notifications)) or a **Send Email** action to alert sales@ your company.

### Start an Email Sequence

Add a **Start Email Sequence** action and pick the sequence (e.g., your 5-day welcome drip). The new contact is enrolled automatically. See [Cold Email](/how-tos/cold-email) for sequence setup.

### Assign to a Rep

If your pipeline uses round-robin assignment, add an **Assign Contact** action and either pick a specific rep or use `{{round_robin}}` to rotate.

## Handling Duplicates

By default the Create CRM Contact action creates a new row every time. If a visitor fills out two forms, you'll end up with two contacts — not ideal.

Add a conditional check before the create action:

<Steps>
  <Step title="Add a Find Contact step">
    Between the trigger and the create action, add **Find CRM Contact by Email** with `{{trigger.email}}`.
  </Step>

  <Step title="Add a Conditional">
    Branch on whether the contact was found:

    * **Found:** use **Update Contact** to append tags (keeps existing data)
    * **Not found:** use **Create Contact** as above
  </Step>

  <Step title="Optional — also update last-seen">
    In the update branch, set `last_submission_at` to `{{now}}` so you can see when a contact last engaged.
  </Step>
</Steps>

<Warning>
  Tags are case-sensitive. `Website-Lead` and `website-lead` are different tags. Pick a convention (lowercase-dashes is common) and stick to it.
</Warning>

## Test It

<Steps>
  <Step title="Submit with test data">
    Use a recognizable test email like `abe+test-1@example.com` so you can find and delete it later.
  </Step>

  <Step title="Check the CRM">
    Go to **CRM > Contacts**. The new contact should appear at the top of the list, with `website-lead` and your source tag applied.
  </Step>

  <Step title="Check tags and stage">
    Click the contact. Verify the stage is set correctly and all expected tags are present.
  </Step>

  <Step title="Submit again — check for dedupe">
    If you added the duplicate check, submit the same form again with the same email. The existing contact should update, not duplicate.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Contact never appears in the CRM">
    Open the workflow's **Runs** tab. If there are no runs, the trigger isn't firing — check your form's webhook URL. If runs exist but fail at the Create Contact step, the error message usually names the bad field (e.g., `email required`). Map it in the action and save.
  </Accordion>

  <Accordion title="Duplicate contacts on repeat submissions">
    Add the Find-then-branch pattern above. Without it, every submission creates a new row. For existing duplicates, **CRM > Contacts > Merge Duplicates** will clean them up.
  </Accordion>

  <Accordion title="Tags aren't applied">
    Two possibilities. First, tag names are case-sensitive — make sure `website-lead` matches exactly what's in the CRM. Second, some accounts require tags to be pre-created before they can be applied via workflow. Go to **CRM > Settings > Tags** and create the tag manually, then retry.
  </Accordion>

  <Accordion title="Spam submissions are filling the CRM">
    Two defenses: add a [honeypot field](/how-tos/site-enhancements) to your form (a hidden input that real users won't fill; if filled, reject), and add a Conditional step in the workflow that skips contacts where email contains suspicious patterns (gibberish, multiple + signs, etc.).
  </Accordion>

  <Accordion title="Email sequence doesn't kick off">
    The Start Email Sequence action only fires if the contact has a valid email and hasn't already been enrolled in that sequence. Check the contact's activity log — there should be an `enrolled` event. If not, the sequence might be paused — see [Cold Email](/how-tos/cold-email).
  </Accordion>
</AccordionGroup>

## What's Next?

<CardGroup cols={2}>
  <Card title="Slack Notifications" icon="slack" href="/how-tos/workflow-slack-notifications">
    Add real-time pings to this same workflow
  </Card>

  <Card title="Cold Email Sequences" icon="envelope" href="/how-tos/cold-email">
    Enroll new leads into a nurture drip
  </Card>

  <Card title="CRM Contacts" icon="address-book" href="/how-tos/crm-contacts">
    Manage pipeline stages, tags, and filters
  </Card>
</CardGroup>
