Skip to content

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.

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

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

  1. Every 15 minutes, ClickRuntime checks Gmail for new emails that look like RFPs and have an attachment.

  2. It reads the text of the attachment.

  3. AI lists each question and drafts an answer to it.

  4. 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

RunsEvery 15 minutes
Draft RFP answers in a Google Doc when one arrives by emailtoday, 9:00Succeeded
Email · RFP draft readyRFP draft ready: Northwind_IT_Services_RFP.pdf. 34 questions answered in the linked Google Doc.

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 Gmail and Google Docs 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.
rfp_answered_into_a_google_doc.pyexample
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?
Emails matching a Gmail search such as subject:RFP with an attachment. You can change the search to match how RFPs usually reach you.
What attachment formats work?
Plain-text documents and PDFs with selectable text work best. Scanned images without text cannot be read.
Can the answers use our standard wording?
Yes. Add your company background and standard answers to the instructions, and the drafts will reuse that wording where it fits.
What permissions does it need?
Gmail gmail.readonly, gmail.send; Docs write. 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 each time it checks. Checks that find nothing new and stop right away aren't counted.
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 “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.