Build the ShipBob inventory history ShipBob does not keep

By General Input

Every morning at 6am, log every SKU's stock position to a spreadsheet so you can chart burn down and see what inventory looked like weeks ago.

Integrations

  • ShipBob
  • Google Sheets
  • Slack Bot

Type

Deterministic Code

Categories

  • Operations

Every morning at 6am, snapshot my ShipBob position into a Google Sheets spreadsheet so I build the inventory history that ShipBob itself does not retain. ShipBob's API returns current inventory levels only, so logging a dated snapshot every day is the only way to answer what stock looked like six weeks ago, or to chart burn down and reorder points. Use a daily cron trigger.

Start by calling ShipBob Get All Inventory Levels to read the current position for every item. These 2026-01 inventory endpoints are paginated: the response body carries first, next, prev, and last URLs and accepts a PageSize parameter. Follow the next link until there is no next rather than assuming a single response covers the whole catalog.

Append one dated row per SKU to an Inventory tab using Google Sheets Append Values, in this exact column order: Snapshot Date, Inventory ID, Item Name, On Hand, Fulfillable, Total Sellable, Exception Quantity. Keep that column order fixed on every run so the sheet stays chartable as it accumulates, and write the header row once if the tab is empty. Use the USER_ENTERED input option so dates land as real dates and quantities as real numbers instead of text, which is what makes charts and formulas work later. ShipBob defines total sellable quantity as fulfillable quantity minus total exception quantity, so log all three values as returned rather than recomputing them.

Then call ShipBob Get Orders filtered to the previous calendar day. Orders use page-based pagination with Page and Limit parameters, so walk the pages until a page comes back short or empty. Append a single summary row to a separate Daily Orders tab with Append Values, in this fixed column order: Date, Order Count, Units Shipped. Keep the order summary on its own tab so the per SKU history stays one clean chartable table.

Finish by posting a one line summary to Slack Bot with Send a Message so the team knows the log ran and sees yesterday's volume, for example: ShipBob snapshot logged. 412 SKUs recorded, 87 orders and 1,240 units shipped yesterday.

ShipBob allows 150 requests per minute. If a call returns a 429, honor the x-retry-after response header and retry instead of failing the run. If the inventory read fails outright, still post a Slack line saying the snapshot did not run, because a silent gap in a history log is otherwise invisible until someone needs that date.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerA brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensStop cold emails to anyone with a live deal in PipedriveLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasoniMessage campaign console with pre-flight checks and delivery board