Log ShipStation shipments onto HubSpot contacts every few hours

By General Input

Every few hours, attach a short shipment summary and the latest tracking number to the matching HubSpot contact so sales and CS see fulfillment status without leaving the CRM.

Integrations

  • ShipStation
  • HubSpot

Type

Agentic Task

Categories

  • Sales
  • Operations

Build an agent workflow that runs on a cron schedule every few hours (default: every 2 hours) and keeps HubSpot contacts up to date with their latest ShipStation shipping activity, so sales and CS reps see fulfillment context inside the CRM.

On each run, the agent should:

1. Call ShipStation List Shipments for a recent window (roughly the last few hours, slightly wider than the schedule interval so nothing falls through the cracks). Page through results if there are more than fit in one response.

2. For each shipment that has a recipient email on ship_to.email, call HubSpot Search Contacts to find a contact whose email matches that recipient email exactly.

3. If no matching contact is found, skip that shipment. Do NOT create a new HubSpot contact. Recipients on a shipment are often gift recipients or different people from the buyer, and we don't want to pollute the CRM.

4. If a matching contact is found, call HubSpot Create Note associated to that contact. The note body should be a short, human-readable shipment summary including: carrier, service level, tracking number, ship date, and current shipment status. Keep it to 3 to 5 short lines, suitable for a rep glancing at the contact timeline.

5. Also call HubSpot Update Contact on that same contact to write the most recent tracking number and ship date into two existing custom contact properties (assume they are already created in HubSpot; common names are last_tracking_number and last_shipment_date, but the agent should be configurable on the exact property internal names). Only overwrite if this shipment's ship date is newer than the current value, so older runs don't clobber newer data.

Important behavior:

- Use ShipStation V2 (api.shipstation.com/v2), not V1.

- Before creating a note, check whether a note with the same tracking number already exists on the contact and skip if so, to avoid duplicates when runs overlap.

- Respect rate limits on both sides. ShipStation has a 200/min default; HubSpot Search is 4/sec. The agent should pace its work, not fire all calls in parallel.

- At the end of each run, log a one-line summary: shipments processed, contacts updated, shipments skipped because no contact match, and any errors. This makes it easy to confirm the workflow is doing its job.

Inputs to expose for the user to configure: schedule cadence (default every 2 hours), lookback window in hours (default 3), the internal names of the two custom HubSpot contact properties to write the tracking number and ship date into, and an optional toggle for what to do with unmatched recipients (skip silently vs. log to the run summary).

Related prompts

Explore more prompts
Turn Mailjet email clicks into ranked HubSpot follow-upsiMessage campaign console with pre-flight checks and delivery boardA searchable RFP answer library your bid team drafts fromSee which target accounts just started advertising on LinkedInAccount health board that puts product usage next to your CRMLook up a customer's full chat history mid conversationLusha prospecting workbench with credit-safe revealsWhich companies your LinkedIn ads reach, matched to your CRMLead response desk with a running clock on every new leadApprove Lusha enrichment field by field before HubSpot saves it