Stepthrough Start free

Build an AI Emergency Request Form for Your Plumbing Company

Practice it step by step

Start the free practice

Take the free module: why it matters, practice and a quick check →

You do every step yourself in a practice copy of Lovable and n8n. It checks your work as you go, and “Do it for me” finishes any step you get stuck on. Free, about 15 minutes, and nothing touches your real accounts. Open full screen

Free · Live nowAI Automation for PlumbersLovablen8nOpenAIGoogle SheetsGmail~15 min93 stepsAdvanced

Updated . Built against the tool’s current screens and checked step by step. How we check this lesson

A pipe bursts under the kitchen sink and the homeowner cannot find the shutoff. Your website form should treat that very differently from a dripping faucet. In this free lesson you build a request form for Blue Maple Plumbing in Lovable and connect it to an n8n AI dispatcher that sets the priority, logs the job and emails next steps.

At a glance

QuestionAnswer
What you buildBuild an emergency service-request form in Lovable and connect it to an n8n workflow — webhook trigger, AI Agent that prioritizes the job, Google Sheets, Gmail, and a Respond node that ties it all together.
ToolsLovable and n8n
TimeAbout 15 minutes, 93 steps in 15 parts
LevelAdvanced
CostFree
Ways to learn itPractice it step by step, watch the video

The 15 parts, in short

  1. Sign up: Get started with Lovable.
  2. Build the form: Click the prompt box, Describe the form, Open the mode picker, Keep Build mode, and 1 more step.
  3. New workflow: Start a new workflow.
  4. Webhook trigger: Add the first step, Webhook trigger, Change the response mode, Use a Respond node, and 1 more step.
  5. AI Agent: Add the next node, Add the AI Agent, Change the prompt source, Define it manually, and 5 more steps.
  6. Chat model: Give the agent a brain, Pick OpenAI, Open the credentials, Create a new credential, and 5 more steps.
  7. Sheets tool: Add a tool, Add Google Sheets.
  8. Create the spreadsheet: Back to the canvas, Open Google Sheets, Name the spreadsheet, Type the first column header, and 5 more steps.
  9. Sheets tool: Add a credential, Create a new credential, Sign in with Google, Choose your account, and 13 more steps.
  10. Gmail tool: Add another tool, Add Gmail, Add a credential, Create a new credential, and 10 more steps.
  11. Respond node: Add the respond node, Respond to Webhook, Back to the canvas.
  12. Publish: Publish the workflow.
  13. Add the secret: Open the webhook, Production URL, Copy the URL, Back to the canvas, and 7 more steps.
  14. Test the form: Open the form, Fill the form, Submit the form.
  15. Publish the app: Open Publish, Publish, Check the spreadsheet.

Start here first: Lovable + n8n: Build a Web App with an AI Backend. This Plumbing version follows the same build with its own example business, Blue Maple Plumbing.

Build an AI Emergency Request Form for Your Plumbing Company: video walkthrough

The whole lesson in 9:17, narrated step by step.

Simulated practice environment. Recorded in Stepthrough’s simulated practice environment, not the live tool. Practice it yourself free at learn.ynteractive.com.

9:17 · 15 chapters · 93 steps · narrated with the lesson’s own voice-over

Chapters

Click a chapter to jump the video there.

  1. 0:00 Intro: what you'll build
  2. 0:11 Sign up
  3. 0:29 Build the form
  4. 1:04 New workflow
  5. 1:15 Webhook trigger
  6. 2:00 AI Agent
  7. 3:24 Chat model
  8. 4:03 Sheets tool
  9. 4:18 Create the spreadsheet
  10. 4:59 Sheets tool
  11. 6:06 Gmail tool
  12. 6:58 Respond node
  13. 7:22 Publish
  14. 7:34 Add the secret
  15. 8:34 Test the form

Now do it yourself, free

Watching is the warm-up. The interactive lesson puts you in a practice copy of Lovable and n8n: you do every step yourself, it checks your work, and “Do it for me” finishes any step you get stuck on. Nothing touches your real accounts.

Practice “Build an AI Emergency Request Form for Your Plumbing Company” step by step

Full transcript

Intro: what you'll build

0:00 It all comes together. An emergency request form in Lovable for blue maple plumbing. Then an AI agent sets the priority, saves it to Google Sheets, and emails the next steps. Let's build it.

Sign up

0:11 In the first module you built a Custom GPT. In the second, you built an AI agent inside n8n. Now you are going to combine a real web app with an AI-powered backend: an emergency request form for Blue Maple Plumbing. Lovable is a tool that builds web apps from a text description. Click get started for free.

Build the form

0:28 This is your Lovable dashboard. Every project you build shows up here. Click start with a prompt to create a new one.

0:35 This is the prompt that tells Lovable what to build. It describes a clean service request form with Name, Email, Problem, and Address fields, and tells it to send each request to an n8n webhook URL pulled from a secret config — not hardcoded. Click paste prompt.

0:51 Click build. Lovable reads your prompt, generates the code, and deploys a live web app. In a few seconds you have a working request form. Now we need to build the AI workflow that handles what happens when a homeowner submits it.

New workflow

1:04 Now you are in n8n. This is the workflow automation tool you used in the last module. This time, instead of a chat trigger, we are going to use a webhook — so the form can send data directly to n8n. Click create workflow.

Webhook trigger

1:15 Every workflow starts with a trigger. Last time we used a chat trigger. This time we want a webhook — an HTTP endpoint the form can POST to. Click add first step.

1:25 On webhook call. A webhook is just a URL that waits for incoming data. When a homeowner submits the Lovable form, it sends the name, email, problem, and address as JSON to this webhook.

1:35 One important setting. By default, the webhook responds immediately, before the AI agent even runs. We need it to wait until the agent is done, so the form knows the submission succeeded. Click the respond dropdown.

1:46 Using respond to webhook node. This tells n8n: do not send a response yet. Wait until you hit a dedicated respond node further down the chain. That way the form gets a real confirmation after the AI agent has processed everything.

1:57 That is the webhook set up. Close the node.

AI Agent

1:59 Now we decide what happens when the form data arrives. Click the plus on the right edge of the webhook.

2:05 AI Agent. Same node as last time, but now it handles form submissions instead of chat messages. It will read the form data, save it to Google Sheets, and send a personalized reply via Gmail.

2:16 This time the prompt does not come from a chat trigger — it comes from the webhook. We need to change the source so we can write our own prompt template. Click the source dropdown.

2:25 Define below. This lets us write a prompt that pulls the form fields directly from the webhook data.

2:30 Here is the prompt template. It uses n8n expressions — those double curly braces — to pull the name, email, problem, and address from the webhook body. Each time the form is submitted, the agent gets a prompt with the real data. Click paste prompt template.

2:45 Now we need a system message — the standing instruction that tells the agent what to do with every submission. Click add option.

2:53 System message. This is where we tell the agent how urgent each request is, to save it to Google Sheets, and to send a confirmation email via Gmail.

3:01 Here is the system message. It tells the agent to sort every request into emergency, same-day, or scheduled — a burst pipe is an emergency, no hot water is same-day. Then it saves the request with the Google Sheets tool and emails the customer a confirmation with their priority through Gmail. Click paste system message.

3:18 The agent is configured. It knows to save to Sheets and reply via Gmail. Close the node.

Chat model

3:23 The agent needs a model to think with. Click the plus under chat model.

3:27 OpenAI Chat Model. If you did the last module, this part will feel familiar.

3:31 Click the credential dropdown to connect your OpenAI API key.

3:35 Create new credential. If you already made one in the last module, you could pick it from the list. We will create a fresh one here.

3:41 Paste your OpenAI API key. If you followed the previous module, you already have one. If not, go to platform dot openai dot com, add credit, and create a key.

3:51 Hit save. n8n tests the connection and stores the key.

3:54 Now the model dropdown.

3:56 GPT five mini. Fast, cheap, and plenty smart for processing form submissions.

4:01 Model is wired up. Close it.

Sheets tool

4:03 Now the tools. The system message told the agent to use Google Sheets and Gmail — but it cannot do either until we give it the actual tools. Click the plus under tool.

4:12 Google Sheets Tool. This lets the agent save form submissions as rows in a spreadsheet.

Create the spreadsheet

4:17 Before we configure this node, we need to create the actual spreadsheet. Close this for now — we will come right back.

4:23 Switch to the Google Sheets tab. You need to create the spreadsheet that the Sheets node will write to.

4:29 Name it Service Requests — this is where every request from the form will go.

4:33 Now set up the column headers. These need to match the form fields. In A1, type Name.

4:38 B1 — Email.

4:39 Cell C1 — Problem.

4:41 And D1 — Address. Four columns, matching exactly what the Lovable form sends: name, email, problem, address.

4:48 The spreadsheet is ready. Switch back to n8n and connect the Google Sheets node to it.

4:53 Double click the Google Sheets node to open it up again. Now we can connect it to the Service Requests spreadsheet.

Sheets tool

4:58 Click the credential dropdown to connect your Google account.

5:01 Create new credential. This one uses Google OAuth, so it opens a credential window.

5:06 Click sign in with Google. This opens the Google account chooser.

5:09 Pick the Google account that owns the Service Requests spreadsheet.

5:13 Google is asking for permissions. Check the first box — this lets n8n read and write your spreadsheets.

5:18 Second box — Drive access so n8n can find your spreadsheets by name.

5:23 Last one — this lets Google connect to n8n as an external service.

5:27 All three checked. Click continue and Google hands the credential back to n8n.

5:32 Now pick the spreadsheet. Click the document dropdown.

5:35 Service Requests — this is the spreadsheet where every request gets saved as a row.

5:40 Click the sheet dropdown.

5:41 Sheet one. That is the only tab.

5:44 Now the column mapping. Each column in the spreadsheet has a purple button. Click it and the AI agent figures out what data goes there. Click the purple button next to Name.

5:53 Email.

5:54 Problem.

5:55 And Address. All four columns are now set to defined automatically by the model.

6:00 Sheets tool is fully configured — credential, spreadsheet, sheet, and column mapping. Close it.

Gmail tool

6:05 The agent can save to Sheets now, but it also needs to send a reply email. Click the plus sign to add another tool.

6:11 Gmail Tool. This lets the agent send a personalized reply back to whoever submitted the form.

6:15 Click the credential dropdown. Gmail uses the same Google OAuth as Sheets.

6:20 Create new credential. Gmail needs its own Google OAuth credential.

6:24 Click sign in with Google. Same flow as before — Google account chooser then permissions.

6:29 Pick the Google account you want to send emails from.

6:32 Google is asking for permissions. Check the first box — this gives n8n full email access.

6:37 Second box — manage drafts and send emails.

6:40 Read, compose, and send.

6:42 View email message metadata.

6:44 View and modify but not delete.

6:46 Last one — view your email messages and settings.

6:49 All six checked. Click continue and Google hands the Gmail credential back to n8n.

6:54 Gmail is connected. The agent can now send emails. Close the node.

Respond node

6:58 One last piece. Remember we told the webhook to wait for a respond node before sending back a reply? We need to add that node now. Click the plus on the right edge of the agent.

7:06 Respond to Webhook. When the agent finishes processing — saving to Sheets and sending the email — this node sends a success response back to the form, so the user sees a confirmation message instead of an error.

7:18 Nothing to configure. This node just sends back the response. Close it.

Publish

7:22 The workflow is complete. Webhook trigger, AI agent with a model, Google Sheets, Gmail, and a respond node. Click publish to make it live. Once published, the webhook URL is active and ready to receive form submissions.

Add the secret

7:34 The workflow is published, but Lovable still needs the webhook URL. Open the webhook node to copy it.

7:39 Switch to the production URL tab. The test URL only works during testing. The production URL is the one your published workflow uses.

7:47 Click the URL to copy it to your clipboard. You will paste this into Lovable so the form knows where to send data.

7:54 Got the URL. Close the node.

7:56 Switch back to Lovable. We need to paste the webhook URL into a secret so the form can reach the workflow.

8:01 To add a secret in Lovable, click More in the toolbar. This opens the Cloud settings where you can manage secrets.

8:08 This is the secrets page. The prompt told Lovable to reference a secret config value called N8N WEBHOOK URL instead of hardcoding it. Click paste secret name.

8:17 Now paste the production URL you copied from the webhook node. This is the live endpoint your form will POST to. Click paste webhook URL.

8:26 Click save. The Lovable app now knows where to send form submissions. The webhook URL is stored as a secret, not in the source code — exactly how it should be.

Test the form

8:34 Time to test. Click Preview in the toolbar to see the form you built.

8:38 Fill out the form with sample data. Click the fill button to populate all the fields at once.

8:43 Click request service. The form posts the data to the n8n webhook. The AI agent reads it and marks this burst pipe as an emergency — then saves a row to Google Sheets with the name, email, problem, and address, and emails the customer a confirmation with shutoff steps via Gmail. The respond node sends back a success message, and the form shows the confirmation.

9:04 The form submitted successfully. Now check the spreadsheet — click the Google Sheets tab to see the row the agent just wrote.

9:10 Simple as that. We show you and you do it. Sign up below to learn AI automation for free.

Watch the 30-second version

A short video from this lesson. Watch, then do it yourself in the free practice copy.

AI Emergency Request Form in Lovable + n8n for plumbers, step by step (video)0:44

AI Emergency Request Form in Lovable + n8n for plumbers, step by step

Short · 0:44

For plumbers: build an emergency request form in Lovable and connect it to n8n. The AI agent sorts each request into emergency, same-day or scheduled, saves it to Google Sheets and emails the customer their priority…

Transcript

For plumbers: build an emergency request form in Lovable and connect it to n8n. The AI agent sorts each request into emergency, same-day or scheduled, saves it to Google Sheets and emails the customer their priority. Build it yourself, free, one click at a time: learn.ynteractive.com

Watch the full 9:17 video walkthrough

Lovable dashboard prompt box with a prompt for a service request form for a residential plumbing company, in Build mode and ready to send
Lovable dashboard prompt box with a prompt for a service request form for a residential plumbing company, in Build mode and ready to send

What you will build

A Need a Plumber? form built in Lovable. It has four required fields, Name, Email, What's the problem? and Service address, and a line telling people to shut off the main valve if water is actively leaking. Behind it is an n8n workflow: a webhook trigger, an AI Agent, a Google Sheets tool that saves each request to a Service Requests sheet, a Gmail tool, and a Respond to Webhook node.

In the test, Dana reports a pipe spraying under the kitchen sink at an address in Lititz. The agent marks it as an emergency, saves the row, and emails her a confirmation that includes how to shut off her main water valve.

Who this is for

Plumbing owners and office managers who get urgent requests at night, on weekends, or while everyone is under a house. It is the third plumbing lesson, after the quote writer and the follow-up agent. No coding required.

The lesson itself needs nothing, because it runs in a practice copy. For the real build you need Lovable for the form, n8n for the workflow, an OpenAI API key for the model, and a Google account for Sheets and Gmail. If you built the follow-up agent, you already have the OpenAI key and the Google connection.

How the AI sets the priority

The system message gives three levels. Emergency: an active leak, a burst pipe, a sewage backup or no water. Same-day: no hot water, a clogged main drain, or a sump pump that won't run. Scheduled: everything else. The agent saves the request, then emails the customer their priority and next steps. For emergencies, it includes how to shut off the main water valve, which can save a floor while the truck is on the way. The priority goes in the email; the sheet keeps exactly what the customer typed.

Why it works

Most plumbing damage happens in the minutes before anyone answers. A form that replies right away with shutoff steps helps the customer and shows them you are on it. Clear priority rules mean the AI is not guessing; it is applying the same triage your dispatcher would. The webhook URL is kept in a Lovable secret rather than the page code, and the Respond node makes the form wait until the request is saved.

What the homeowner sees

The form asks four questions and all four are required, including the service address, so the office never has to call back just to find out where the job is. The email format is checked before it sends. While sending, the button changes to Sending. After it works, the page says the request was received and to check email for the priority and next steps. If the webhook fails, the page tells the customer to call instead, which matters when water is on the floor.

The confirmation email is where the priority shows up, along with next steps. A routine request is marked Scheduled. A household with no hot water is marked Same-day, so they know it is being handled today. A burst pipe is marked Emergency, and that email also explains how to shut off the main water valve.

How to use this in your plumbing business

Change the priority rules to match your own dispatch, and add your after-hours policy to the email if you like. The form earns its keep in the busy stretches: frozen and burst pipes in a January cold snap, flooded basements when sump pumps fail in spring storms, and backed-up kitchen drains after big holiday meals. Everything lands in one sheet with the address, so the office can plan routes as soon as it opens. The email also tells an after-hours customer that the request was read, which keeps some of them from calling three other plumbers while they wait.

Try it yourself, free

Reading the steps is a start. Doing them is how it sticks. The interactive module walks you through every click in a practice copy of Lovable and n8n, checks each step, and never touches your real accounts.

Start “Build an AI Emergency Request Form for Your Plumbing Company”

Step by step: Build an AI Emergency Request Form for Your Plumbing Company

All 93 steps of the interactive module, in order. In the module you watch each one, then do it yourself in a practice copy that checks your work.

1. Sign up

  1. Get started with Lovable. Lovable lets you build web apps by describing what you want. Click Get started for free.

    In the first module you built a Custom GPT. In the second, you built an AI agent inside n8n. Now you are going to combine a real web app with an AI-powered backend: an emergency request form for Blue Maple Plumbing. Lovable is a tool that builds web apps from a text description.

2. Build the form

  1. Click the prompt box. This is your Lovable dashboard. To start a new project, click the prompt box under What should we build, Alex?

    This is your Lovable dashboard. Your projects show up along the bottom. To start a new one, you just describe it.

  2. Describe the form. This prompt tells Lovable exactly what to build — a service request form that sends data to an n8n webhook. Paste in the prompt on the box.

    This is the prompt that tells Lovable what to build. It describes a clean service request form with Name, Email, Problem, and Address fields, and tells it to send each request to an n8n webhook URL pulled from a secret config — not hardcoded.

    Build a simple, clean service request form for a residential plumbing company.
    
    The page should be modern, minimal, and professional.
    
    Include these fields:
    
    Name
    Email
    What's the problem?
    Service address
    
    Use a clear heading such as:
    Need a Plumber?
    
    Add a short supporting line like:
    Tell us what's going on and we'll get back to you fast.
    
    WEBHOOK
    When the form is submitted, send the data as a POST request to the n8n webhook URL.
    The data should be sent as JSON with keys: name, email, problem, address.
    Do not ask me to paste the webhook URL into the page or source code.
    
    SUBMISSION STATES
    While submitting, change the button text to something like:
    Sending...
    
    After a successful submission, show:
    Request received! Check your email for next steps.
    
    If the webhook request fails, show a simple friendly error:
    Something went wrong. Please call us instead.
    
    VALIDATION
    All four fields are required.
    Validate the email format.
    
    Make it responsive for desktop and mobile.
    
    Do not add unnecessary sections, navigation, pricing, testimonials, or other marketing content.
    
    The main purpose of this project is to demonstrate sending form data from Lovable to an n8n webhook.
    
    IMPORTANT
    Do not hard-code any webhook URL.
    Reference the N8N_WEBHOOK_URL secret/config value when sending the form submission.
    The actual secret will be added manually later in Lovable Cloud, under Secrets.
  3. Open the mode picker. Next to the microphone it says Build. That is the mode picker. Click it.

    Before you send it, look at the word Build next to the microphone. That's the mode picker.

  4. Keep Build mode. Build makes changes directly, Chat is for questions, Plan writes a detailed plan first. Click Build.

    Build makes changes directly. Chat is for asking questions and exploring ideas, and Plan writes a detailed plan first, which helps on bigger projects. This form is simple, so click Build.

  5. Build the app. Click the send arrow. Lovable builds the app from your prompt and shows it in a preview. Then we switch to n8n to build the backend.

    Lovable reads your prompt, generates the code, and builds a preview of the app. Nothing is public until you publish it. In a few seconds you have a working request form. Now we need to build the AI workflow that handles what happens when a homeowner submits it.

3. New workflow

  1. Start a new workflow. Now you are in n8n. Click Create workflow to start building the backend.

    Now you are in n8n. This is the workflow automation tool you used in the last module. This time, instead of a chat trigger, we are going to use a webhook — so the form can send data directly to n8n.

4. Webhook trigger

  1. Add the first step. Click Add first step… to choose a trigger.

    Every workflow starts with a trigger. Last time we used a chat trigger. This time we want a webhook — an HTTP endpoint the form can POST to.

  2. Webhook trigger. Click On webhook call — the form will send data to this endpoint.

    On webhook call. A webhook is just a URL that waits for incoming data. When a homeowner submits the Lovable form, it sends the name, email, problem, and address as JSON to this webhook.

  3. Change the response mode. By default the webhook responds immediately. We need it to wait. Click the Respond dropdown.

    One important setting. By default, the webhook responds immediately, before the AI agent even runs. We need it to wait until the agent is done, so the form knows the submission succeeded.

  4. Use a Respond node. Click Using 'Respond to Webhook' Node — this lets the workflow finish before responding.

    Using respond to webhook node. This tells n8n: do not send a response yet. Wait until you hit a dedicated respond node further down the chain. That way the form gets a real confirmation after the AI agent has processed everything.

  5. Back to the canvas. Webhook is configured. Close the node with the ×.

    That is the webhook set up. Close the node.

5. AI Agent

  1. Add the next node. Click the + on the right edge of the webhook node.

    Now we decide what happens when the form data arrives.

  2. Add the AI Agent. Click AI Agent — it will process the form data, save it to a sheet, and send an email.

    AI Agent. Same node as last time, but now it handles form submissions instead of chat messages. It will read the form data, save it to Google Sheets, and send a personalized reply via Gmail.

  3. Change the prompt source. This time we are not using a chat trigger. Click the Source dropdown.

    This time the prompt does not come from a chat trigger — it comes from the webhook. We need to change the source so we can write our own prompt template.

  4. Define it manually. Click Define below so we can write a custom prompt template.

    Define below. This lets us write a prompt that pulls the form fields directly from the webhook data.

  5. Write the prompt template. This template pulls the form fields from the webhook data. Paste in the prompt template.

    Here is the prompt template. It uses n8n expressions — those double curly braces — to pull the name, email, problem, and address from the webhook body. Each time the form is submitted, the agent gets a prompt with the real data.

  6. Add an option. Scroll down and click + Add Option to add a system message.

    Now we need a system message — the standing instruction that tells the agent what to do with every submission.

  7. System Message. Click System Message.

    System message. This is where we tell the agent how urgent each request is, to save it to Google Sheets, and to send a confirmation email via Gmail.

  8. Write the system message. This tells the agent how to prioritize the job, save it to Sheets and email a confirmation. Paste in the system message.

    Here is the system message. It tells the agent to sort every request into emergency, same-day, or scheduled — a burst pipe is an emergency, no hot water is same-day. Then it saves the request with the Google Sheets tool and emails the customer a confirmation with their priority through Gmail.

    You are the dispatch assistant for Blue Maple Plumbing.
    
    Set a priority for each request:
    Emergency - active leak, burst pipe, sewage backup, or no water.
    Same-day - no hot water, a clogged main drain, or a sump pump that won't run.
    Scheduled - everything else.
    
    Use the google sheets tool to add the request to the google sheet.
    
    Use the gmail tool to email the customer a confirmation with the priority and next steps. For emergencies, tell them how to shut off their main water valve.
  9. Back to the canvas. The agent knows what to do. Close the node with the ×.

    The agent is configured. It knows to save to Sheets and reply via Gmail. Close the node.

6. Chat model

  1. Give the agent a brain. The agent still needs a language model. Click the + under Chat Model.

    The agent needs a model to think with.

  2. Pick OpenAI. Click OpenAI Chat Model.

    OpenAI Chat Model. If you did the last module, this part will feel familiar.

  3. Open the credentials. Click the Credential dropdown.
  4. Create a new credential. Click + Create new credential.

    Create new credential. If you already made one in the last module, you could pick it from the list. We will create a fresh one here.

  5. Paste the key. Paste in the API key to drop in your OpenAI key. No key yet? Make one at platform.openai.com (add credit first), or in your own n8n pick Gateway credits and skip this step.

    If you followed the previous module, you already have one. If not, go to platform dot openai dot com, add credit, and create a key. Or skip it: new n8n accounts include free credits, so in your own n8n you can pick gateway credits instead.

  6. Save the credential. Click Save.

    n8n tests the connection and stores the key.

  7. Pick the model. Click the Model dropdown.

    Now the model dropdown.

  8. gpt-5-mini. Pick gpt-5-mini — fast and cheap.

    GPT five mini. Fast, cheap, and plenty smart for processing form submissions.

  9. Back to the canvas. Close the model node with the ×.

    Model is wired up. Close it.

7. Sheets tool

  1. Add a tool. The agent needs tools to do things. Click the + under Tool.

    Now the tools. The system message told the agent to use Google Sheets and Gmail — but it cannot do either until we give it the actual tools.

  2. Add Google Sheets. Click Google Sheets Tool.

    Google Sheets Tool. This lets the agent save form submissions as rows in a spreadsheet.

8. Create the spreadsheet

  1. Back to the canvas. Before configuring this, create the spreadsheet it will write to. Close the node for now.

    Before we configure this node, we need to create the actual spreadsheet. Close this for now — we will come right back.

  2. Open Google Sheets. Click the Google Sheets tab to create a new blank spreadsheet.

    Switch to the Google Sheets tab. You need to create the spreadsheet that the Sheets node will write to.

  3. Name the spreadsheet. Click the title and rename it to Service Requests.

    Name it Service Requests — this is where every request from the form will go.

  4. Type the first column header. In cell A1, type Name.

    Now set up the column headers. These need to match the form fields. In A1, type Name.

  5. Email. In cell B1, type Email.

    B1 — Email.

  6. Problem. In cell C1, type Problem.

    Cell C1 — Problem.

  7. Address. In cell D1, type Address. That is all four columns — matching the form.

    And D1 — Address. Four columns, matching exactly what the Lovable form sends: name, email, problem, address.

  8. Back to n8n. The spreadsheet is ready. Click the n8n tab to go back and connect it.

    The spreadsheet is ready. Switch back to n8n and connect the Google Sheets node to it.

  9. Open the Sheets node. Double-click the Google Sheets node to configure it.

    Double click the Google Sheets node to open it up again. Now we can connect it to the Service Requests spreadsheet.

9. Sheets tool

  1. Add a credential. Click the Credential dropdown.
  2. Create a new credential. Click + Create new credential to sign in with Google.

    Create new credential. This one uses Google OAuth, so it opens a credential window.

  3. Sign in with Google. Click Sign in with Google to connect your account.

    This opens the Google account chooser.

  4. Choose your account. Click your Google account to continue.

    Pick the Google account that owns the Service Requests spreadsheet.

  5. Allow Sheets access. Check See, edit, create, and delete all your Google Sheets spreadsheets.

    Google is asking for permissions. Check the first box — this lets n8n read and write your spreadsheets.

  6. Allow Drive access. Check See, edit, create, and delete all of your Google Drive files.

    Second box — Drive access so n8n can find your spreadsheets by name.

  7. Allow external service. Check Connect to an external service.

    Last one — this lets Google connect to n8n as an external service.

  8. Sign in. Click Continue to complete the Google sign-in.

    All three checked.

  9. Pick the spreadsheet. Click the Document dropdown.

    Now pick the spreadsheet.

  10. Service Requests. Click Service Requests — the spreadsheet where form submissions go.

    Service Requests — this is the spreadsheet where every request gets saved as a row.

  11. Pick the sheet tab. Click the Sheet dropdown.
  12. Sheet1. Click Sheet1.

    Sheet one. That is the only tab.

  13. Map the Name column. Under Values to Send, click the ✦ button next to Name — the AI agent will fill this in automatically.

    Now the column mapping. Each column in the spreadsheet has a purple button.

  14. Map the Email column. Click the ✦ button next to Email.

    Email.

  15. Map the Problem column. Click the ✦ button next to Problem.

    Problem.

  16. Map the Address column. Click the ✦ button next to Address.

    And Address. All four columns are now set to defined automatically by the model.

  17. Back to the canvas. Google Sheets is configured. Close the node with the ×.

    Sheets tool is fully configured — credential, spreadsheet, sheet, and column mapping. Close it.

10. Gmail tool

  1. Add another tool. The agent also needs to send emails. Click the + next to Google Sheets to add another tool.

    The agent can save to Sheets now, but it also needs to send a reply email.

  2. Add Gmail. Click Gmail Tool.

    Gmail Tool. This lets the agent send a personalized reply back to whoever submitted the form.

  3. Add a credential. Click the Credential dropdown.

    Gmail uses the same Google OAuth as Sheets.

  4. Create a new credential. Click + Create new credential to sign in with Google.

    Create new credential. Gmail needs its own Google OAuth credential.

  5. Sign in with Google. Click Sign in with Google to connect your account.

    Same flow as before — Google account chooser then permissions.

  6. Choose your account. Click your Google account to continue.

    Pick the Google account you want to send emails from.

  7. Allow email access. Check Read, compose, send, and permanently delete all your email from Gmail.

    Google is asking for permissions. Check the first box — this gives n8n full email access.

  8. Allow drafts. Check Manage drafts and send emails.

    Second box — manage drafts and send emails.

  9. Allow compose. Check Read, compose, and send emails from your Gmail account.

    Read, compose, and send.

  10. Allow metadata. Check View your email message metadata.

    View email message metadata.

  11. Allow modify. Check View and modify but not delete your email.

    View and modify but not delete.

  12. Allow view. Check View your email messages and settings.

    Last one — view your email messages and settings.

  13. Sign in. Click Continue to complete the Google sign-in.

    All six checked.

  14. Back to the canvas. Gmail is connected. Close the node with the ×.

    Gmail is connected. The agent can now send emails. Close the node.

11. Respond node

  1. Add the respond node. One more node. Click the + on the right edge of the AI Agent.

    One last piece. Remember we told the webhook to wait for a respond node before sending back a reply? We need to add that node now.

  2. Respond to Webhook. Click Respond to Webhook.

    Respond to Webhook. When the agent finishes processing — saving to Sheets and sending the email — this node sends a success response back to the form, so the user sees a confirmation message instead of an error.

  3. Back to the canvas. Nothing to configure here. Close the node with the ×.

    Nothing to configure. This node just sends back the response. Close it.

12. Publish

  1. Publish the workflow. The workflow is complete. Click Publish to make it live.

    The workflow is complete. Webhook trigger, AI agent with a model, Google Sheets, Gmail, and a respond node. Once published, the webhook URL is active and ready to receive form submissions.

13. Add the secret

  1. Open the webhook. Double-click the Webhook node to get its production URL.

    The workflow is published, but Lovable still needs the webhook URL.

  2. Production URL. Click the Production URL tab — this is the live URL your form will POST to.

    Switch to the production URL tab. The test URL only works during testing. The production URL is the one your published workflow uses.

  3. Copy the URL. Click the URL to copy it. You will paste it into Lovable as a secret.

    You will paste this into Lovable so the form knows where to send data.

  4. Back to the canvas. URL copied. Close the webhook node.

    Got the URL. Close the node.

  5. Back to Lovable. Click the Lovable tab. We need to give it the webhook URL.

    Switch back to Lovable. We need to paste the webhook URL into a secret so the form can reach the workflow.

  6. Open More. Your app is open in the Lovable editor: chat on the left, preview on the right. In the toolbar at the top, click More (the stacked icon right after Code).

    Here is your app in the Lovable editor, with the chat on the left and the preview on the right. Secrets live in the More view. In the toolbar at the top, click the stacked icon right after the code brackets. That's More.

  7. Open Cloud. More holds your project tools. Click Cloud in the list on the left.

    More holds the tools for running your app, starting with Analytics. Secrets belong to Cloud, Lovable's built-in backend.

  8. Open Secrets. Cloud opens on its Overview. Click Secrets in the list.

    Cloud opens on its overview, and its pages are listed on the left.

  9. Name the secret. Paste in the secret name — this matches what the Lovable app expects.

    This is the secrets page. The prompt told Lovable to reference a secret config value called N8N WEBHOOK URL instead of hardcoding it.

  10. Paste the webhook URL. Paste in the webhook URL to drop in the production URL you just copied.

    This is the live endpoint your form will POST to.

  11. Save the secret. Click Save. The Lovable app can now reach the n8n workflow.

    The Lovable app now knows where to send form submissions. The webhook URL is stored as a secret, not in the source code — exactly how it should be.

14. Test the form

  1. Open the form. Click Preview (the globe icon) in the toolbar to test the form.

    Time to test.

  2. Fill the form. Click Fill with test data to populate the form fields.

    Fill out the form with sample data.

  3. Submit the form. Click Request Service. The form sends the request to n8n, the agent sets the priority, saves it to Sheets and emails a confirmation.

    The form posts the data to the n8n webhook. The AI agent reads it and marks this burst pipe as an emergency — then saves a row to Google Sheets with the name, email, problem, and address, and emails the customer a confirmation with shutoff steps via Gmail. The respond node sends back a success message, and the form shows the confirmation.

15. Publish the app

  1. Open Publish. The test went through. The preview is only for you, so click Publish at the top right to put the form online.

    The test went through. But the preview is only for you. To put the form online, click Publish at the top right.

  2. Publish. Lovable suggests a free lovable.app address (you can change it) and runs a quick security scan. Click Publish.

    Lovable suggests a free web address ending in lovable dot app, and you can change it before you publish. It also runs a quick security scan. The live app uses the same secret, so it sends to your workflow too.

  3. Check the spreadsheet. Your app is live. Click the Google Sheets tab to see the data the agent saved from your test.

    Your app is live. Now check the spreadsheet.

All free Stepthrough videos

Screenshots

Frequently asked questions

How does the AI decide what is an emergency?
It follows the rules in the system message: active leak, burst pipe, sewage backup or no water is an emergency; no hot water, a clogged main drain or a sump pump that won't run is same-day; everything else is scheduled. You can edit these rules.
Does the customer get instructions right away?
Yes. The agent emails a confirmation with the priority and next steps, and for emergencies it explains how to shut off the main water valve.
Is this free to build?
The Stepthrough lesson is free. Running it for real needs your own Lovable, n8n, OpenAI and Google accounts, and some of those cost money for ongoing use. Check their current pricing.
How does the interactive lesson work?
Each step is shown to you first on the left (Watch). Then you do it yourself in a practice copy on the right (Your turn), and every click is checked. If you get stuck, press Do it for me. It is a practice copy, so no real accounts are touched.
How long does the lesson take?
About 15 minutes across 87 guided steps.

Start this module free

More Lovable and n8n tutorials

n8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets: a step from the interactive modulen8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets

Build an AI agent for BrightPath Marketing that generates social media post ideas and saves them to Google Sheets — chat trigger, AI Agent, system prompt, model…

Free · Live ~12 min Intermediate

AI Receipt Extractor: Receipts to Google Sheets with n8n: a step from the interactive moduleAI Receipt Extractor: Receipts to Google Sheets with n8n

Drop a photo of a receipt into an n8n chat. An AI agent reads it, pulls out the date, vendor and amount, picks a category, and adds a row to Google Sheets.

Free · Live ~12 min Intermediate

n8n AI Email Responder: Draft Gmail Replies Automatically: a step from the interactive modulen8n AI Email Responder: Draft Gmail Replies Automatically

Build an n8n agent that watches your Gmail, reads each new customer email, and writes a reply as a draft in the same thread, ready for you to check and send.

Free · Live ~12 min Intermediate

Daily Job Alerts: Email Each Tech Their Jobs from Google Sheets with n8n: a step from the interactive moduleDaily Job Alerts: Email Each Tech Their Jobs from Google Sheets with n8n

Every morning at 7, n8n reads a plumbing company's jobs sheet, skips anything not assigned yet, and emails each job to the tech it's assigned to — customer, address…

Free · Live ~10 min Intermediate

The n8n inbox triage workflow: Gmail Trigger, a Text Classifier with Lead, Client and Invoice outputs wired to three label steps, then a Basic LLM Chain and Create a draft on the Client branchGmail AI Triage: Auto-Label Every Email and Draft Replies

Build an n8n workflow that reads each new email, sorts it as a lead, a client or an invoice with a Text Classifier, adds the matching Gmail label, and drafts a reply to…

Free · Live ~18 min Advanced

The n8n support agent: a chat trigger and an AI Agent with an OpenAI Chat Model, Simple Memory, a Google Docs tool and a Gmail toolA Support Agent That Answers from Your Own Docs

Turn an n8n chat agent into a support agent that answers only from your policies in a Google Doc, refuses what it should, and hands off to a person by email.

Free · Live ~13 min Advanced

From the blog

All blog posts

Visual guides

This lesson’s key ideas as quick visual guides: swipe through the slides, or read the same guide as text.

All visual guides

Free cheat sheets

Print it or save the PDF: the key steps and checks from this lesson on one page, free.

All free printable cheat sheets

Plain-English definitions, each with an example from a free lesson.

The full AI glossary

  • After-hours voicemail script prompt: Write your after-hours voicemail greeting: who you are, what counts as an emergency, your safety line, the emergency option and…
  • Emergency service request triage prompt: A copy-ready triage prompt that sorts service requests into emergency, same-day and routine, with the rule used. Works for…
  • Lovable web form prompt: Write a Lovable prompt for a web form that posts to n8n: fields, validation, button states, a thank-you message, and a webhook…
  • Weekly leads summary prompt: Paste a week of form leads from your Google Sheet and get counts by type, who is still waiting, patterns with row numbers and…

All free prompt templates

More terms on this topic

More prompts on this topic

  • Employee newsletter prompt: Turn a month of scattered updates into a short internal newsletter: news, welcomes, shout-outs and dates, with only personal…
  • Website service page copy prompt: Write a website page for one service: who needs it, what happens on the visit, what they get, your published price, a short FAQ…

Browse related tutorials