Send weekly meal plans with one-click grocery ordering

By General Input

Every Monday, each nutrition client gets a personalized five-dinner plan, shoppable recipe links, and one grocery list they can order in a single click.

Integrations

  • Instacart
  • Airtable
  • Gmail

Type

Agentic Task

Categories

  • Operations

Every Monday at 6am, build and send each of my active nutrition coaching clients a personalized week of dinners with one-click grocery ordering. Use a cron trigger.

Start with Airtable List Records against my clients table, filtered to clients whose status is active. For each client read their email address, postal code, household size, daily calorie target, macro targets (protein, carbs, fat), allergies, dislikes, weekly grocery budget, and the log of what was sent to them last week.

Then work through the clients one at a time. For each client, plan five dinners that fit their calorie and macro targets and scale the ingredient quantities to their household size. Treat allergies and dislikes as hard filters: an ingredient that touches an allergy or a listed dislike must never appear in a dinner or in the grocery list, and there is no substituting around it with a trace amount. Rotate proteins and cuisines against whatever was sent the previous week so nobody gets chicken stir fry two Mondays in a row. Deliberately overlap ingredients across the five dinners so the client buys fewer distinct items and wastes less food, and keep the total basket inside their weekly grocery budget.

For each of the five dinners, call Instacart Create Recipe Page to produce a shoppable recipe page with its ingredients and cooking instructions. Recipe ingredients use the measurements field. Then call Instacart Create Shopping List Page once per client to produce a single consolidated list covering all five dinners, with duplicate ingredients merged into one line item at the combined quantity. Shopping list line items use line_item_measurements, not measurements, so do not reuse the recipe payload shape here.

Stick to the supported measurement units: each, lb, oz, g, kg, ml, L, cup, tbsp, tsp, and gallon. Any other unit is rejected with a 4xx error, so convert to the nearest supported unit before sending. Where a client has a dietary tag that maps onto a supported health filter such as VEGAN, GLUTEN_FREE, KOSHER, or ORGANIC, set it on the generated pages. Set expires_in generously, around 365 days, so a client who opens the email late still gets working links. Both create calls return a products_link_url, which is the shareable page. Hold onto those URLs rather than regenerating them.

Call Instacart Get Nearby Retailers with the client's postal code so the email can name the specific stores that actually deliver to them. This only covers US five digit ZIP codes and Canadian postal codes, so check the format first. If a client's postal code is neither, skip the retailer lookup for that client and send the email without the store section rather than failing the run.

Email each client with Gmail Send a Message. The email should include the week's plan with each dinner named and its calorie and macro breakdown, the five individual recipe links, the single one-click shopping list link called out as the fastest way to order everything at once, and the list of stores that deliver to them. Write it in a warm coaching voice, not a system notification.

Finally, call Airtable Update Record on that client's row to log the date the plan was sent and the five dinners used, so next week's run can rotate against them. Handle clients independently: if one client fails, for example because of a bad postal code or a missing target, log the problem and carry on with the rest of the roster instead of aborting the whole run.

Related prompts

Explore more prompts
Win back LiveChat visitors whose chats went unansweredChase the paperwork every new client and vendor still owesFile Gmail attachments into storage with names you can findCandidate rediscovery desk for your archived Lever applicantsLaytime and demurrage claim workspace for chartering opsKajabi customer support console for member access fixesRun your application review round on Jotform submissionsCreator roster board for rebook, test, or pause callsRun your nutrition clients' weekly meal plans from one consoleReplace the dispatch whiteboard with a live production board