# How to Create a Webhook Workflow in ZazzyAgent

Webhook Workflows let external systems send information to ZazzyAgent and trigger an automated process.

A simple example:

**Website form submitted**

↓

**ZazzyAgent webhook**

↓

**Customer data received**

↓

**WhatsApp message sent**

This guide explains the general setup.

## Before you start

You need:

*   A ZazzyAgent account
    
*   A connected WhatsApp account if you plan to send WhatsApp messages
    
*   An external application that can send a webhook
    
*   The data you want to receive
    
*   An appropriate WhatsApp template when required
    

## Step 1: Create a Webhook Workflow

Open the webhook workflow section in ZazzyAgent.

Choose **Create**.

Give the workflow a descriptive name.

Good:

> Website Lead Notification

> Shopify Order Notification

> Payment Confirmation

Avoid:

> Test Webhook

## Step 2: Select the WhatsApp account

Choose the WhatsApp account that should send the message when the workflow runs.

Make sure you're selecting the correct business number if multiple numbers are connected.

## Step 3: Select the message/template

If the workflow sends a WhatsApp message, select the appropriate template.

For business-initiated messaging outside the applicable customer service window, the message generally needs to use an approved WhatsApp template.

## Step 4: Create the workflow

Save the initial configuration.

After the workflow is created, ZazzyAgent provides the webhook callback URL.

## Step 5: Copy the webhook URL

Copy the webhook URL.

This is the URL your external application will send data to.

## Step 6: Configure the external application

Open the external application's webhook settings.

Paste the ZazzyAgent webhook URL.

Then select the event you want to send.

Examples:

*   New order
    
*   New customer
    
*   Form submission
    
*   Payment
    
*   Cart abandonment
    

The exact settings depend on the external application.

## Step 7: Send test data

Trigger a test event from the external application.

For example:

*   Submit your website form.
    
*   Create a test order.
    
*   Send a test webhook payload.
    

The goal is to give ZazzyAgent a real sample of the data structure.

## Step 8: Capture the webhook response

Open the webhook workflow in ZazzyAgent.

Use the webhook data capture functionality to receive the sample payload.

You should now be able to inspect the fields being received.

## Step 9: Map the data

Suppose your external application sends:

```text
customer.first_name
customer.phone
order.number
order.total
```

You can map:

**Customer Name → customer.first\_name**

**Phone Number → customer.phone**

**Order Number → order.number**

**Order Total → order.total**

The exact fields depend on the payload you receive.

## Step 10: Configure the WhatsApp message

Map the collected information into the appropriate template variables.

Example:

> Hi {{1}}, your order {{2}} has been confirmed.

Map:

**{{1}} → customer.first\_name**

**{{2}} → order.number**

## Step 11: Configure delay

If the workflow supports a delay, choose how long ZazzyAgent should wait before sending the message.

For an order-confirmation notification, you may want the message to go out immediately.

For another workflow, a delay may make more sense.

## Step 12: Add additional actions

Depending on the workflow, you can combine the webhook with other actions.

Examples:

*   Apply a label
    
*   Assign a conversation
    
*   Trigger a flow
    
*   Save information
    
*   Perform another supported automation step
    

## Step 13: Save the workflow

Save the completed configuration.

## Step 14: Run a real test

Trigger the external event again.

For an ecommerce workflow, place a test order.

For a website workflow, submit the actual form.

Then verify:

1.  External application sent the webhook.
    
2.  ZazzyAgent received it.
    
3.  Fields were mapped correctly.
    
4.  The workflow ran.
    
5.  WhatsApp message was generated.
    
6.  Customer received the message.
    

## Example: Website lead notification

Imagine your website has a contact form.

The customer submits:

**Name:** Priya

**Phone:** +91XXXXXXXXXX

**Requirement:** WhatsApp automation

Your form sends:

```text
name
phone
requirement
```

ZazzyAgent receives those fields.

You map:

**Name → name**

**Phone → phone**

**Requirement → requirement**

Then send:

> Hi Priya, thanks for contacting us. We received your enquiry about WhatsApp automation and our team will get back to you.

## Example: Shopify order notification

A Shopify order is created.

Shopify sends order data to the webhook.

ZazzyAgent maps:

*   Customer name
    
*   Phone
    
*   Order number
    
*   Products
    
*   Other supported values
    

Then sends the appropriate approved WhatsApp template.

## Webhook troubleshooting

### The webhook isn't receiving data

Check the URL carefully.

A single missing character can cause a webhook failure.

Also confirm that the external application actually sent the event.

### The webhook is receiving data but fields aren't showing

Capture a fresh test payload.

Then inspect the actual field names.

### Customer name is blank

Check your mapping.

The external system may use a different location for the customer's name than you expected.

### Phone number is wrong

Check the incoming data and formatting.

Make sure the value contains a usable WhatsApp number.

### Message isn't sending

Check:

*   WhatsApp account
    
*   Template
    
*   Template approval
    
*   Message variables
    
*   Customer eligibility
    
*   Message status
    

## Test with realistic data

Don't test only:

> John

> 9999999999

Test the same kind of information your real system will send.

Include:

*   Different names
    
*   International numbers when relevant
    
*   Missing fields
    
*   Long product names
    
*   Empty values
    
*   Different order sizes
    

That makes the automation much more reliable when it goes live.

## Final workflow

The complete setup looks like:

```text
External Event
      ↓
Webhook URL
      ↓
Capture Data
      ↓
Map Fields
      ↓
Optional Conditions / Actions
      ↓
WhatsApp Template
      ↓
Customer
```

Once this pattern makes sense, you can connect many different business events to WhatsApp automation.
