# How To Capture Details Using Webhooks And Condition

Capture customer details based on their interaction (replying or clicking a button in the template) and store them in Google Sheets.

#### **Steps**

**1. Set Up Webhook Trigger**

* Configure the workflow to be triggered by a webhook.
* Copy the provided **Webhook URL** and paste it into the required **Webhooks Section** of your platform.

**2. Map the Incoming Data**

* In the workflow configuration, identify the field where customer data is stored.
* For the **Phone Number Field**, select **"From"** as the source.

**3. Add a Condition for Button Interaction**

* Attach the condition to the **Webhook Trigger**.
* Set up the condition as follows:
  * **Field**: message.type
  * **Operator**: Contains
  * **Value**: BUTTON (case-sensitive, ensure exact match or copy from bot logs).

**4. True Branch: Store Clicked Button Data**

* If the condition evaluates to **True** (customer clicked a button):
  * Extract the relevant details (e.g., phone number, message content).
  * Save the data into the designated **Google Sheet**.

**5. False Branch: Store No Interaction Data**

* If the condition evaluates to **False** (customer did not click any button):
  * Save the details into a **Separate Google Sheet** to keep track of non-interactive customers.

#### **Summary**

* The workflow will differentiate between customers who clicked buttons and those who didn’t.
* Two separate Google Sheets will maintain records for **interactive** and **non-interactive** customers.
* Ensure data mapping and webhook integration are correctly tested before going live.\\

![IMG\_256](/files/HYLhaItLXiH5c7sN2y1O)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.doubletick.io/automations-and-integrations/how-to-capture-details-using-webhooks-and-condition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
