# Get by email

The Get Person by Email operation finds a person record in your contacts database using an email address as the search criterion.

This action is crucial for integrations with platforms where email is the primary identifier, such as marketing automation tools, e-commerce systems, website forms, and email-based support platforms.

If a contact with the exact email is found, the operation returns the person's full object, allowing you to use their data in subsequent steps of the flow.

#### How to Configure

1. In Hablla Studio, add the "People" block to your automation flow.
2. In the "Operation" field, select the "Get by Email" option.
3. In the "Email" field (`email`), enter the email address you want to use for the search. This value can be fixed text or, more commonly, a variable coming from a trigger.

***

### Parameters

| Field           | Type | Required? | Description                                          |
| --------------- | ---- | --------- | ---------------------------------------------------- |
| Email (`email`) | Text | ✅ Yes     | The exact email address of the person to be located. |

### Output Structure (Example Result)

If a person is found, the result will be a complete JSON object, identical to that returned by the other search operations.

JSON

```
{
  "id": "person_ghijkl789012",
  "name": "Ana Clara Costa",
  "customer_status": "customer",
  "is_blocked": false,
  "created_at": "2023-09-20T09:15:00Z",
  "phones": [
    {
      "type": "personal",
      "phone": "+5521988887777",
      "is_whatsapp": true
    }
  ],
  "emails": [
    {
      "email": "ana.costa@example.com"
    }
  ]
}
```

***

### 🚀 Example Use Case

Objective: When a customer opens a support ticket through a website form, look up their registration in Hablla to check if they are a "Premium" plan customer and, if so, prioritize their service.

1. Create a flow that starts with a Webhook trigger, receiving the support form data (including the customer's email).
2. Add the "People" block with the "Get by Email" operation.
3. In the "Email" field, enter the email variable coming from the trigger (`{{trigger.body.email}}`).
4. Add a Condition (If) block to check the value of the custom field `plan` in the search result: `{{steps.2.result.custom_fields.plano}}` is equal to `Premium`.
   * If Yes: Add a step to create the ticket in the support platform with "Urgent" priority.
   * If No: Create the ticket with "Normal" priority.

With this automation, you use the data you already have about your customers to provide a differentiated and more efficient service, without any manual effort.
