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.
How to use the Custom prompt bulk tool
Prerequisites
Select Extensions > GPT for Sheets > Open.
Click Custom prompt from the Bulk tools tab.
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.
Select the column to Put results in.
Select if you want to run a specific number of rows or all rows. Then, click Run rows.
The results are generated in the selected column.
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 type | Description | Example |
---|---|---|
Multiple columns | Use 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 ranges | Use 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 sheets | Use 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}}. |