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.
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
When a question arrives at your automation's link, ClickRuntime receives it straight away.
It reads your sheet and keeps the rows that mention words from the question.
Your Pinecone index is searched for the most relevant document passages.
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
Build your own
Need it to work differently?
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
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?
Which chat tools work?
Can it change the sheet?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Answer support requests from your knowledge base and log every ticket
Each support request gets a suggested answer from your knowledge base in Slack, and every request is logged in your sheet with its category.
See how it worksAnswer chat questions and take bookings into a sheet
Customers ask questions or book in your chat; questions are answered from your FAQ in Pinecone and bookings are added to your sheet.
See how it worksAnswer your standard questions about each new financial report in a sheet
Each quarter new financial reports are indexed in Pinecone, and the answers to your standard questions about each company are written to your sheet.
See how it worksKeep exploring
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.