Fill forms from Google Sheets (no code)

For anyone who keeps rows in Google Sheets (suppliers, employees, members) and wants a filled form for each row. You paste one script into the sheet once; after that, a menu in the sheet fills the rows you pick and puts each PDF's link next to its row.

You do not write code. You need a plan that includes automation hooks (see Plans and pricing) and edit access to the sheet.

A hook is a private URL that fills one form from whatever sends it values.

1. Open Account → Automation. 2. In Form ID, type the form's id. The id is the last part of the form's address: for BIR 2307 at /fill/bir-2307 it is bir-2307. 3. Give the hook a Name you will recognise, for example "Suppliers sheet → 2307". 4. Tap New hook. The hook URL is shown once. Copy it somewhere safe; anyone with it can fill that form on your plan.

1. Under the hook card, tap Column template for the form. It downloads a CSV with one column per field. 2. In Google Sheets, import it as row 1 (File → Import). Row 1 holds the field names. Row 2 holds the printed labels and starts with ; rows that start with are skipped, so you can keep it as a guide. 3. Type one row per form you want filled.

1. In the sheet: Extensions → Apps Script. 2. Open the Sheets script, copy all of it, paste it into the editor, and Save. 3. Project Settings → Script Properties, add: - PHILFORMSHOOKURL = your hook URL - PHILFORMSFOLDERID (optional) = the Drive folder for the PDFs (the id in the folder's address) 4. Reload the sheet. A new menu with the site's name appears.

- Fill selected rows: fills the rows you selected. - Fill every new row: fills every row that has no PDF yet. - Fill when a Google Form is submitted: run it once to fill each new response of a Google Form linked to the sheet.

Two columns appear at the end of the sheet: a status and a link to the PDF in Drive. A row that already has a file link is not filled again.

The script sends the row's values to the hook and saves the finished PDF to your Drive. Nothing about the form's layout is in the script. Google asks you to allow the script to use your sheet and Drive the first time it runs; it runs as you.

- "Set PHILFORMSHOOKURL …": the script property is missing or misspelled. - A row's status shows an error: read the message in the status column, fix the value in the sheet and fill the row again. - A hook stopped working: it may be paused or deleted under Account → Automation, where you can also make a new one.

Developers who prefer an API key over a hook can set PHILFORMSAPIKEY and PHILFORMSFORMID instead; see the developer docs.

Everything in Learn