# Ask Email

{% embed url="<https://app.supademo.com/demo/cmm93jjqt5t35dtfh8oew3voi?utm_source=link>" %}

The **Ask Email** action allows the chatbot to collect a **valid email address from users** during a conversation.

This action verifies that the user input follows the correct email format and stores the response in a variable. The captured email address can later be used for communication, confirmations, marketing campaigns, or CRM integration.

Ask Email is commonly used in workflows that require **contact information or user registration details**.

### **When to Use Ask Email**

Use the **Ask Email** action when the chatbot needs to collect a **customer's email address**.

**Common Use Cases**

* Event registrations
* Newsletter subscriptions
* Order confirmations
* Customer support follow-ups
* Lead generation

Example interaction:

Bot: Please share your email address so we can send your confirmation.\
\
User: <john@example.com>

The chatbot captures the email and stores it for further use.

### **How to Add Ask Email**

Follow these steps to add the Ask Email action to your bot workflow.

* Open **Bot Builder**
* Click **Add Node**
* Select the **Ask** tab
* Choose **Ask Email**
* Configure the required fields
* Click **Create**

Once added, the chatbot will pause at this step until the user enters a valid email address.

### **Ask Email Configuration**

When configuring the Ask Email action, several fields must be completed.

#### **Action Name**

The **Action Name** identifies the Ask Email action inside the bot workflow.

This name is visible only within the bot builder.

Example:

Collect Email Address\
Email for Confirmation\
User Email Input

#### **Message**

The **Message** field contains the prompt shown to the user.

Example:

Hello 👋\
\
Please share your email address so we can send you the event confirmation and updates.\
\
Example: <sample@gmail.com>

The message supports:

* Dynamic variables
* Text formatting
* Emojis

Variables can be inserted using the **Add Variable** option.

#### **Adding Variables**

The **Add Variable** feature allows dynamic values to be inserted into the message.

Examples include:

* Customer name
* Phone number
* Contact details

Example:

Hi {{customer.name}}

This helps personalize the conversation.

#### **Error Attempt**

The **Error Attempt** field defines how many invalid attempts are allowed.

Example:

Error Attempt: 3

If the user provides invalid input multiple times, the chatbot will trigger the configured **Action on Invalid**.

#### **Error Message**

The **Error Message** is displayed when the user enters an invalid email address.

Example:

Oops! That doesn't look like a valid email.\
Please enter your email in the correct format.

This message helps guide users to provide a valid email address.

#### **Action on Invalid**

This option determines what happens when the user exceeds the allowed error attempts.

Available options include:

**End the Flow**

Stops the chatbot conversation.

**Skip the Question**

Allows the chatbot to continue without collecting the email.

**Fall Back Flow**

Redirects the user to another predefined chatbot flow.

### **Store Response in Variable**

The **Store Response in Variable** option saves the email address for later use.

Example variable:

user\_email

This stored data can be used for:

* Email notifications
* Marketing campaigns
* CRM data collection
* Personalized messaging

#### **Example Ask Email Interaction**

Example chatbot conversation:

Bot: Hello 👋\
Please share your email address so we can send you the event confirmation and updates.\
\
User: <john@example.com>

The chatbot stores the email address in the variable:

user\_email

and continues the workflow.

### **Best Practices**

Follow these recommendations when using Ask Email.

**Provide an example email**

Showing an example helps users understand the expected format.

**Use clear instructions**

Explain why the email is required.

**Personalize messages**

Include dynamic variables where possible.

**Provide helpful error messages**

Guide users when invalid email formats are entered.

**Store responses properly**

Save email responses in variables for later automation.

### **Summary**

The **Ask Email** action enables chatbots to collect **valid email addresses from users**.

With Ask Email, you can:

* Capture customer email addresses
* Validate email format automatically
* Manage invalid responses effectively
* Store email data in variables
* Use email data for communication and marketing workflows

This feature helps businesses **build contact lists and automate customer communication efficiently**.


---

# 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://docs.ownchat.app/bot/ask-action/ask-email.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.
