build it in 30 minutesby updated 7 min read

Auto-Draft Proposals From a Google Doc Template in 30 Minutes

Fill in a short Google Form after the call and get a proposal draft in your own Google Docs template, written by Claude from your notes. The price stays yours.

Put placeholders in a Google Docs proposal template and collect each brief with a Google Form. An Apps Script form-submit trigger copies the template, asks Claude for the problem, approach and next-steps paragraphs using only the brief, fills the placeholders with replaceText and emails you the link. You add the price and edit before sending.

The build: after a sales call you fill in a short Google Form. When you submit it, a copy of your proposal template appears in a Drive folder with the client's name, the timeline and three paragraphs Claude drafted from your notes, and you get an email with the link. You edit it, add the price and send it yourself.

Everything runs in Google's own tools, Forms, Docs, Drive and Apps Script, plus one call to the Claude API. The 30 minutes assume you already have a proposal template in Google Docs and a Claude API key, and that you're comfortable pasting code into the Apps Script editor.

Step 1: Mark up the template

Open your proposal template in Google Docs and replace the parts that change with placeholders:

  • {{client_name}} wherever the client's name appears
  • {{problem}}, {{approach}} and {{next_steps}}, each on a line of its own, where those paragraphs go
  • {{timeline}} for the timeline from the brief

Leave the price section as you write it now, with a visible marker such as [price]. The script never fills it. Keep the template to a single tab, since the script edits the body of the first tab.

Copy the template's ID from its URL, the long string between /d/ and /edit. Create a Drive folder for the drafts and copy its ID from the folder's URL as well.

Step 2: Build the brief form

In Google Forms, add five questions with these exact titles, because the script looks the answers up by title: Client name, Their problem in their words, Scope, Timeline, Notes. Paragraph questions suit the longer answers. Copy the form's ID from the URL of its edit page.

Step 3: Add the script

Go to script.google.com/create to start a standalone project and paste the code below. Then open Project Settings and, under Script Properties, add a property named ANTHROPIC_API_KEY with your Claude API key as the value. That keeps the key out of the code. Put the three IDs from steps 1 and 2 at the top.

const TEMPLATE_ID = 'paste-the-template-doc-id';
const FOLDER_ID = 'paste-the-drafts-folder-id';
const FORM_ID = 'paste-the-form-id';

function setup() {
  ScriptApp.newTrigger('draftProposal').forForm(FORM_ID).onFormSubmit().create();
}

function draftProposal(e) {
  const a = {};
  e.response.getItemResponses().forEach(r => {
    a[r.getItem().getTitle()] = String(r.getResponse());
  });
  const client = a['Client name'];

  const draft = askClaude(
    'Draft three sections of a consulting proposal for ' + client + '.\n' +
    'Use only the notes below. Where the notes are silent, write [confirm] instead of guessing.\n' +
    'Never mention prices, fees or discounts.\n\n' +
    'Their problem, in their words: ' + a['Their problem in their words'] + '\n' +
    'Scope: ' + a['Scope'] + '\n' +
    'Timeline: ' + a['Timeline'] + '\n' +
    'Notes: ' + a['Notes'] + '\n\n' +
    'problem: one paragraph restating their problem in plain language.\n' +
    'approach: one paragraph on how the work would run, step by step.\n' +
    'next_steps: one paragraph on what happens after they say yes.\n' +
    'Plain sentences. No headings, no bullet points, no line breaks.'
  );

  const copy = DriveApp.getFileById(TEMPLATE_ID)
    .makeCopy('Proposal draft - ' + client, DriveApp.getFolderById(FOLDER_ID));
  const doc = DocumentApp.openById(copy.getId());
  const body = doc.getBody();
  fill(body, 'client_name', client);
  fill(body, 'timeline', a['Timeline']);
  fill(body, 'problem', draft.problem);
  fill(body, 'approach', draft.approach);
  fill(body, 'next_steps', draft.next_steps);
  doc.saveAndClose();

  MailApp.sendEmail(Session.getEffectiveUser().getEmail(),
    'Proposal draft ready: ' + client,
    'Review it, add the price and edit before sending:\n' + copy.getUrl());
}

// replaceText reads its first argument as a regular expression, so the braces are escaped.
function fill(body, key, value) {
  body.replaceText('\\{\\{' + key + '\\}\\}', value || '[confirm]');
}

function askClaude(prompt) {
  const key = PropertiesService.getScriptProperties().getProperty('ANTHROPIC_API_KEY');
  const res = UrlFetchApp.fetch('https://api.anthropic.com/v1/messages', {
    method: 'post',
    contentType: 'application/json',
    headers: { 'Authorization': 'Bearer ' + key, 'anthropic-version': '2026-10-21' },
    payload: JSON.stringify({
      model: 'claude-opus-5-5',
      max_tokens: 8000,
      messages: [{ role: 'user', content: prompt }],
      output_config: { format: { type: 'json_schema', schema: {
        type: 'object',
        properties: {
          problem: { type: 'string' },
          approach: { type: 'string' },
          next_steps: { type: 'string' },
        },
        required: ['problem', 'approach', 'next_steps'],
        additionalProperties: false,
      } } },
    }),
  });
  const data = JSON.parse(res.getContentText());
  return JSON.parse(data.content.filter(c => c.type === 'text').map(c => c.text).join(''));
}

A few details in that code are worth knowing before you change it:

  • The request goes to the Messages API with the Authorization and anthropic-version headers that Anthropic's API reference lists for direct HTTP calls. Claude accepts a Developer API key as the bearer token.
  • output_config.format with a JSON schema makes Claude's reply match that schema, so the three sections come back as named fields. The code reads the text block of the reply and ignores any other blocks.
  • Claude Opus 5.5 (claude-opus-5-5) is the model Anthropic's models page suggests starting with. Any current model ID from that page works in its place.
  • replaceText reads its search pattern as a regular expression in Google's RE2 syntax, so the code escapes the curly braces. It matches inside one text block at a time, which is why each section is requested as a single paragraph with no line breaks.

Step 4: Turn on the trigger

Select setup in the editor and click Run. Google asks you to authorize the script the first time. From then on, each form submission runs draftProposal. Installable triggers run under the account of the person who created them, so the drafts go into your Drive and the email comes from your account.

If a run fails, for example because the API key is wrong, Apps Script sends you an email summarizing the failure. UrlFetchApp throws an error when the API returns a failure status, so a bad request shows up in that email instead of producing an empty draft.

Step 5: Test it

Submit the form with notes from a proposal you've already sent and compare the draft with what went out. Look for anything that wasn't in your notes. The prompt tells Claude to write [confirm] where the notes are silent, so search the draft for [confirm] and fill those spots before sending. Then add the price.

Limits worth knowing

  • Apps Script allows 20,000 URL Fetch calls a day on a consumer Google account and 100,000 on Google Workspace. Each proposal uses one.
  • A script can run for 6 minutes per execution. UrlFetchApp's default timeout is 360 seconds.
  • Triggers on a consumer account get 90 minutes of total runtime a day, and 6 hours on Workspace.
  • Whatever you type in the brief goes to the Claude API. Keep it to what the draft needs, and check that your client agreements allow it.

Why the price stays manual

The script fills only the sections that describe the work. Pricing is your call on every deal, so it stays in the part of the template you fill in by hand. Keeping it out of the prompt also means no figure can slip into the problem or approach paragraphs.

What to add next

  • A second template for smaller engagements, chosen by a multiple-choice question on the form.
  • A Scope field in the template filled from the brief, so the client sees their own words.
  • More Google Workspace builds are in the Google AI stack guide.

Sources

  1. Google Apps Script, Installable triggers (form submit, errors, which account a trigger runs as) (checked 2026-12-02)
  2. Google Apps Script, Event objects (Form submit: e.response) (checked 2026-12-02)
  3. Google Apps Script reference, Class Body (replaceText uses RE2 regular expressions) (checked 2026-12-02)
  4. Google Apps Script reference, Class File (makeCopy) (checked 2026-12-02)
  5. Google Apps Script reference, UrlFetchApp (fetch parameters, 360-second default timeout) (checked 2026-12-02)
  6. Google Apps Script, Properties service (adding script properties in Project Settings) (checked 2026-12-02)
  7. Google Apps Script, Quotas for Google services (checked 2026-12-02)
  8. Claude API overview (request headers, Developer API keys, anthropic-version 2026-10-21) (checked 2026-12-02)
  9. Claude API docs, Structured outputs (output_config.format with a JSON schema) (checked 2026-12-02)
  10. Claude API docs, Models overview (current model IDs) (checked 2026-12-02)
proposalsgoogle docsapps scriptclaudeautomation30 min build
go deeper

Worked steps, FAQs and resources on this topic.

read the guide
the list

Get the next one.

Field notes from real deployments, written the way this one was. No schedule promised and nothing sold to you. Unsubscribe whenever.

ready to ship?

Let's build yours.

Reading is the easy part. We do the work. Tell us what's broken and we'll tell you straight up whether we can help.

let's talk