AI machine for processing inquiries from the web and email step by step

AI ideas ChatGPTDataGoogleGuidesSolution

Today, companies commonly receive inquiries from two main channels: web forms and email. The problem arises when these messages arrive in different formats, with incomplete data and in fluctuating volumes. One day three arrive, the next day thirty. Manually sorting them, rewriting them into the CRM, and figuring out what the customer actually wants then takes dozens of minutes a day and increases the risk of errors and delayed responses.

This is exactly where automation using AI makes sense. The goal is not to replace the salesperson or support team, but to remove repetitive steps: take over the incoming inquiry, recognize the intent, extract key data, assign priority, write the record into a CRM or spreadsheet, and prepare a draft reply. If you design the whole process sensibly, you get a functional MVP that can be deployed even without complex development of a custom system.

In this article, we will build a practical project step by step. The goal is a real minimum viable solution: a web form and incoming email are automatically stored, AI extracts structured data from them, determines the inquiry category, sets the priority, creates a record in a CRM or Google Sheets, and sends an internal notification. Optionally, it also prepares a reply draft for the salesperson. The procedure is designed to be feasible without extensive programming, while at the same time containing enough concrete detail to actually be launched.

Introduction

Stock image

Illustrative context for the topic continues below.

article-ai-1

A typical web inquiry contains a name, email, phone number, message, and sometimes a service selection. Email inquiries tend to be less structured: the customer writes what they need, by when, and often adds an attachment. If a person processes these inputs manually, they must decide at least four things: what type of inquiry it is, whether it has all the necessary information, who to pass it to, and how quickly to respond.

OpenAI

AI is particularly suitable in this scenario for two tasks. First, for classification and data extraction from unstructured text. Second, for preparing a consistent output for downstream systems, such as a CRM, helpdesk, or spreadsheet. The key, however, is to design the process so that it is verifiable. That means working with clearly defined inputs, a precise output schema, measuring success, and accounting for limits, such as model hallucinations or incomplete data.

In this guide, we will use a combination of Google Forms, Gmail, Make, the OpenAI API, Google Sheets, and optionally HubSpot CRM. All of them are realistically available, have official documentation, and for an MVP cover the entire flow from receiving an inquiry to internal handoff.

Project goal

Stock image

The goal of the project is to set up an automation that can handle the following flow:

OpenAI

  • receive an inquiry from Google Forms or Gmail,
  • store the raw content in Google Sheets as an audit record,
  • use the OpenAI API to determine the inquiry category, extract key fields, and assign priority,
  • check whether any essential data is missing,
  • create or update a record in HubSpot CRM, or alternatively in Google Sheets,
  • send a notification to email or Slack,
  • optionally prepare a reply draft for the salesperson.

You can recognize a functional MVP by the fact that within a few minutes of a new inquiry arriving, a structured record with the same fields is created without manual rewriting. The operator then only checks the result and handles the actual business case, not the administration around it.

Prerequisites

Stock image

Before you start, prepare a few basic things. Technically, this is not a demanding project, but without good inputs the result will be unreliable.

OpenAI

  • Google account for Google Forms, Google Sheets, and Gmail.
  • Make account: https://www.make.com
  • API access to OpenAI: https://platform.openai.com
  • Optional HubSpot account: https://www.hubspot.com/products/crm
  • Clearly defined inquiry categories, for example “new project,” “service,” “price quote,” “general inquiry,” “spam.”
  • List of required fields, for example name, email, service type, deadline, location, budget.

It is also important to know what the project will not address yet. For example, this MVP does not cover fully automatic sending of binding business replies without human review. A reply draft yes, final sending without supervision only if the domain and type of communication are truly simple and the risk of error is low.

Implementation steps

Step 1: Design the data model and decision rules

What and why: Before you connect AI, you need to know what the correct output should look like. The model should not guess what your company considers a “high-priority inquiry.” You must define that. The data model and rules are the foundation that will make outputs consistent and measurable.

OpenAI

How exactly: In Google Sheets, create a sheet named Leads and create the columns:

received_at | source | raw_text | name | email | phone | company | inquiry_type | service | budget | deadline | location | priority | missing_fields | summary | suggested_reply | status

Then write down the allowed values for the inquiry_type and priority fields. For example:

  • inquiry_type: new project, service, price quote, partnership, general inquiry, spam
  • priority: high, medium, low

Also add a simple priority rule. For example: if the message contains a specific deadline within 7 days and a budget above CZK 50,000, set high priority. If contact information is missing, it cannot be higher than medium.

Specific input: Column raw_text with the value: Hello, we need a quote for implementing a chatbot for an e-shop within 14 days, budget approx. CZK 80,000. Contact: Jana Nováková, jana@firma.cz

Specific output: A row with values inquiry_type=price quote, priority=high, deadline=within 14 days, budget=80000.

Action:

  1. Create the Leads sheet in Google Sheets.
  2. Write the allowed field values into a second sheet called Dictionary.
  3. Determine the required fields for handing off to sales, for example email, inquiry_type, summary.

Step output: A finished data model and list of rules.

Success metric: 100% of internally approved fields and categories before launching the automation.

This step prepares a solid framework. In the next step, we will start sending real inquiries from the web and email into it.

Step 2: Prepare inputs from the web form and Gmail

What and why: AI needs a stable data source. For the web, a structured form is ideal; for email, reliable capture of the subject, message body, and sender is key. The purpose of this step is to unify both channels into one flow.

How exactly: In Google Forms, create a form with the fields:

  • First and last name
  • Email
  • Phone
  • Service type
  • Inquiry description
  • Requested deadline
  • Budget

In the menu, choose Responses > Link to Sheets and connect the form to Google Sheets.

For Gmail, create a scenario in Make with the Gmail > Watch emails module. In the settings, you can use a query such as:

label:inbox newer_than:7d -category:social -category:promotions

If you want to process only inquiries sent to a specific address, use the filter:

to:poptavky@firma.cz

Specific input: Form field Service type with the value AI chatbot or an email with the subject Inquiry about customer support automation.

Specific output: In Make, an item arrives with attributes from, subject, bodyPlain, and for the form a row in the spreadsheet with specific columns.

Action:

  1. Create the Google Form and mark email and inquiry description as required.
  2. Connect the form to Google Sheets.
  3. In Make, create a new scenario for Gmail intake.
  4. Set a filter for the target mailbox or label.

Step output: Two functional input channels: web form and email.

Success metric: At least 95% of test forms and emails appear in the workflow without loss of basic fields.

Once the inputs are arriving reliably, we can unify them into one working layer and create an audit record.

Step 3: Unify inputs into a single record in Google Sheets

What and why: The web form and email have different structures. For the next steps, they need to be converted into a unified format. This gives you one place where you can see the raw data as well as the fields later calculated by AI.

How exactly: In Make, create two scenarios or one scenario with two branches. Both should end with the Google Sheets > Add a Row module in the Leads sheet. Map at least these fields:

  • received_at = date and time received
  • source = web_form or email
  • raw_text = merged inquiry text
  • email = email from the form or sender address
  • status = new

For email, prepare a simple text template that combines the subject and body:

Subject: {{subject}}
Sender: {{from}}
Message: {{bodyPlain}}

For the form, similarly:

Name: {{Jméno a příjmení}}
Email: {{E-mail}}
Phone: {{Telefon}}
Service type: {{Typ služby}}
Deadline: {{Požadovaný termín}}
Budget: {{Rozpočet}}
Description: {{Popis poptávky}}

Specific input: Gmail subject=Inquiry about AI chatbot, from=jan.novak@example.cz, bodyPlain=We need to deploy a chatbot within 3 weeks.

Specific output: The raw_text column contains the full merged text in a stable format.

Action:

  1. In Make, add the Tools > Set variable module or a text aggregator to compose raw_text.
  2. Map the fields into Google Sheets.
  3. Set the default value new in the status column.

Step output: Every inquiry has a unified audit record in the spreadsheet.

Success metric: 100% of new inquiries contain filled received_at, source, raw_text, and status.

Now we have the input data reliably stored. Next comes the most important part: turning unstructured text into structured data.

Step 4: Extract data and classification using the OpenAI API

What and why: This step turns ordinary forwarding into true intelligent automation. The model reads the inquiry text, determines the type, extracts contact details, recognizes the budget and deadline, creates a summary, and marks missing fields.

How exactly: In Make, add the HTTP > Make a request module and call the OpenAI Responses API. If you are using the official endpoints according to the documentation, set:

POST https://api.openai.com/v1/responses

Headers:

Authorization: Bearer YOUR_OPENAI_API_KEY
Content-Type: application/json

Example request body:

{
  "model": "gpt-4.1-mini",
  "input": [
    {
      "role": "system",
      "content": "You are an inquiry extractor for a B2B company. Return only JSON according to the given schema. If a value is missing, return null. Do not make anything up. inquiry_type must be one of: nova_zakazka, servis, cenova_nabidka, partnerstvi, obecny_dotaz, spam. priority must be: vysoka, stredni, nizka."
    },
    {
      "role": "user",
      "content": "Process this inquiry: Subject: Inquiry about AI chatbot. Sender: jan.novak@example.cz. Message: We need to deploy a chatbot for an e-shop within 3 weeks, budget CZK 120,000. Contact Jan Novák, tel. 602123456."
    }
  ],
  "text": {
    "format": {
      "type": "json_schema",
      "name": "lead_extraction",
      "schema": {
        "type": "object",
        "properties": {
          "name": {"type": ["string", "null"]},
          "email": {"type": ["string", "null"]},
          "phone": {"type": ["string", "null"]},
          "company": {"type": ["string", "null"]},
          "inquiry_type": {"type": "string"},
          "service": {"type": ["string", "null"]},
          "budget": {"type": ["number", "null"]},
          "deadline": {"type": ["string", "null"]},
          "location": {"type": ["string", "null"]},
          "priority": {"type": "string"},
          "missing_fields": {"type": "array", "items": {"type": "string"}},
          "summary": {"type": "string"},
          "suggested_reply": {"type": "string"}
        },
        "required": ["inquiry_type", "priority", "missing_fields", "summary", "suggested_reply"],
        "additionalProperties": false
      }
    }
  }
}

Specific input: API parameter model=gpt-4.1-mini and the inquiry text in the user message.

Specific output: JSON for example:

{
  "name": "Jan Novák",
  "email": "jan.novak@example.cz",
  "phone": "602123456",
  "company": null,
  "inquiry_type": "cenova_nabidka",
  "service": "AI chatbot for e-shop",
  "budget": 120000,
  "deadline": "within 3 weeks",
  "location": null,
  "priority": "vysoka",
  "missing_fields": ["company", "location"],
  "summary": "Inquiry about deploying an AI chatbot for an e-shop with a budget of CZK 120,000 and a deadline within 3 weeks.",
  "suggested_reply": "Hello, thank you for your inquiry about an AI chatbot for your e-shop..."
}

Action:

  1. In Make, add an HTTP request to OpenAI.
  2. Insert a system prompt prohibiting invented data.
  3. Use a JSON schema so the output is stable.
  4. Parse the result and prepare it for writing into the spreadsheet.

Step output: Structured JSON with classification, data extraction, and a reply draft.

Success metric: At least 85% of test inquiries return valid JSON without manual format correction.

We now have a smart output, but so far only as an API response. In the next step, we will store it and connect it to the internal process.

Step 5: Write the result into Google Sheets and mark incomplete inquiries

What and why: The AI result must be traceable and editable. Google Sheets is ideal for an MVP because you can easily check individual values, trace errors, and create filters for the sales team.

How exactly: After the OpenAI module in Make, insert Google Sheets > Update a Row. Based on the row number, fill in the columns name, email, phone, inquiry_type, budget, deadline, priority, missing_fields, summary, and suggested_reply.

Store the list in the missing_fields field, for example as comma-separated text:

company, location

Then in Make add a filter:

  • If length(missing_fields) > 0, set status=needs_review
  • Otherwise set status=ready

Specific input: Field missing_fields from the AI response with the value ["company", "location"].

Specific output: The spreadsheet gets the status needs_review.

Action:

  1. Map the JSON fields to the corresponding columns in the Leads sheet.
  2. Add a filter based on the number of missing fields.
  3. Create a view or filter in Google Sheets for rows with the status needs_review.

Step output: After AI processing, every inquiry is either ready or marked for review.

Success metric: 100% of processed records receive the status ready or needs_review.

This gives you visibility and control. The next logical step is to pass completed inquiries into the CRM or sales records.

Step 6: Create or update a record in HubSpot CRM

What and why: If the output remains only in a spreadsheet, the sales team often ends up doing double work. The CRM is where inquiries are actually processed. Automatic entry saves time and ensures nothing gets lost.

How exactly: In Make, use the HubSpot CRM > Create or Update a Contact module and then as needed Create a Deal or create a ticket. Map for example:

  • email → contact email
  • firstname and lastname → split name, if available
  • phone → phone
  • custom property inquiry_type → inquiry type
  • custom property ai_summary → AI summary
  • custom property lead_priority → priority

In HubSpot, it is advisable to create custom properties in advance in the Settings > Properties menu. For example:

  • inquiry_type as a dropdown
  • lead_priority as a dropdown
  • ai_summary as multi-line text

Specific input: HubSpot contact property lead_priority with the value vysoka.

Specific output: A contact is created in the CRM or an existing record is updated based on the email.

Action:

  1. Create custom properties in HubSpot.
  2. Connect the HubSpot connector in Make.
  3. Map fields from Google Sheets or directly from the AI response.
  4. Set deduplication by email.

Step output: A new or updated inquiry in the CRM.

Success metric: At least 90% of inquiries are correctly matched to a contact without duplicate creation.

Once the record gets into the CRM, you need to ensure someone notices it in time. That is why we add a notification and an optional reply draft.

Step 7: Send an internal notification and prepare a reply draft

What and why: Automation is not just about writing data, but also about fast response. An internal notification helps salespeople react in time, and a reply draft shortens the time to first contact.

How exactly: In Make, add the Slack > Create a Message or Gmail > Send an Email module. Send a brief message with the most important information. For example, a Slack template:

New inquiry
Source: {{source}}
Type: {{inquiry_type}}
Priority: {{priority}}
Contact: {{name}} / {{email}}
Summary: {{summary}}
Missing data: {{missing_fields}}

If you want to send the reply draft internally to the salesperson, send the suggested_reply field by email or store it in a CRM note. To start with, I recommend not sending the reply automatically to the customer, but leaving it for approval.

Specific input: Field suggested_reply from the AI output.

Specific output: Internal email with the subject [AI] New inquiry - high priority and the inserted reply draft.

Action:

  1. Select the target channel: Slack or internal email.
  2. Create a brief text notification template.
  3. Add a condition: high priority goes immediately to the salesperson, others to a shared channel.

Step output: The sales team receives a notification and a usable reply draft.

Success metric: A notification is sent for 100% of inquiries with the status ready and within 5 minutes of receipt.

This completes the basic operation. What remains is to validate the project on real data to reveal where AI makes mistakes and what needs fine-tuning.

Testing

Testing must be practical and repeatable. It is not enough to send two sample messages and conclude that “it works.” Prepare at least 30 test inquiries divided into categories: standard inquiry, incomplete inquiry, email without a signature, spam, short question, inquiry with attachment, urgent request.

NordVPN

In a separate sheet TestCases, store:

  • input text,
  • expected inquiry type,
  • expected priority,
  • fields that should be extracted,
  • actual output,
  • correctness evaluation.

Measure at least these metrics:

  • Classification accuracy: how many inquiries received the correct inquiry_type.
  • Email and phone extraction accuracy: how many values were extracted correctly.
  • Share of valid JSON outputs: how many API responses could be written into the spreadsheet without correction.
  • Processing time: from receipt to writing into the CRM or spreadsheet.

A practical MVP target may look like this:

  • classification accuracy at least 85%,
  • correct email extraction at least 95%,
  • correct phone extraction at least 85%,
  • processing within 5 minutes.

If the model often makes mistakes in a specific category, first adjust the prompt and schema, not the whole stack. For example, instead of the generic “determine the inquiry type,” explicitly list the allowed values and a short definition of each. If AI invents missing data, tighten the system prompt with wording such as “if the value is not explicitly stated, return null.”

Deployment

MVP deployment should happen gradually. First launch a mode with human review, and only then consider a higher degree of autonomy.

Make

  1. Phase 1: Shadow mode — the workflow runs, but outputs are only written into the spreadsheet and notifications. The team continues working manually and compares the results.
  2. Phase 2: Semi-automation — AI processes the input, creates a record in the CRM, but a human always approves the reply to the customer.
  3. Phase 3: Selective automation — for simple questions, you can consider automatically sending a template reply if the risk is low.

In Make, set scenario scheduling as needed. For forms, continuous triggering often makes sense; for email, for example every 5 minutes. Monitor run history and errors in Make in the Scenario > History section. If a module fails, add an error branch that sends an alert to the administrator by email.

For operational monitoring, I recommend introducing three simple checks:

  • number of received inquiries per day,
  • number of items in the needs_review status,
  • number of scenario errors in Make.

This will quickly show whether the input format has changed, a connector has broken, or the model has started returning non-standard outputs.

Limits

This type of solution also has clear limitations. It is important to describe them openly, not hide them behind promises of “fully autonomous AI.”

NordVPN

  • The model may make mistakes in text interpretation. Especially with brief or ambiguous messages, it may incorrectly determine the category or priority.
  • Data extraction depends on input quality. If the customer does not provide a phone number or email in the body and the sender uses an anonymous address, the system will not obtain the data.
  • Attachments are not fully processed in this MVP. If you need to read PDFs or images, that is a separate project extension.
  • Automatic replies carry reputational risk. Without human review, they may sound inaccurate or inappropriate in some industries.
  • API pricing and limits may change. You need to continuously monitor the official provider documentation.

If you are not sure about accuracy for a specific type of inquiry, treat it as a limitation and keep human approval in place. This applies especially to legal, healthcare, financial, or contract-sensitive cases.

FAQ

Do I need to know how to program?

Not necessarily. For an MVP using Google Forms, Google Sheets, Make, and the OpenAI API, basic work with forms, spreadsheets, and field mapping is enough. Familiarity with JSON helps, but there is no need to build your own application.

Is it better to start with a web form or email?

If you can influence the input format, start with a web form. It has more structured data and you will achieve a reliable result faster. Add email immediately afterward as the second channel.

Can I use a CRM other than HubSpot?

Yes, if it has an available API or connector in Make. The principle remains the same: first unify the data, then write it into the correct CRM fields.

How do I prevent AI from making up data?

Use a strict system prompt, a JSON schema, and the rule “if the value is not in the input, return null.” Also test on real messages and monitor the fields where the most frequent errors occur.

Does it make sense to automatically reply to customers?

For simple receipt confirmations, yes, but for business or expert replies I recommend keeping human approval in the MVP. Otherwise, the risk of inaccuracy is unnecessarily high.

How should spam be handled?

Add the spam category directly into the classification. If the model and simple rules, such as suspicious keywords or missing meaningful content, mark a message as spam, store it but do not send it to the CRM.

Recommended AI stack for implementation

Service Service description Offer
NordVPN VPN service for privacy protection and secure connections. Open offer
Semrush SEO and marketing platform for analysis and traffic growth. Open offer
Make Advanced visual automation for workflows and integrations. Open offer
Hostinger Web hosting and domains for fast website launch. Open offer
Fiverr Marketplace for freelancers and external specialists. Open offer
Adobe Creative tools for graphics, video, and digital content. Open offer
Canva Online design tool for graphics, presentations, and social media. Open offer
Jasper AI tool for marketing copy and content campaigns. Open offer

Note: We use affiliate links for listed services. If you purchase through them, we may earn a commission at no extra cost to you.

Links in the article

Sources of illustrative images