The moment it happens
Research a company and save a report as a Google Doc
Submit a company name and a structured research report is saved as a Google Doc in your Reports folder.
- Runs
- The moment it happens
- Apps
- Google Docs, Google Drive
- AI
- Yes, uses the built-in AI allowance
- Access
- Drive drive.file; Docs write
Send this to your assistant
Create a ClickRuntime automation: when I submit a company name, research it from its website and save a short report as a Google Doc in my Drive 'Reports' folder.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A consultant offers prospects a free audit as a way to start a conversation. Each one starts with an hour of reading the company's website, noting what they sell, who they sell to and where they could improve, then formatting it into a document worth sending. She can only do a few a week.
A first draft of the report, created from a company name in a couple of minutes, lets you send more of them and spend your time on the insight rather than the formatting. Consultants, agencies and sales teams use it to prepare research reports and lead magnets for prospects.
What you get out of it
Hours of research become minutes
The report arrives as a structured draft, so you start from something to edit instead of a blank page.
Consistent reports every time
Every report follows the same sections, which makes them look professional and easy to compare.
Ready to share from Drive
Reports are saved as Google Docs in one folder, so you can edit, comment and share them with a link.
More prospects reached
Producing a tailored report takes so little effort that you can offer one to every promising lead.
How it works
What happens, step by step
ClickRuntime starts as soon as you submit a company name and website.
It ignores a submission it has already turned into a report.
It reads the company's website, and AI writes a structured report with an overview, customers, positioning and opportunities.
The report is saved as a Google Doc in your Drive Reports folder.
Before it runs live
- Connect Google Docs
- Connect Google Drive
- 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 Docs and Google Drive steps into one automation
Under the hood
The code that runs this automation
import re
from clickruntime import on_event, credentials, http, state, ai
FOLDER_ID = "your-reports-folder-id"
@on_event
def handle(event):
if state.get(f"done:{event.event_id}"):
return {"skipped": "duplicate"}
company, site = event.json["company"], event.json["website"].rstrip("/")
pages = []
for path in ["", "/about", "/products"]:
try:
pages.append(re.sub(r"<[^>]+>", " ", http.get(site + path, timeout=15).text)[:4000])
except Exception:
pass
report = ai.generate(f"Write a research report on {company} with sections: Overview, Products, Customers, Positioning, Opportunities.\n\n" + "\n".join(pages),
max_output_tokens=1500).text
g = {"Authorization": f"Bearer {credentials.connection('google', 'work')}"}
doc = http.post("https://docs.googleapis.com/v1/documents", headers=g, json={"title": f"{company} research report"}).json()
http.post(f"https://docs.googleapis.com/v1/documents/{doc['documentId']}:batchUpdate", headers=g,
json={"requests": [{"insertText": {"location": {"index": 1}, "text": report}}]})
http.patch(f"https://www.googleapis.com/drive/v3/files/{doc['documentId']}", headers=g, params={"addParents": FOLDER_ID, "removeParents": "root"})
state.set(f"done:{event.event_id}", True)
return {"document": doc["documentId"]}FAQ
Common questions
Where does the information come from?
What sections does the report have?
How do I submit a company?
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
Tailor your CV to each job posting from one master Doc
Send a job posting and a copy of your master CV, tailored to that role, is saved in your Applications folder in Drive.
See how it worksCreate PDF quotes from a Google Doc template when a form is submitted
Each quote request fills your Google Doc template, saves a PDF in Drive and emails it to you, ready to send.
See how it worksCreate next week's lesson plans in Drive every Sunday
Every Sunday you get a lesson plan Google Doc for each lesson next week, filed in your Lessons folder, with the links emailed to you.
See how it worksKeep exploring
Set up “Research a company and save a report as a Google Doc” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.