Graine AI

Website form

Send each enquiry from a form on your website straight to Leads — paste the form Graine gives you, or point your own form at its URL. With a hidden field that stops bots.

Add it

  1. Open Leads → Sources, choose Add a source, pick Website form and choose Next.
  2. Under Your websites, list the sites the form is on, one per line, like https://www.example.com — without a page path, at most 10. The form sends leads only from these.
  3. Under Fields, keep the names name, phone, email, company and message, or change them to the names your own form uses.
  4. Choose where new leads start — a stage, an owner, tags — and Create source.
  5. Copy the URL and the form now. You won't see the URL again.

Put the form on your page

Graine gives you a form to paste where it should appear. It looks like this, with your source's URL in it:

<form id="graine-lead-form" action="https://api.graine.ai/v2/lead-intake/…" method="POST">
  <label for="graine-name">Name</label>
  <input id="graine-name" type="text" name="name" autocomplete="name">
  <label for="graine-phone">Phone</label>
  <input id="graine-phone" type="tel" name="phone" autocomplete="tel" required>
  <label for="graine-email">Email</label>
  <input id="graine-email" type="email" name="email" autocomplete="email">
  <label for="graine-message">Message</label>
  <textarea id="graine-message" name="message" rows="3"></textarea>
  <label><input type="checkbox" name="consent" value="yes"> You may contact me about my enquiry</label>
  <input type="hidden" name="_redirect" value="https://www.example.com/thank-you">
  <!-- Leave this empty: it is hidden from people and stops bots. -->
  <div style="position:absolute;left:-10000px" aria-hidden="true">
    <input type="text" name="_gotcha" tabindex="-1" autocomplete="off">
  </div>
  <button type="submit">Send</button>
</form>

Style it like the rest of your site. Remove required from the phone field if a lead may leave it out — a lead needs at least a phone number or an email.

Already have a form? Point it at the URL instead: set its action to the URL and its method to POST, and give its fields the names under Fields.

Keep the hidden _gotcha field

People never see it; bots fill it in. A submission with _gotcha filled in is answered like any other, and Graine keeps nothing from it.

A thank-you page

Add a hidden _redirect field with the address of your own thank-you page, and people land there after they send the form. Graine sends people only to a page on one of the source's websites. Without one, people see a plain confirmation from Graine instead of your own page — so add one.

The form's consent box sends consent as yes when ticked. The lead then records that it agreed to be contacted, when, and through which source. Drop the box if you don't need it.

Sending it without leaving the page

To keep people on your page, send the form with JavaScript. This works only from the websites you listed for the source:

<script>
  const form = document.getElementById("graine-lead-form");
  form.addEventListener("submit", async (event) => {
    event.preventDefault();
    const res = await fetch("https://api.graine.ai/v2/lead-intake/…", { method: "POST", body: new FormData(form) });
    if (res.ok) form.replaceWith("Thank you — we'll be in touch soon.");
  });
</script>

Test it

Send the form once from your site. The lead appears in Leads, and the source on the Sources page counts it as received. What Graine does next — matching the lead you already have, a first call if you turned that on, your rules — is on Lead sources.

On this page