Kroger Grocery Auto-Order from Google Doc

Saves ~25 min20 credits

Reads your Google Doc named grocery list, searches Kroger for each item to find the best-priced match, adds them to your Kroger cart, checks off completed items in the Google Doc, then sends you a notification that your order is ready.

firef1ie
by firef1ie
1 use1 remix
Step 1 of 8
Tool1

Fetch Grocery List Doc

Search for the Google Doc named 'grocery list' and retrieve its full content. Extract all line items as a list of grocery items to shop for. Handle bullet points, numbered lists, checkboxes, and plain text lines. Output a structured list of items with their names and quantities (default quantity to 1 if not specified). Ignore any items that are already checked off or marked as done.

Fetch Grocery List Doc
Prompt2

Parse Grocery Items

Goal: Parse the raw Google Doc content into a clean structured list of grocery items | Inputs: Raw Google Doc text content from the previous step | 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 list) | Constraints: Skip any items already marked with a checkmark, strikethrough, or checked checkbox. Preserve brand hints or qualifiers (e.g. organic, large, low-fat). Default quantity to 1 if not specified. | Success criteria: Every unchecked item from the doc 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 Docs Connector (Fetch Grocery List Doc).

Instructions:
Search for the Google Doc named 'grocery list' and retrieve its full content. Extract all line items as a list of grocery items to shop for. Handle bullet points, numbered lists, checkboxes, and plain text lines. Output a structured list of items with their names and quantities (default quantity to 1 if not specified). Ignore any items that are already checked off or marked as done.

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

Inputs:
Raw Google Doc text content from the previous step

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 list)

Constraints:
Skip any items already marked with a checkmark, strikethrough, or checked checkbox. Preserve brand hints or qualifiers (e.g. organic, large, low-fat). Default quantity to 1 if not specified.

Success criteria:
Every unchecked item from the doc 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 Docs Connector (Check Off Items in Google Doc).

Instructions:
Update the grocery list Google Doc. For each item that was successfully added to the Kroger cart, check it off (add a checkmark or strikethrough next to the item). For any items that were not found on Kroger, add a small note or flag next to them (e.g. 'not found'). Preserve all other content in the document.

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