On a schedule
Answer 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.
- Runs
- On a schedule
- Apps
- Google Sheets, Pinecone
- AI
- Yes, uses the built-in AI allowance
- Access
- Pinecone read+write; sheet edit
Send this to your assistant
Create a ClickRuntime automation: on the first of each quarter, index the new reports in my Drive Reports folder into Pinecone, then answer each question in my Questions tab for each report and write the answers to my Answers tab.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Analysts ask the same questions of every report: how did revenue change, what is the guidance, what risks are new. Answering them by hand for each company, every quarter, takes days, and the answers end up in scattered notes.
Investors, analysts and finance teams use it to get a consistent table of answers for every company each quarter, with the wording pulled from the reports themselves.
What you get out of it
One table, every company
Answers line up in the sheet by company and question, ready to compare.
Same questions, every time
Your standard questions are asked of every report, so nothing gets skipped.
Answers from the source
Each answer is based on passages from the report, not general knowledge.
Easy to extend
Add a question to the tab and it is asked next quarter.
How it works
What happens, step by step
At the start of each quarter, ClickRuntime finds reports added to your Drive folder since the last run.
Each report is split into chunks and added to your Pinecone index with its file name.
For every report, each question in your Questions tab is matched to the most relevant passages.
AI answers from those passages, and one row per report and question is added to your Answers tab.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect Pinecone
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
- Run it at a different time, more or less often, or only on weekdays
- 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
import json
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, state, ai
SHEET_ID, Q = "your-spreadsheet-id", "'your-folder-id' in parents and mimeType='application/vnd.google-apps.document'"
HOST, NS = "https://kb-abc123.svc.aped-1234.pinecone.io", "reports" # your index host and namespace
def upsert(records):
http.post(f"{HOST}/records/namespaces/{NS}/upsert", data="\n".join(json.dumps(r) for r in records[:96]), headers={
"Api-Key": credentials.secret("PINECONE_API_KEY"), "X-Pinecone-API-Version": "2025-04", "Content-Type": "application/x-ndjson"}).raise_for_status()
@on_trigger
def run(event):
creds = Credentials(credentials.connection("google", "work"))
drive, sheets = build("drive", "v3", credentials=creds, cache_discovery=False).files(), build("sheets", "v4", credentials=creds, cache_discovery=False).spreadsheets().values()
new = drive.list(q=f"{Q} and createdTime > '{state.get('since') or '2026-01-01T00:00:00Z'}'", fields="files(id,name,createdTime)").execute()["files"]
questions = [r[0] for r in sheets.get(spreadsheetId=SHEET_ID, range="Questions!A2:A").execute().get("values", []) if r]
rows, pc = [], {"Api-Key": credentials.secret("PINECONE_API_KEY"), "X-Pinecone-API-Version": "2025-04"}
for f in new:
text = drive.export(fileId=f["id"], mimeType="text/plain").execute().decode("utf-8", "ignore")
upsert([{"_id": f"{f['id']}#{n}", "chunk_text": text[i:i + 1500], "file_id": f["id"]} for n, i in enumerate(range(0, len(text), 1500))])
for q in questions:
hits = http.post(f"{HOST}/records/namespaces/{NS}/search", headers=pc, json={"query": {"inputs": {"text": q}, "top_k": 4,
"filter": {"file_id": {"$eq": f["id"]}}}}).json()["result"]["hits"]
answer = ai.generate(f"Answer briefly from these passages only.\n{[h['fields']['chunk_text'] for h in hits]}\nQ: {q}",
max_output_tokens=200).text.strip()
rows.append([f["name"], q, answer])
if rows:
sheets.append(spreadsheetId=SHEET_ID, range="Answers!A:C", valueInputOption="RAW", body={"values": rows}).execute()
state.set("since", max(f["createdTime"] for f in new))FAQ
Common questions
Which report formats work?
How are answers kept apart by company?
Can I ask a one-off question?
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
Score new Google Maps reviews and keep them searchable
Each day new Google Maps reviews get a sentiment score in your sheet and are added to Pinecone, so you can search past feedback by topic.
See how it worksIndex new documents nightly and log each one in a sheet
Every night new documents are indexed into Pinecone, and your sheet shows each file's name, chunk count and the date it was indexed.
See how it worksAnswer 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.
See how it worksKeep exploring
Set up “Answer your standard questions about each new financial report in a sheet” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.