What This Recipe Does
A visitor fills in the form on your landing page. The page sends the answers to a small backend function of its own, such as a Supabase edge function in a Lovable project, and the function logs them in RevyOps as a Form submission. A visitor RevyOps doesn’t know yet becomes a new person, and a work email such asana@northwind.io also creates the company northwind.io. A known person’s filled-in fields stay as they are.
The key lives only in the function, as a secret. Put it in the page’s own code and anyone who opens the page can read it in the browser. Use an Activities only key even there: it can log activities and nothing else, so a leaked key can’t read, change or delete anything in the workspace.
Setup
1
Generate an Activities only key
In RevyOps, pick the workspace in the sidebar, open Developer → Keys, click Generate key, choose Activities only API key and name it after the page, such as Lovable landing page. Copy the
AC- key from the reveal dialog: it is shown once.2
Store the key as a secret
Add a secret named
REVYOPS_API_KEY, with the key as its value, to the backend that runs the function. For a Supabase edge function, run supabase secrets set REVYOPS_API_KEY=AC-... with the Supabase CLI. The function reads the secret at run time, and the page never sees it.3
Add the backend function
Create an edge function named
submit-form with the code below. The property names must match the Form submission fields in your workspace, as listed under Activities & Scoring: a name the workspace doesn’t have refuses the whole submission.4
Call the function from the form
Have the form’s submit button call the function, for example
supabase.functions.invoke("submit-form", { body: { firstName, lastName, email, company, pageUrl: window.location.href } }), then show your own thank-you message.5
Send a test
Submit the form with an email RevyOps doesn’t have. The new person appears under People with the Form submission on their timeline, and on the company’s timeline when the email is a work email.
supabase/functions/submit-form/index.ts
What Happens to Each Submission
The function answers the visitor the same way every time, so nobody sees a RevyOps error. Check the function’s logs in Supabase when a test doesn’t show up: a
422 names the field or identifier RevyOps refused, and a 403 means the key is wrong or revoked.
Create the person when not found is on for Form submission. Switch it off under Edit Activity and a submission from someone new is refused instead of creating them. See Create the person when not found.
