Every 15 minutes
Draft RFP answers in a Google Doc when one arrives by email
When an RFP lands in Gmail, every question in it is answered in a draft Google Doc and you get an email with the link.
- Runs
- Every 15 minutes
- Apps
- Gmail, Google Docs
- AI
- Yes, uses the built-in AI allowance
- Access
- Gmail gmail.readonly, gmail.send; Docs write
Send this to your assistant
Create a ClickRuntime automation: when an email with an RFP attachment arrives in Gmail, draft answers to every question in a Google Doc and email me the link.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small software consultancy answers several requests for proposal a month. Each one is a document full of questions, many of them the same as last time: company background, security practices, support hours, references. Someone spends a day copying old answers and adjusting them before the real work of pricing and scoping can start.
This automation watches Gmail for RFP emails with an attachment, pulls out the questions, and drafts an answer to each in a new Google Doc. You get an email with the link, so the first draft is ready when you start, and your time goes on the parts that win the bid.
What you get out of it
A first draft within minutes
The questions are laid out with draft answers soon after the email arrives. Your team starts by editing rather than from a blank page, which matters when deadlines are short.
Nothing in the RFP is missed
Every question is pulled out and listed in order. Long documents with questions buried in appendices are covered just as well as short ones.
More time on pricing and approach
Background and boilerplate answers are drafted for you. The hours saved go into the scope, price and approach that decide whether you win.
Easy to review together
The draft is a normal Google Doc, so colleagues can comment, suggest edits and divide sections between them.
How it works
What happens, step by step
Every 15 minutes, ClickRuntime checks Gmail for new emails that look like RFPs and have an attachment.
It reads the text of the attachment.
AI lists each question and drafts an answer to it.
The questions and answers are saved in a new Google Doc, and you get an email with the link.
Before it runs live
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
- Connect Google Docs
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 Gmail and Google Docs steps into one automation
Under the hood
The code that runs this automation
import base64
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, state, ai, notify, report_fetched
@on_trigger
def run(event):
creds = Credentials(credentials.connection("google", "work"))
gmail = build("gmail", "v1", credentials=creds, cache_discovery=False).users()
seen = set(state.get("seen") or [])
msgs = [m for m in gmail.messages().list(userId="me", q="subject:RFP has:attachment newer_than:2d").execute().get("messages", []) if m["id"] not in seen]
report_fetched(len(msgs))
if not msgs:
return {"summary": "Nothing new"}
docs = build("docs", "v1", credentials=creds, cache_discovery=False).documents()
for m in msgs:
full = gmail.messages().get(userId="me", id=m["id"]).execute()
part = next(p for p in full["payload"].get("parts", []) if p.get("filename"))
data = gmail.messages().attachments().get(userId="me", messageId=m["id"], id=part["body"]["attachmentId"]).execute()["data"]
text = base64.urlsafe_b64decode(data).decode("utf-8", "ignore")[:20000]
draft = ai.generate(text, system="List every question in this RFP and draft a concise answer under each.", max_output_tokens=2048).text
doc = docs.create(body={"title": f"RFP answers: {part['filename']}"}).execute()
docs.batchUpdate(documentId=doc["documentId"], body={"requests": [{"insertText": {"location": {"index": 1}, "text": draft}}]}).execute()
notify.email_me(f"RFP draft ready: {part['filename']}", f"https://docs.google.com/document/d/{doc['documentId']}")
seen.add(m["id"])
state.set("seen", list(seen)[-200:])
return {"drafted": len(msgs)}FAQ
Common questions
Which emails does it pick up?
What attachment formats work?
Can the answers use our standard wording?
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
Email action items from new meeting notes
When a meeting notes doc appears in your folder, attendees get an email with a short summary and their action items.
See how it worksGet an AI client brief as a Google Doc by email
Submit a client name and receive an email linking to a Google Doc brief on that company, ready before the meeting.
See how it worksWrite a daily email digest into a Google Doc
Every evening, a short summary of the day's email is added to the top of a running Google Doc.
See how it worksKeep exploring
Set up “Draft RFP answers in a Google Doc when one arrives by email” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.