Alert your team when vessel ETAs slip more than six hours

By General Input

Every weekday morning we compare each ship's predicted arrival against the last run and post a Slack alert only when something has actually moved.

Integrations

  • MarineTraffic
  • Google Sheets
  • Slack

Type

Agentic Task

Categories

  • Operations

Every weekday at 07:00 on a cron trigger, watch my tracked fleet for ETA slippage and post an exception-only digest to Slack. MarineTraffic does not send outgoing webhooks and is not a polling source on this platform, so a scheduled run is the right and only trigger here.

Start by reading my watchlist tab in Google Sheets with Get Values. That tab is the control surface for this workflow and holds, per vessel: the vessel identifier (shipid, MMSI or IMO), the vessel name, an optional named discharge port, an optional laycan or contractual arrival window, and the ETA that was recorded the last time this ran. Also pull the current roster from MarineTraffic with Vessels in Fleet, and reconcile the two so that ships added to the fleet but not yet in the sheet are still checked and get a row created for them.

To get today's predicted arrivals, call Fleet Voyage Forecast. Note that this operation returns voyage information and a forecast for every vessel in the fleet in a single call, so call it once for the fleet rather than once per ship. That keeps the run well inside MarineTraffic's rate limit and avoids burning credits unnecessarily. For any vessel where I have named a specific discharge port in the sheet, additionally call Vessel ETA to Port for that vessel and port, and prefer that port-specific figure over the general forecast, because the forecast follows the destination the ship is currently broadcasting which is not always where I actually need it. If a vessel looks like it has drifted, you may optionally top up with Single Vessel Positions to report its present speed and position for context. Be aware that MarineTraffic returns SPEED in knots multiplied by ten, so divide by ten before showing it, and that all timestamps come back in UTC, so label the times in the message as UTC.

Now compare. For each vessel, work out the difference in hours between the ETA stored from the previous run and the ETA you just retrieved. A vessel counts as an exception when that difference is greater than six hours in either direction. Six hours is the default threshold and should be easy to change in one obvious place. Treat a later arrival as a delay and an earlier arrival as a pull-forward, and make clear which is which in the message, since arriving early can be just as disruptive to a berth booking as arriving late.

Write the fresh snapshot back to the same Google Sheets tab with Update Values on every single run, without exception. Do this even when nothing has drifted and no Slack message is going out, and even when the run is otherwise quiet. This spreadsheet is the only memory the workflow has between runs, so if a run ever finishes without writing the new ETAs, the next run has no baseline and the comparison silently breaks. Record the ETA and the timestamp of the run against each vessel. On the very first run there will be no stored ETAs at all: in that case just write the current snapshot, post nothing, and begin comparing from the following run rather than reporting every vessel as newly changed.

If at least one vessel has moved by more than the threshold, post exactly one message to Slack with Send a Message. List only the vessels that breached the threshold, one line each, showing the vessel name, the destination port, the previous ETA, the new ETA and the delta in hours. Sort the list worst delay first so the most damaging slippage is at the top and readable without scrolling. Do not include vessels that held steady, do not include a roster of everything you checked, and do not pad the message with a summary of how many ships were fine.

Call out separately, in its own clearly marked section above the main list, any vessel whose new ETA has now slipped past its laycan or contractual arrival window as recorded in the sheet. That is the one that costs money, so it should not be buried among ordinary delays. Say plainly which window has been missed and by how long.

On days when no vessel has moved by more than the threshold, stay completely silent. Do not post an all clear, a nothing to report note, or an empty digest. The value of this workflow is that a message arriving in the channel always means something needs attention, and a daily heartbeat would train the team to ignore it within a fortnight. Still complete the Google Sheets write on those silent days.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageWin back LiveChat visitors whose chats went unansweredLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardChat quality review board for LiveChat support leadsLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seats