How to connect your marketing website to your own app or database
Short answer: The safe pattern is: the form on your site sends its data to a small server-side step, and that step writes to your database or app. You never put a database password or secret key in the page itself, because anyone can read a page's code. For low volume you can skip the code and use a form tool or an automation tool such as Zapier (software that links one app to another) to write rows into Google Sheets or Airtable. For a real app, use a small endpoint (a web address your server listens on) in front of a proper database.
You want the form or sign-up on your marketing site to land in your own database or app, and you want to know which way is simple, safe and will not break at the first busy day.
I'm Ranjit, and I run Blur Studio: 15+ years building software, 120 apps taken live, and clients who have gone on to raise $10M+. I build AI systems and processes that help businesses do a lot more with a lot less time. I also work differently from most of what else is out there, more on that further down this page. Say hello.
The short answer is that there are four ways, and the right one depends on volume and on who needs to use the data. Pick the simplest that fits, and move up only when you hit a named limit. Every option below ends the same way: a record exists somewhere your team can use, and nobody outside your team can read or change it.
The four options
| Option | How it works | Best for | Main risk |
|---|---|---|---|
| 1. Form tool with built-in link | A form builder such as Tally sends answers to Google Sheets, Airtable or a webhook | Under a few hundred leads a month, no developer | Rate limits, spreadsheets that grow messy |
| 2. Automation tool in the middle | Form posts to a webhook (a web address that receives data when something happens), Zapier or Make then writes a row or calls your app | A few steps: write a row, alert a person, add to a CRM | Paid plan needed, failures can be silent |
| 3. Your own small endpoint | Form posts to a function you control, which checks the data and writes to the database | Your own app, any volume, anything private | Needs someone who can build and run it |
| 4. Browser straight to a database service | The page uses a public key and database rules to insert a row directly | Simple public forms on a service like Supabase | One mistake in the rules exposes data |
Option 1: a form tool with a built-in link
Tally, a free form builder, lists Google Sheets, Notion, Airtable, Zapier, Make and webhooks among the integrations on its free plan, and says free use is unlimited forms and submissions within its fair usage guidelines (its pricing page, November 2026; Pro is $24 a month). Typeform, a form builder that suits longer or more designed forms, bills by responses: its free plan allows 10 a month and its cheapest paid plan is listed at about $28 a month billed yearly for 100 responses a month and one user, though the page shows $25 in one place (check its pricing page). If you already use a CRM, its own form may be simpler: see connecting HubSpot, Salesforce or Pipedrive to your website.
Option 2: an automation tool in the middle
Zapier's pricing page (November 2026) says the Free plan covers 100 tasks a month, only two-step Zaps, and does not include webhook connections. Webhooks start at the Pro plan, listed at $19.99 a month billed annually or $29.99 billed monthly for 750 tasks. Make is a similar automation tool: at 10,000 credits a month its Core plan is $9 billed annually or $10.59 billed monthly, as of November 2026. Zapier and Make are a good fit when the work is a few simple steps. When the steps multiply, read when Zapier automations need custom software.
Option 3: your own small endpoint
This is the pattern I recommend for anything you will build on. The form posts to an endpoint, which is a small piece of server code (often called a serverless function or edge function when a host runs it for you). The endpoint does four things in order: check the spam token, check the data is the right shape, write to the database with a key only the server holds, and return a plain "received" message. The browser never sees the key.
Option 4: the browser writes straight to the database
Supabase, a hosted Postgres database service, gives each project a publishable key meant to sit in public code. Its docs say that key is safe to expose, but that it is not meant to protect against reverse engineering, browser network inspection or phishing, so what it can reach is limited by row level security (RLS), the database rules for who can read or write which rows. Two facts from those docs drive everything:
- Once RLS is on, nothing is readable through the publishable key until you write a policy that allows it. Adding policies does not remove existing grants, so check what the public roles can still reach.
- A table in an exposed schema with RLS off can be read and written by any role that has a grant on it. And a policy that says "anyone may read" gives every visitor read access.
For a public form the safest rule is insert only: let visitors add a row, and let no public role read, change or delete rows. A sketch (check Supabase's current docs before using it):
alter table public.leads enable row level security;
create policy "visitors can add a lead"
on public.leads for insert to anon
with check (true);
-- no select, update or delete policy for anon
One practical catch: with this policy the browser can add a row but cannot read it back. If your code asks the database to return the new row after the insert, the call will fail, because that needs a read policy. Send the insert on its own and show a plain thank-you message.
The secret key, which Supabase says bypasses every RLS rule, belongs on a server only: never in the browser, a mobile app, source control, chat, email, URLs or logs. Supabase says never to use a secret key in a browser, even on localhost. If you are unsure which key you have used, treat that as urgent. The failure mode is shown in an exposed database and the row level security fix.
Limits that matter, with real numbers
| Destination | Published limit (November 2026) | What it means |
|---|---|---|
| Airtable API | 5 requests per second per base; 50 per second per user token; over the limit gives an error 429 and a 30 second wait | Fine for normal forms. A burst from a campaign or a loop can lock writes for 30 seconds |
| Google Sheets API | 60 reads and 60 writes per minute per user per project; 300 of each per minute per project; no daily cap; a batch counts as one request | A launch email can easily send more than 60 form submissions in a minute through one account. Batch writes or queue them |
| Zapier Free | 100 tasks a month, no webhooks | Not usable for an open webhook flow |
Airtable's page gives no record limits per plan, so check the current plan limits on its pricing page before treating it as a production database. Its pricing says you pay for users with edit access, while form submissions and read-only collaborators are not charged. Airtable says to wait 30 seconds after an error 429, and Google says to retry with a growing delay, called exponential backoff, and documents the formula. Do not retry instantly in a loop: that keeps you at the limit.
The steps, in order
- Write down the record. List each field, its type, and whether it is required. Keep it short: every extra field lowers completion.
- Decide where the record lives first. One database is the source of truth (the place everyone agrees is correct). Other tools get copies.
- Create the table or sheet with an id, created time, source page and a status such as "new".
- Pick the option from the table above, using your daily and peak volume.
- Add spam protection. See the next section.
- Send an alert to a named person, by email or message, so a new row is seen in minutes. A silent database is how leads die.
- Send an auto-reply that says what happens next and when.
- Test it with the plan below.
- Write down who owns the logins for the form tool, the automation tool and the database.
Spam, abuse and the CORS trap
A public form invites bots. Two cheap layers help. A honeypot is a hidden field real people never fill in, so a filled one means a bot. Cloudflare Turnstile, a free alternative to puzzle-style CAPTCHA tests, puts a check on the form. Its plans page says the free plan allows up to 20 widgets and unlimited verifications. The part people miss: a token that the page receives must be checked on your server by sending it to Turnstile's verification address, because its docs warn that tokens can be forged. A token is valid for 300 seconds and works once. The widget alone protects nothing. More options are in how to stop spam on your website contact form.
CORS (cross-origin resource sharing) is a browser rule that decides whether a page on one address may read responses from another address. Mozilla's documentation describes it as a header-based mechanism that lets a server say which other origins a browser may allow. If your form says "blocked by CORS", the fix is to allow your site's address on your endpoint, and not a wildcard when cookies or logins are involved. It does not secure your endpoint: browsers enforce it, but a script that is not a browser ignores it. Your endpoint still needs validation, spam checks and rate limits.
Common pitfalls
- A secret key in front-end code. Anything in the page can be read. Keep secret keys on a server.
- No alert. The row arrives and nobody looks. The fix is a notification and a daily "new and unanswered" list.
- Duplicates. A double click or a retry writes two rows. Disable the button after one click and match on a unique id or email plus time.
- Free tier surprises. A free plan with no webhooks or a low task count fails quietly. Test with a real submission after every plan change.
- Everything in one spreadsheet. It works until two people edit, then it does not. See how to know you have outgrown spreadsheets.
- Consent and privacy. If you collect personal data, say what you do with it and keep it to what you need. Rules differ by country: check local law.
- No backup of the database. Supabase's Free plan lists no daily backups and suggests dumping your own copy, while Pro keeps seven days (its backups page, November 2026). Read keeping a site healthy after launch.
Website to CRM to app
A common flow is website form, then CRM, then your own app. Choose one record owner. If the CRM owns leads, the form writes to the CRM and the app reads from it through its API, which is the doorway the CRM provides. If your app owns customers, the form writes to the app and the CRM gets a copy. Two systems that both think they own the same field will drift. The library covers the connection side in connecting your website to a CRM, payment or booking tool.
A test plan with pass and fail rules
| Test | Pass | Fail |
|---|---|---|
| Submit a normal enquiry | Row appears in under a minute, alert arrives, auto-reply sent | Any one missing |
| Submit with a missing required field | Clear message, no row | Empty row saved |
| Submit the same form twice quickly | One row, or two flagged as duplicates | Two unmarked rows |
| Send 70 submissions in a minute to a Sheets flow | All saved, perhaps late | Lost submissions |
| Open the database with the public key only | Cannot read any rows | Any rows readable |
| Search your page source for the word "secret" | No secret keys | One found: rotate it now |
| Submit with the spam token removed | Rejected | Accepted |
A worked example, with made-up numbers
A tutoring business gets about 40 sign-ups a day, and 400 on the morning an email goes out over 20 minutes. At the peak that is about 20 a minute, under the 60 writes per minute a single Google account is allowed. Sheets works. If 1,000 people signed up within 10 minutes, that is 100 a minute: some writes would fail. The fix is a queue in the endpoint or a move to a real database. These numbers are invented, but the arithmetic is how you check yours: peak per minute against the limit.
Who should skip building this
If you get fewer than a few enquiries a day and no one else needs the data, a form that emails you is enough. Do not build an endpoint and a database for ten leads a month.
How I'd approach this
Start at option 1 or 2 and write the record down first, so moving later is a copy and not a rebuild. Move to your own endpoint the day any of these happens: the data must be private to each customer, you hit a rate limit, you need rules (for example "only quote jobs in these postcodes"), or a second system needs the same data.
First-week plan: day one write the field list and name the owner of the data. Day two build the form and create the table. Day three connect it with the simplest option and add the alert. Day four add the spam check and run the test table above. Day five check backups and write down every login. Then watch the first real week of submissions for gaps.
When the connection has to carry real rules, user accounts or a live link to your CRM and calendar, Blur Studio builds that custom version, including finishing a half-built one: see what that includes.
For a closer look, see signs a marketing website is not enough.
Questions people ask
Can I connect my website directly to a database?
Yes, but only safely through a server step, or through a database service with strict row rules. Never put a secret key or password in the page. For a public form, allow insert only and give the public no read access.
What is the easiest way to send form data to Google Sheets?
Use a form tool with a Google Sheets link, such as Tally, or an automation tool. Watch the limit of 60 writes per minute per user. For small volume it is fine. See also sending details to Google Sheets or Slack without code.
Is it safe to put the Supabase key in my website code?
The publishable key is meant to be public, but it only stays safe if row level security is on and your policies are tight. The secret key must never be in the browser. Supabase's docs say it bypasses every row rule.
Do I need Zapier to connect a form to a database?
No. Many form tools link directly, and your own endpoint needs no automation tool. Zapier helps when you chain several steps. Its Free plan has no webhooks, so check the plan first.
Why do I get a CORS error when my form posts to my server?
The browser is blocking the response because the server did not say your site's address is allowed. Add your exact site address to the allowed origins on the endpoint. CORS is a browser rule and is not a replacement for validation or login checks.
When should I move from Airtable or Sheets to a real database?
When you hit rate limits, when many people edit at once, when each customer must see only their own rows, or when you want real rules and backups. The library explains the choices in managed database options for a custom business app.
How do I stop bots filling my form?
Use a honeypot field plus a spam check such as Cloudflare Turnstile, and always verify the token on your server. Add a rate limit on the endpoint. More in how to stop spam on your website contact form.
Does the data have to be encrypted or anonymised?
Rules differ by country and by the kind of data. Keep what you collect to what you need, tell people how you use it, and check local law. This article is general information, not legal advice.
More in this topic: Websites: custom builds, portals, lead capture and site care (9 guides) →