# Send form submissions to a Google Sheet, set up from your AI assistant

Source: https://clickruntime.com/use-cases/form-to-google-sheets

> Ask your assistant once. ClickRuntime gives the form a trigger link, checks each submission is genuine, and adds it as a row in your sheet with the columns you choose.

## Can ChatGPT or Claude add form submissions to a Google Sheet?

Not by themselves: an assistant can't receive a form's webhook while you're away, and it has nowhere to keep your Google sign-in. With ClickRuntime connected, the assistant sets up an automation with its own trigger link. Typeform, Tally or any form that sends webhooks posts each submission there, and the script adds a row to your sheet within seconds.

### Why the assistant can't do this on its own

- No address to receive events. A form sends its webhook to a URL. A chat doesn't have one, and it isn't running when someone fills in the form.
- No safe place for your Google account. The script needs a Google sign-in that lasts. ClickRuntime keeps the connection and refreshes it; the chat never sees it.
- No check that a submission is real. A trigger link can verify Typeform's signature so only genuine submissions add rows.
- Built-in scheduled tasks run on a timer, not when a form is submitted, and can't write to your sheet.

## Set it up from your AI assistant

Prompt to copy:

> Create a ClickRuntime automation: when someone submits my Typeform contact form, add a row to the Leads tab of my Leads spreadsheet with the date, name, email, company and message. Check the Typeform signature so only real submissions are added.

1. **Connect ClickRuntime to your assistant.** Add ClickRuntime as a connector (MCP server) in ChatGPT, Claude, Cursor or another MCP client, using https://clickruntime.com/api/mcp. You sign in with Google or email; there is no API key to copy. This is done once per assistant.
2. **Paste the prompt.** Start a new chat and paste: “Create a ClickRuntime automation: when someone submits my Typeform contact form, add a row to the Leads tab of my Leads spreadsheet with the date, name, email, company and message. Check the Typeform signature so only real submissions are added.” Change the details (times, channels, addresses) to yours.
3. **Read the draft.** The assistant restates what will happen, asks for anything missing, such as your timezone or which channel to post to, and saves a draft automation. A draft never runs on its own, so nothing happens until you agree.
4. **Connect accounts and save keys.** The assistant asks you to connect a Google account in the ClickRuntime dashboard (Google's own consent screen opens) and to pick the spreadsheet. The automation can open only the files you picked. Nothing about the account goes into the chat. For Typeform, the assistant gives you the trigger link to paste under Connect → Webhooks, and asks you to save Typeform's webhook secret as TYPEFORM_SECRET in the ClickRuntime dashboard.
5. **Test it.** Use Typeform's “Send test request” button, or submit the form yourself. The assistant reads the stored event, checks the field names it contains, and confirms the row appeared in the sheet. Tally and Google Forms work the same way with their own webhook settings.
6. **Turn it on.** The assistant tells you what will run, when, and which services it will contact, then asks your permission to turn it on. From then on it runs on ClickRuntime's servers, and you can close the chat.
7. **Check it in the ClickRuntime dashboard.** The automation's page shows its trigger link, each incoming event with the time it arrived and whether the signature passed, and the run that handled it. If a run fails, the event is kept: fix it with your assistant and replay the event instead of asking the person to submit again.

Connector setup for each assistant: https://clickruntime.com/assistants

## What the assistant writes

`typeform_to_sheet.py`

```python
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, verify, state, log

SHEET_ID = "your-spreadsheet-id"
RANGE = "Leads!A:E"

def answers_by_ref(form_response):
    out = {}
    for a in form_response.get("answers", []):
        ref = a["field"]["ref"]
        out[ref] = a.get("text") or a.get("email") or a.get("phone_number") or ""
    return out

@on_event
def handle(event):
    secret = credentials.secret("TYPEFORM_SECRET")
    if not verify.typeform(event.body, event.header("Typeform-Signature"), secret):
        log.warning("Rejected a request with a bad signature")
        return {"skipped": "bad signature"}

    if state.get("done:" + event.event_id):
        return {"skipped": "already added"}

    resp = event.json["form_response"]
    a = answers_by_ref(resp)
    row = [resp["submitted_at"], a.get("name", ""), a.get("email", ""), a.get("company", ""), a.get("message", "")]

    sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    sheets.spreadsheets().values().append(
        spreadsheetId=SHEET_ID, range=RANGE, valueInputOption="USER_ENTERED", body={"values": [row]}
    ).execute()

    state.set("done:" + event.event_id, True)
    return {"added": a.get("email", "")}
```

- The field refs (name, email, company, message) come from a stored test submission, so the script uses your form's real fields rather than guesses.
- The signature check uses the raw body exactly as Typeform sent it. You can also turn on signature checks for the trigger link itself so bad requests never reach the script.
- The event id is stored after each row, so a retried delivery doesn't add the same submission twice.
- For Tally or Google Forms, the assistant swaps the check and the field mapping; the sheet part stays the same.

## Trigger link, not a schedule

Use the trigger link. Forms that send webhooks (Typeform, Tally, Jotform, and Google Forms through a small Apps Script) deliver each submission as it happens, and each one is one run.

If your form tool can't send webhooks, use a schedule instead: the automation checks the form's API every 15 minutes, adds only new responses, and remembers the last one it saw.

## Limits

- Each submission is one run. A form with heavy traffic uses runs in proportion.
- The automation can only open spreadsheets you picked when connecting Google, plus any it creates.
- File uploads arrive as links from the form tool; the script can store the link, not the file.

## Troubleshooting

### Rows have empty columns.

The field refs in the script don't match your form. Ask your assistant: “check the latest event and fix the column mapping”. It reads the stored submission and updates the script.

### Every request says bad signature.

The secret saved in the ClickRuntime dashboard doesn't match the one in Typeform's webhook settings. Copy it again, save it as TYPEFORM_SECRET, then replay the event.

### The run fails with 403 from Google.

The spreadsheet wasn't picked when you connected Google. Open the connection in the ClickRuntime dashboard, choose the file, and replay the event.

## Related

- [Typeform automations](https://clickruntime.com/apps/typeform)
- [Tally automations](https://clickruntime.com/apps/tally)
- [Google Forms automations](https://clickruntime.com/apps/google-forms)
- [Google Sheets automations](https://clickruntime.com/apps/google-sheets)
- [Jotform automations](https://clickruntime.com/apps/jotform)
- [slack-alert-for-new-submissions-tally](https://clickruntime.com/templates/slack-alert-for-new-submissions-tally)
- [email-me-new-submissions-tally](https://clickruntime.com/templates/email-me-new-submissions-tally)
- [Webhook automation](https://clickruntime.com/use-cases/webhook-automation)
- [Form leads to your CRM](https://clickruntime.com/use-cases/form-leads-to-crm)
- [AI triage and summaries](https://clickruntime.com/use-cases/ai-classify-and-summarise)
- [Zapier alternative](https://clickruntime.com/alternatives/zapier)
- [Google Apps Script alternative](https://clickruntime.com/alternatives/google-apps-script)
- [Docs: trigger-links](https://clickruntime.com/docs/trigger-links)
- [Docs: connections-and-secrets](https://clickruntime.com/docs/connections-and-secrets)

## Extend it: what you can add next

The first version is rarely the last. Because the automation is a Python script with memory, AI and any API available, you grow it by asking your assistant for the change. Each change is a new version, and a failed deploy never replaces the working one.

- **Label each submission (sales, support, partnership) with AI and add it to a matching tab** (Built-in AI)
  Prompt: "Change my Typeform to Leads sheet automation so it labels each message as sales, support or partnership and adds the row to the tab with that name."
- **Skip repeat submissions from the same email address** (Memory between runs)
  Prompt: "Change my Typeform to Leads sheet automation so it remembers which email addresses it has added and skips repeats, noting the repeat in a Repeats tab instead."
- **Post high-value leads to a Slack channel as they arrive** (Any app or API)
  Prompt: "Add to my Typeform to Leads sheet automation: when the company size answer is 50 or more, also post the lead to #sales in Slack."
- **A weekly AI summary of what people asked about** (Schedules)
  Prompt: "Add to my Typeform to Leads sheet automation: every Monday at 9, email me a short summary of last week's messages grouped by topic."
- **Create the contact in HubSpot as well as the sheet row** (Any app or API)
  Prompt: "Change my Typeform to Leads sheet automation so it also creates or updates the contact in HubSpot with the same fields."
- **Clean the data before it lands: trim, fix capitalisation, normalise phone numbers** (Multi-step logic)
  Prompt: "Change my Typeform to Leads sheet automation so it trims spaces, capitalises names and writes phone numbers in international format before adding the row."
- **Pull company and role out of a free-text message when the fields are blank** (Built-in AI)
  Prompt: "Change my Typeform to Leads sheet automation so that when company or job title is blank, it fills them in from the message if they are mentioned."
- **Take submissions from a second form into the same sheet** (Trigger links)
  Prompt: "Change my Typeform to Leads sheet automation so it also accepts submissions from my Tally demo form, with a Source column saying which form it came from."

## Questions

### Can ChatGPT add form submissions to Google Sheets?

Yes, with ClickRuntime connected. ChatGPT sets up an automation with a trigger link for your form's webhook, and each submission is added as a row on ClickRuntime's servers, whether or not the chat is open.

### Which forms work?

Any form that sends webhooks, such as Typeform, Tally and Jotform, plus Google Forms through a short Apps Script that forwards each response. Forms without webhooks can be checked on a schedule through their API.

### How fast do rows appear?

Within a few seconds of the form sending its webhook. Each submission is one run.

### Are fake submissions filtered out?

The trigger link can check the form's signature (Typeform has one built in, and others can use a shared secret), so requests that don't come from your form are rejected.

### Can I do more with each submission?

Yes. The Extend it list shows common additions, such as labelling submissions with AI, skipping duplicates and alerting Slack for big leads. Ask your assistant and it changes the same automation.

### What does it cost?

One run per submission. The free plan includes 250 runs a month, with webhooks and AI included.
