Keep an auditable vessel port and berth call log in Airtable

Every four hours, log each arrival, departure and docking for your fleet in Airtable so laytime and demurrage claims rest on hard timestamps.

Deterministic Code
MarineTrafficAirtableSlack BotOperationsData SyncNotifications & AlertsResearch & Monitoring
PromptCreate

On a cron trigger every four hours, keep a clean port call and berth call log for my tracked fleet in Airtable, so we hold an auditable movement record for laytime and demurrage claims instead of rebuilding one from emails after the fact. Build this as a code workflow. Every step is deterministic (fetch two endpoints, diff against stored rows on a composite key, insert, notify), and there is no judgement call anywhere in the chain.

Keep the vessel watchlist as a configurable input at the top of the workflow, with vessels identified by IMO number. For each vessel on the watchlist, call the MarineTraffic Single Vessel Port Calls operation over a rolling seven day lookback ending at the current UTC time.

Also call MarineTraffic Single Vessel Berth Calls for the same vessel over the same seven day window, to capture berth level dockings and undockings. Treat this half as optional. The port calls service and the berth calls service are separately purchased MarineTraffic products, each with its own 40 character API key, so someone holding only the port calls subscription should still get a working arrival and departure log. If no berth calls key is configured, skip the berth half cleanly and carry on rather than failing the run.

Before writing anything, read the existing log with Airtable List Records so you know what is already stored. Filter that read to a window slightly wider than the lookback, around eight days, so the comparison stays bounded as the table grows. Page through the results using the offset value until Airtable stops returning one, because if you only read the first page the deduplication will silently miss rows that fell on a later page.

Deduplicate on the combination of IMO, port, event type and UTC timestamp. That composite key is the single most important detail in this workflow. The lookback windows overlap heavily by design: MarineTraffic is not a poll provider and emits no webhooks for this data, so a rolling window plus composite key dedupe is what substitutes for a real poll trigger. Getting the key right is what makes it safe to re-read the same week on every single run.

Write only the events that are not already stored, using Airtable Create Records, one row per arrival or departure. Each row carries vessel name, IMO, port, berth or terminal, event type and the UTC timestamp. Create Records accepts at most 10 records per request, so batch the new rows in chunks of 10, and stay under Airtable's limit of 5 requests per second per base.

Keep every timestamp in UTC and label the column that way, for example 'Event Time (UTC)', since a demurrage argument turns on timezone. All MarineTraffic timestamps are already UTC, so store them exactly as returned and never convert to local time. If a speed column is added later, note that MarineTraffic returns SPEED in knots multiplied by 10, so it needs dividing by 10 before storing. Most of these legacy MarineTraffic endpoints return the whole result set in a single response with no paging, so no pagination handling is needed on that side.

For each newly recorded berthing and unberthing, post a short message to our operations Slack channel using the Slack Bot Send a Message operation, so the team sees dockings as they land. One message per new berth event, naming the vessel, the port, the berth or terminal, whether it docked or undocked, and the UTC time. Keep quiet when a run finds nothing new: if there are no new events, write nothing and post nothing.

What does this prompt do?

  • Checks your vessel watchlist every four hours and pulls the last seven days of port arrivals, departures, berthings and unberthings.
  • Adds only the movements that are not already in your Airtable log, one row each with vessel name, IMO number, port, berth or terminal, event type and the UTC time.
  • Never writes the same movement twice, even though every run deliberately re-checks a full week of history.
  • Posts a short Slack note when a vessel docks or leaves a berth, and stays completely silent when a run finds nothing new.

What do I need to use this?

  • A MarineTraffic subscription that includes the vessel port calls service, plus the key issued for it.
  • Optionally the separate berth calls subscription and its own key, if you want berth and terminal level detail and the docking alerts. The workflow still runs without it.
  • An Airtable base with a table to hold the movement log.
  • A Slack workspace and the channel your operations team actually watches.
  • The IMO numbers of the vessels you want on the watchlist.

How can I customize it?

  • Change how often it runs, or widen the seven day lookback if a vessel tends to report late.
  • Add or remove vessels on the watchlist by IMO number as your fleet changes.
  • Decide which movements deserve a Slack ping, or route them to a different channel.

FAQs

Will this create duplicate rows if it runs every four hours?
No. Every run deliberately re-reads a full week of history, then matches each event against what is already stored using the combination of IMO number, port, event type and exact UTC time. Anything already in the log is skipped, so the overlapping windows cannot double write a row.
Do I need both the port calls and the berth calls subscriptions?
No. Port calls alone gives you a complete arrival and departure log. Berth calls are a separately purchased product with their own key, and they add berth and terminal level detail plus the docking alerts. If you do not have that subscription, the workflow simply skips the berth half and keeps running.
What timezone are the timestamps in?
Everything is stored in UTC and the column is labelled that way on purpose. A demurrage argument can turn on timezone, so the log never quietly converts times to a local clock.
Why keep my own copy instead of just looking it up when a claim comes in?
MarineTraffic holds berth call history only from July 2017 and port calls from January 2015. Keeping your own durable copy means the evidence sits in a system you control, in a format your team can cite, without re-querying history every time a claim is raised.
Can I use this for laytime and demurrage claims?
It gives you a consistent, timestamped movement record to work from, which is usually the hard part. Most teams pair it with their statements of fact and notices of readiness rather than relying on any single source on its own.

Related templates

Build a credential rotation checklist when someone leaves

When someone leaves, we check which shared passwords they used in their final months and post a ranked rotation list to your security channel.

1Password
Rippling
Slack Bot
+1
Agentic Task
Weekly Amazon S3 bucket security audit posted to Slack

Every Monday, check every S3 bucket for public exposure, missing encryption and weak backup settings, then get the risks ranked in Slack.

Amazon S3
Slack Bot
Google Sheets
Agentic Task
Log Agorapulse social conversations to HubSpot contacts

Twice every weekday, the conversations from your social inbox land on the right HubSpot contact timelines, with a Slack recap for sales.

Agorapulse
HubSpot
Slack Bot
Agentic Task
Clean up HubSpot contacts from your Amazon SES suppression list

Every morning, find the addresses that hard bounced or filed a spam complaint, update the matching HubSpot contacts, and post a short Slack recap.

Amazon SES
HubSpot
Slack Bot
Agentic Task
Draft polite follow-ups for emails that never got a reply

Every weekday at 4pm, spot the threads that went quiet, stage a ready-to-send nudge in your mailbox, and get a ranked Slack recap.

Aurinko
Google Sheets
Slack Bot
Agentic Task
Replay failed SQS messages when a bug fix is merged

When you merge a fix in GitHub, this agent checks the matching dead-letter queue, replays the failed messages, and reports back on the pull request and in Slack.

Amazon SQS
GitHub
Slack Bot
Agentic Task

Stop rebuilding vessel movement history from old emails.

Let this run every four hours and keep a clean, timestamped port and berth call log your claims team can actually cite.