Skip to content

The moment it happens

Answer chat questions from your sheet data and documents together

People ask a question in your chat and get an answer that combines the figures in your Google Sheet with the guidance in your documents.

Runs
The moment it happens
Apps
Google Sheets, Pinecone
AI
Yes, uses the built-in AI allowance
Access
sheet read; Pinecone read

Send this to your assistant

Create a ClickRuntime automation: when a question is posted to this link, look up matching rows in my Products sheet and relevant passages in Pinecone, answer with AI, and send the answer back to the chat.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

Many questions need two sources at once: a price or stock level from a sheet, and a rule or explanation from a document. A chatbot that knows only one of them gives half answers, and staff end up answering anyway.

Shops, advisers and service businesses use it to answer customers or colleagues with both the numbers and the reasoning, from the sources they already maintain.

What you get out of it

  • Numbers and context together

    Prices, stock or rates from the sheet are combined with explanations from your documents.

  • Your sheet stays the source

    Update a price in the sheet and the next answer uses it.

  • No double maintenance

    Figures live in the sheet and guidance in documents, as they do now.

  • Answers only from your sources

    If neither source covers the question, the answer says so.

How it works

What happens, step by step

  1. When a question arrives at your automation's link, ClickRuntime receives it straight away.

  2. It reads your sheet and keeps the rows that mention words from the question.

  3. Your Pinecone index is searched for the most relevant document passages.

  4. AI answers using both, and the answer is sent back to your chat.

Before it runs live

  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Connect Pinecone
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Answer chat questions from your sheet data and documents togetherjust nowSucceeded
Chat · WebsiteQ: Is the Northwind 12 kW heat pump in stock and is it eligible for the grant? A: Yes, 6 in stock at 7,450 EUR, and it qualifies under the 2026 scheme.

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Google Sheets and Pinecone steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
advisor_bot_over_sheet_data_plus_pinecone_docs.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, http, ai

SHEET_ID, REPLY_URL = "your-spreadsheet-id", "https://chat.example.com/api/reply"
HOST, NS = "https://kb-abc123.svc.aped-1234.pinecone.io", "guides"  # your index host and namespace
def search(text, k=5):
    r = http.post(f"{HOST}/records/namespaces/{NS}/search", json={"query": {"inputs": {"text": text}, "top_k": k}}, headers={
        "Api-Key": credentials.secret("PINECONE_API_KEY"), "X-Pinecone-API-Version": "2025-04"}).json()
    return [h["fields"] for h in r["result"]["hits"]]

@on_event
def handle(event):
    body = event.json or {}
    q = str(body.get("message", ""))[:500]
    rows = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False) \
        .spreadsheets().values().get(spreadsheetId=SHEET_ID, range="Products!A1:F").execute().get("values", [])
    words = {w.lower() for w in q.split() if len(w) > 3}
    matches = [rows[0]] + [r for r in rows[1:] if words & {c.lower() for cell in r for c in cell.split()}][:20]
    docs = "\n\n".join(h["chunk_text"] for h in search(q, 4))
    answer = ai.generate(f"Answer using only this data and these documents. Say if they don't cover it.\nSHEET ROWS: {matches}"
                         f"\nDOCUMENTS:\n{docs}\n\nQuestion: {q}", max_output_tokens=400).text
    http.post(REPLY_URL, json={"session_id": body.get("session_id"), "text": answer})
    return {"rows": len(matches) - 1}

FAQ

Common questions

How large can the sheet be?
A few hundred rows works well, since the matching rows are picked before the AI sees them. For very large sheets, use a filter column such as category.
Which chat tools work?
Any chat or form tool that can send the question to a web link and accept the answer at a reply link.
Can it change the sheet?
No. It only reads the sheet.
What permissions does it need?
sheet read; Pinecone read. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Answer chat questions from your sheet data and documents together” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.