Build: No-Code AI SaaS App
Everything so far has run inside n8n's own canvas or chat. This build gives an automation a real, branded front end — a form a client's customers actually fill out — by pairing an AI-generated UI (Lovable) with an n8n backend that does the real work behind a webhook.
What we're building, and why
A visitor enters their industry, company name, and website, picks a social platform, and clicks Generate. n8n scrapes their site, drafts a caption with AI, generates an image, and sends both back to render on the page — a free lead magnet or a paid micro-tool, built without touching a line of server code. The mechanic — a form that calls a webhook and displays whatever comes back — is identical no matter what the tool actually does.
Design the contract first
Before generating any UI, decide exactly what JSON goes in and what JSON comes back — this single decision is 90% of what makes this integration work or silently fail.
// Request the front end sends (POST body)
{
"industry": "AI Automation",
"company_name": "Acme Co",
"website": "https://acme.co",
"platform": "LinkedIn",
"post_type": "news"
}
// Response n8n must send back
{
"post": "generated caption text...",
"image": "https://...generated-image-url..."
}
Build the front end in Lovable
At lovable.dev, describe the UI in plain language, explicitly including the contract from step 01 so the generated code sends and expects the right shape:
Build a form with fields: industry, company name, website URL, and a
platform dropdown (LinkedIn, X, Instagram, Facebook). On submit, POST
this JSON to [YOUR N8N WEBHOOK URL] and display the returned "post"
text and "image" URL on the page once the response arrives.
Paste your webhook URL from step 03 into the generated code before testing.
Receive the request in n8n
Add trigger → Webhook, method POST. Set Respond to
Using Respond to Webhook Node rather than "Immediately" — generating a caption and
an image takes several seconds, and the front end needs to wait for that real result, not an empty
acknowledgment sent the instant the request lands.
Do the actual work
- HTTP Request (GET) the submitted
websiteto pull its raw HTML. - HTML → Extract HTML Content, CSS selector
body, to strip scripts and head tags before they burn tokens in the next step — a raw page can be 15× larger than just its visible content. - OpenAI → Message a Model: system prompt "You are an expert social media copywriter, write an engaging {{ platform }} caption," user message containing the scraped content and the submitted fields.
- A second OpenAI → Generate an Image call, using the generated caption as part of the image prompt so text and visual stay on-message.
Respond correctly to the webhook
On the final Respond to Webhook node, the response body must match the contract exactly — same keys, same shape — or the front end has nothing to display:
{
"post": "{{ $json.message.content }}",
"image": "{{ $json.url }}"
}
Debugging the JSON contract
JSON.stringify(...)
to escape them automatically, then strip the extra wrapping quotes JSON.stringify adds
around the whole string.
If Lovable's generated front end can't parse what comes back, paste the exact JSON shape you're sending it back into Lovable's chat: "my backend returns exactly this JSON structure — update the front end to match." Keeping the contract synchronized in both directions, rather than guessing, is the entire skill here.
Variations worth selling
- An SEO or website audit tool that scrapes a URL and returns a scored report.
- A quote calculator that takes a client's inputs and returns an instant price, gated behind an email capture.
- Charge for this as a done-for-you lead magnet: the client gets a tool that pulls in prospects, you get paid to build and host it.
Sources
| Source | Used for |
|---|---|
| Jono Catliff (Automatable), "n8n 8 Hour Masterclass — Build & Sell AI Agents (Automate Anything)" | Primary source for this build's workflow steps |
| Lovable docs, Introduction | Generating the front end from a text prompt |
| n8n docs, Webhook node | Receiving requests & responding to the front end |
| n8n docs, HTTP Request node | Scraping the submitted website |