All jobs

RFP Response Drafts From Past Proposals in Drive

Proposal software makes one agent per customer that reads each new RFP and past proposals in its Google Drive and drafts every answer into a new Sheet.

Run this on RushOpens the console with this prompt ready to send. Connect Google Drive there first.

What the agent does

This is for a company that sells proposal software to small government contractors, engineering consultancies and IT service firms. When a city, a school district or a utility posts a request for proposals, someone at the firm downloads a long PDF, reads it twice, makes a list of everything it asks for, and then hunts through old proposals for the paragraph on safety plans or project management that worked last time. Those old proposals already sit in the firm's Google Drive. The software adds a First draft button: the customer picks a new RFP in their Drive, and a sheet appears with every requirement and a draft answer beside it, each answer pointing to the past proposal it came from.

The company saves the agent once as a template with POST /o/{org}/agents, naming "connections": ["google-drive"] (it connects a Google Drive of its own first, because a template names connections its creator has) and instructions that it reads the customer's files and writes only the spreadsheet it creates. When a customer turns First draft on, the backend makes their agent with {"template": "<template id>", "name": "rfp-<customer id>"}, calls POST /o/{org}/agents/{agent}/connections {"type": "app", "name": "google-drive"}, and opens the authorize_url in a popup for the customer, who signs in on Google's own page. Rush's Google Drive product asks Google for drive.readonly, drive.file and spreadsheets, so the agent can read every file the customer can, change only files it created, and edit spreadsheets; because spreadsheets reaches every sheet, the instructions confine writing to the new one.

A run starts from the RFP's Drive file id. The agent reads the file's metadata with files.get, then its content: alt=media for a PDF or Word file, or files.export as plain text for a Google Doc, which Google limits to 10 MB of exported content. It lists the firm's past proposals with files.list, a q naming the folder as parent and trashed = false, following nextPageToken, and reads the ones whose names mark them as won before the rest. From the RFP it pulls every item a response has to address: each numbered question, each sentence that says shall or must, the submission instructions (due date and time, format, page limit, how to deliver), the evaluation criteria with their weights, and the forms that need a signature.

For each requirement it drafts an answer from the firm's own text: the closest section of a won proposal, rewritten to this RFP's wording and this agency's name, with the file name and heading it came from. Where no past proposal covers a requirement, such as an insurance limit the firm has never quoted or a staffing plan for a kind of site it has never served, the answer stays empty and the row is marked for a person. It never invents a reference project, a certification, a price, a name or a number. It creates the sheet with the Sheets API's spreadsheets.create, writes the rows with spreadsheets.values.update, and moves, shares or edits nothing else in the customer's Drive.

Start it with one API call

POST https://api.phoenix.so/o/{org}/sessions with this body:

{
  "agent": "<agent id>",
  "input": "Draft our response to the RFP in Google Drive file 1RfPxAmPlEfIlEiD0123456789. Read it with files.get (alt=media for a PDF or Word file; files.export as text/plain for a Google Doc). Our past proposals are in folder 1PaStPrOpOsAlS0123456789: list them with files.list, q: '1PaStPrOpOsAlS0123456789' in parents and trashed = false, following nextPageToken. Proposals we won have WON in the file name; read those first and the others only for a requirement still unanswered. Our firm: Kestrel Civil Engineering. 1) List every requirement: numbered questions, sentences with shall or must, submission instructions (due date and time, format, page limit, delivery), evaluation criteria with weights, and forms to sign. 2) For each, draft an answer only from text in our past proposals, adapted to this RFP's wording and agency, and give the source file name and heading. If nothing covers it, leave the answer empty and set needs_person true. Never invent a project, reference, certification, price, name or number. 3) Create a spreadsheet titled 'RFP draft - ' plus the RFP's title with spreadsheets.create and write columns ref, requirement, type, draft answer, source file, source heading, needs_person, note with spreadsheets.values.update. Do not edit, move, share or delete any other file. Return only JSON: {spreadsheet_url, due, page_limit, requirements, drafted, needs_person: [ref]}."
}
  1. Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
  2. Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions. The run starts in its own cloud sandbox.
  3. Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

What comes back

A new Google Sheet lists every requirement in the RFP with a draft answer, the past proposal it came from, and a flag on each row a person must write. The session's result is a short JSON summary: the sheet's address, the due date and page limit the agent read from the RFP, and the refs left for a person.

Three things are worth checking before anyone copies an answer out. The due date, time and delivery method, against the RFP itself, because a late or misdelivered bid is usually not read at all. Each drafted answer against the source it names, because the agent adapts wording from an old project and can carry over a detail, a site name or a crew size, that belonged to that job. And every row marked needs_person, which is often where a bid is won: the approach to this particular project, the schedule and the price are the firm's to write.

Nothing is submitted and nothing is sent. The agent has no way into the agency's portal or anyone's email, and the transcript lists every Drive and Sheets call it made, so the firm can see that the only file the run wrote is the new sheet.

Run it on every new RFP a customer picks

When a customer picks an RFP in the app's Drive file picker, the backend sends POST /o/{org}/sessions with that customer's agent id as agent, the RFP's file id, the past-proposals folder and the firm's name in input, and a request_id that is a UUID v5 of the file id, so a second press of First draft returns the same run. Customers bidding in the same week each get their own run on its own computer; runs past the key's max_concurrent wait as queued until one finishes, and the key's webhook brings each run.completed back to the right RFP.

An addendum is another event: the app sends the addendum's file id with the existing sheet's address, and the agent reports what changed, new questions, a moved due date or a different page limit, so the proposal manager edits the sheet rather than starting over.

The use case this job follows, with its automation and trigger: Run an agent per customer task.

Why run it on Rush?

Each customer's Google sign-in is theirs and stays in Rush's connection under that customer's agent. The software company never holds a Google token and registers no Google app, since the customer signs in to Rush's app on Google's page, and a session's accounts names the Google account a run read, so the company can show any customer which runs opened their Drive. Two firms that bid for the same county contract have two separate agents, and neither run can open the other's proposals.

Drafting from past proposals means exporting and reading many long documents, which happens on the run's own computer rather than on a proposal manager's laptop. Each run keeps a record of every file it opened and what it cost, and the company adds the cost up per customer with GET /o/{org}/sessions?agent=<agent id>.

Frequently asked questions

Does it write the whole proposal?

No. It drafts an answer for each requirement from text the firm has already written, and leaves the rest marked for a person. The technical approach for this project, the schedule, the price and anything new are written by the firm.

Why does the Google sign-in include write access to Sheets?

Rush's Google Drive product asks for spreadsheets so an agent can create and fill a sheet, and Google's scope reaches every spreadsheet the account can edit. The template's instructions and the prompt confine writing to the sheet the run creates, and the transcript records each call.

What if the RFP is a scanned PDF?

A PDF with a text layer reads directly. A scan may have none, and then the agent says so in its result and names the pages it could not read rather than guessing at requirements; the firm can run it again on a text copy.

What if two past proposals answer the same question differently?

The prompt has it prefer proposals the firm won. Where two of those disagree, it drafts from the more recent one and puts the other file in the note column, so the proposal manager chooses.

More Google Drive jobs

More jobs like this: Run an agent per customer task

Keep reading