Connect with the API

Send Typeform responses to GuardenerAI.

Typeform responses can become leads in GuardenerAI through the public API, with one step in between. This is a connection you build, not a native integration, and Typeform webhooks cannot add a custom header, so they cannot send your API key themselves. Route each response through Zapier, Make, n8n or a small function of your own, which searches GuardenerAI by email and then creates or updates the lead.

Not a native integration. Typeform sends each response to your middle step, which writes the lead into GuardenerAI. Nothing goes back to Typeform.

What you need

  • A GuardenerAI API key with the Member role and Read and write scope, created by an admin under Settings, API keys.
  • A form that asks for first name, last name and email, which GuardenerAI requires on every lead. Give those questions clear refs in Typeform so they are easy to map.
  • One middle step: a Zapier, Make or n8n account, or somewhere to run a small function.

Step by step

  1. Pick the middle step

    With Zapier, start from Typeform’s New Entry trigger. With Make, use Typeform’s Watch Responses. With n8n, point a Typeform webhook (Connect, Webhooks in Typeform) at an n8n Webhook node. Each of these then calls the GuardenerAI API with your key.

  2. Map answers by ref, not by position

    Typeform sends answers as a list under form_response.answers, each with its question’s field.ref and the value under a key named for its type, such as text or email. Match on the ref, so reordering the form does not break the mapping.

  3. Search, then create or update

    Search leads with filter=email:equals: and the lower-cased email. If a lead comes back, update it with PUT, sending the whole record; if not, create it with POST /api/leads. Typeform retries deliveries that fail or time out, so the search also stops a retried response from becoming a second lead.

  4. Or write a small function

    If you would rather not use an automation tool, a function on any serverless host can take the webhook. Set a secret on the Typeform webhook and check the Typeform-Signature header before trusting the body: it is sha256= plus the base64 HMAC-SHA256 of the raw body, keyed with your secret.

    Node.js sketch
    import crypto from 'node:crypto';
    const API = 'https://YOUR-ORG.guardenerai.com/api/leads';
    const H = { 'X-Api-Key': process.env.GUARDENERAI_KEY, 'Content-Type': 'application/json' };
    
    export async function handle(rawBody, signature) {
      const expected = 'sha256=' + crypto.createHmac('sha256', process.env.TYPEFORM_SECRET)
        .update(rawBody).digest('base64');
      if (signature !== expected) return 401;
    
      const answers = JSON.parse(rawBody).form_response.answers;
      const by = (ref) => answers.find((a) => a.field.ref === ref);
      const lead = {
        firstName: by('first_name')?.text,
        lastName: by('last_name')?.text,
        email: by('email')?.email.trim().toLowerCase(),
        message: by('project')?.text,
        sourceMedium: 'typeform'
      };
    
      const found = await (await fetch(API + '?filter=email:equals:' + encodeURIComponent(lead.email), { headers: H })).json();
      const res = found.totalElements > 0
        ? await fetch(API + '/' + found.content[0].id, { method: 'PUT', headers: H, body: JSON.stringify({ ...found.content[0], ...lead }) })
        : await fetch(API, { method: 'POST', headers: H, body: JSON.stringify(lead) });
      return res.status;
    }
Before you rely on it

What to know about this connection.

With Typeform

  • Typeform webhooks cannot send custom headers, only a signing secret. The API key always lives in the middle step, never in Typeform.
  • Typeform retries failed deliveries for hours and switches a webhook off if every delivery keeps failing, so watch the webhook’s delivery log after a key change.
  • Answers beyond name, email, phone and company go in message or in a custom field your admin has created.

With every API connection

  • The key must have the Member role and Read and write scope. A Read only key gets a 403 on every write.
  • There is no upsert. Search for the record by email first, then create it or update the one you found.
  • There are no outbound webhooks. Data flows into GuardenerAI; nothing tells the other tool when a record changes, so anything reading back has to ask on a schedule.
  • Each key allows 10 requests per second. Above that the API answers 429 with Retry-After: 1, so wait a second and retry.
  • An update with PUT replaces the whole record. Send every field you want to keep, not only the one that changed.
  • If one of your duplicate rules blocks it, a create answers 409 duplicate_blocked with the matching records. Update the match instead of forcing a second copy.

Checked against Typeform’s own documentation: Typeform webhooks, Webhook payload, Securing webhooks, Typeform on Zapier, Typeform on Make. Their plans and features change, so confirm the current details there.

Where it lands

The modules this feeds.

FAQ

Fair questions.

Does GuardenerAI connect to Typeform natively?
No. GuardenerAI does not ship a Typeform connector. You connect the two through the public API, with an automation tool or a small function in between.
Why can’t Typeform call the GuardenerAI API directly?
The API needs your key in an X-Api-Key header, and Typeform webhooks cannot add custom headers. Something in between has to add it.
Which middle step is easiest?
If you already pay for Zapier or Make, use that: both have Typeform triggers. n8n suits teams that host their own tools. A function costs least to run but needs someone to maintain it.