Skip to main content

Custom prompt

Use the Custom prompt bulk tool in Google Sheets to run a custom prompt for each row in your sheet.

For example, if you have a sheet with product information, you can use this tool to automatically generate a unique description for each row, using the attributes (like product manufacturer, model, price, or weight) from the other columns in that row.

Bulk custom example

How to use the Custom prompt bulk tool

Prerequisites
  1. Select Extensions > GPT for Sheets > Open.

  2. Click Custom prompt from the Bulk tools tab.

    Select custom prompt
  3. Enter a prompt template in Prompt to apply to each row, inserting variables for your columns. Column variables are surrounded by double braces and can use either the column letter, like {{A}}, or the column header, like {{Bike specifications}}.

    When you run the tool, GPT for Sheets will replace the variables with the actual values from the sheet and prompt the AI with a custom prompt for each row.

    Bulk custom preview
  1. Select the column to Put results in.

    Bulk custom write
  2. Select if you want to run a specific number of rows or all rows. Then, click Run rows.

    Bulk custom run

The results are generated in the selected column.

Bulk custom results

Adding multiple variables

You must at least insert one variable for a column in your prompt template, for example {{A}} or {{Product name}}. To make your prompts even more specific, you can add more variables:

Variable typeDescriptionExample
Multiple columnsUse multiple columns to include various types of information in your prompt. Column variables are highlighted in blue.
Write a product description for {{Product name}} which costs {{Price}} and is made by {{Manufacturer}}.
Fixed rangesUse cells or cell ranges to include specific guidelines in each custom prompt. Fixed range variables are highlighted in green.
Create a tagline for {{B}}. Follow capitalization rules: {{A1}}. Use these terms: {{A2:A100}}.
Fixed ranges from other sheetsUse cells or cell ranges from other sheets within the same workbook to include more context.
Translate {{A}} to Japanese. Use the glossary: {{Glossary!A1:B100}}.