Kroger Grocery Order From Google Sheet

Saves ~25 min20 credits

Reads your grocery list from a Google Sheet, searches Kroger for each item to find the best-priced match, adds them to your Kroger cart, then sends you a notification that your order is ready for checkout.

firef1ie
by firef1ie
Remixed from Kroger Grocery Order From List Photo (original by firef1ie)
Step 1 of 8
Tool1

Fetch Grocery List from Google Sheet

Read the user's grocery list Google Sheet. Look for a sheet or spreadsheet named 'grocery list' (or as specified by the user). Read all rows containing grocery items. Expect columns for item name and optionally quantity, unit, and notes/brand preferences. Return the full contents of the sheet so items can be parsed in the next step.

Fetch Grocery List from Google Sheet
Prompt2

Parse Grocery Items

Goal: Parse the raw Google Sheet data into a clean structured list of grocery items | Inputs: Row data from the Google Sheet containing grocery items, potentially with columns for item name, quantity, unit, and notes. | Outputs: A JSON array of grocery item objects, each with: name (string), quantity (number), unit (string or null), notes (any brand/preference hints from the sheet) | Constraints: Skip any rows that are empty or appear to be headers. Preserve brand hints or qualifiers (e.g. organic, large, low-fat). Default quantity to 1 if the quantity column is empty or missing. If the sheet has a status/checkbox column, skip items already marked as done or purchased. | Success criteria: Every valid grocery item row from the sheet is represented in the output array with at minimum a name and quantity

For Each3

For Each Grocery Item

For each grocery_item, Iterate over each grocery item parsed from the list. For each item, search Kroger, select the best match, and add it to the cart. Track whether each item was successfully added or not found.

Workflow preview

What the agent will follow (tools, prompts, and workflow steps).

1. Call tool: Google Sheets (Fetch Grocery List from Google Sheet).

Instructions:
Read the user's grocery list Google Sheet. Look for a sheet or spreadsheet named 'grocery list' (or as specified by the user). Read all rows containing grocery items. Expect columns for item name and optionally quantity, unit, and notes/brand preferences. Return the full contents of the sheet so items can be parsed in the next step.

2. Apply the following prompt: Goal:
Parse the raw Google Sheet data into a clean structured list of grocery items

Inputs:
Row data from the Google Sheet containing grocery items, potentially with columns for item name, quantity, unit, and notes.

Outputs:
A JSON array of grocery item objects, each with: name (string), quantity (number), unit (string or null), notes (any brand/preference hints from the sheet)

Constraints:
Skip any rows that are empty or appear to be headers. Preserve brand hints or qualifiers (e.g. organic, large, low-fat). Default quantity to 1 if the quantity column is empty or missing. If the sheet has a status/checkbox column, skip items already marked as done or purchased.

Success criteria:
Every valid grocery item row from the sheet is represented in the output array with at minimum a name and quantity

3. For each grocery_item, complete the steps in this section once. Iterate over each grocery item parsed from the list. For each item, search Kroger, select the best match, and add it to the cart. Track whether each item was successfully added or not found.

4. Call tool: Grocery Shopping - Kroger (Search Kroger for Item).

Instructions:
Search Kroger for the current grocery_item. Use the item name plus any brand/qualifier hints as the search query. Retrieve at least 5 product results. Include pricing and availability data for each result. The goal is to find in-stock options so we can compare prices.

5. Apply the following prompt: Goal:
Select the best product from Kroger search results for the current grocery item

Inputs:
The current grocery_item (name, quantity, unit, notes) and the list of Kroger search results with prices and availability

Outputs:
A single selected product object with its Kroger product ID, name, price, and quantity to add. Also output a boolean 'found' field (true if a good match exists, false if nothing suitable was found). If not found, output a 'not_found_reason' string.

Constraints:
Prioritize: 1) Correct item type - must actually be the right product, 2) In-stock availability, 3) Lowest price among suitable matches. Respect brand preferences if specified in the item notes. Do not select a wrong item just because it is cheap.

Success criteria:
The selected product is genuinely the right item, is in stock, and is the best available price for that item

6. Call tool: Grocery Shopping - Kroger (Add Item to Kroger Cart).

Instructions:
If the previous step found a suitable product (found=true), add it to the user's Kroger cart using the selected product ID and the quantity from the grocery list. If found=false, skip this step and log the item as not found. Track all cart additions and all skipped items for the final summary.

7. Call tool: Google Sheets (Update Sheet with Results).

Instructions:
Update the grocery list Google Sheet to reflect the results. For each item that was successfully added to the Kroger cart, mark it as purchased (e.g. add a checkmark or 'Added' status in a status column, and include the price). For any items not found on Kroger, mark them with 'Not Found' so the user knows to add them manually. Preserve all existing data in the sheet.

8. Call tool: AgentPMT Send Human Request (Send Completion Notification).

Instructions:
Send the user a notification that their Kroger grocery order is ready in their cart. Include in the message: the total number of items added to cart, the estimated total cost, and a list of any items that could not be found on Kroger so the user can add them manually. The message should be friendly and actionable.

Agent Reviews