Logic

Zone alert

Zone alert reports the items that entered, crossed, are inside or left a zone: a berth, a channel, a port entrance, or the Area of interest before it. It remembers where each item was at the last run, so a ship already inside is not reported again, and one that went straight through between two runs is caught by the line from its last position. Only the items that match go on, each with zone_event.

In the editor: Reports items (ships, for example) that entered, crossed, are inside or left a zone. It remembers where each one was at the last run, so a ship that went through the zone between two runs is caught too, and one already inside is not reported again. Only the items that match go on.

Settings

Zone

Pick one

Where the zone comes from: the Area of interest block before this one, or shapes you draw on this block’s own map.

Draw the zone: a berth, a channel, a port entrance, an area at sea.

  • The Area of interest
  • Draw on the map

Zone on the map

A setting

One or more shapes drawn on the map. An item inside any of them is inside the zone.

Report items that

Pick one

Which movements to report.

  • Entered or crossed it Items that are now inside but were not at the last run, and items whose straight line from the last position goes through the zone.
  • Entered it Only items now inside that were not at the last run.
  • Are inside it Every item inside now, new or not.
  • Left it Items that were inside at the last run and are outside now.

Remember each item for

Pick one

How long the block remembers where each item was.

One not seen for longer counts as new: if it is inside the zone, it has entered.

  • 6 hours
  • 24 hours
  • 7 days

What comes out

Each item that leaves the block carries these fields, to use in the blocks after it as {{field}}.

Each item reported

Only the items that match Report items that go on, with every field they came with plus these.

  • zone_event: What happened: entered, crossed, inside or left.
  • previous_lat: Where the item was at the last run, when it was seen then.
  • previous_lng: The same, longitude.
  • lat, lng: Where it is now, as it came in.
  • mmsi, name, ship_type: For ships, as Ships (AIS) heard them.

How to use it

Ports and shipping

Ships entering my zone

Every hour Ships (AIS) listens near the port; Zone alert keeps only the ships that entered or crossed the drawn entrance since the last run.

Ports and shipping

Berth arrivals and departures

A terminal operator wants one message when a ship comes alongside its berth and another when it leaves.

Before: The duty officer checked a tracking site every hour.

With the flow: A message arrives within the quarter hour, with the ship’s name, size and destination.

Logistics

Ships leaving the anchorage

A freight forwarder wants to know when the vessels carrying its containers leave the anchorage for the port.

Left it reports ships that were inside at the last run and are outside now.

Government and cities

New closures around a stadium

A city events team wants every new road closure inside a drawn area around the stadium in the days before a match.

Energy

Tankers near an offshore terminal

An energy company watches a safety zone around its offshore loading buoy.

Ports and shipping

Only cargo ships, on a map too

Filter after Zone alert keeps one kind of ship; zone_event and previous_lat, previous_lng show on the map and in the email.

Good to know

  • The memory is kept per flow and per block, and only real runs write it: test runs and the editor’s preview do not change it.
  • On the first run there is no memory yet, so every item inside counts as entered. In the editor’s preview, too.
  • Items are recognised by their own ID (a ship’s MMSI, an incident ID, a place ID); items without one by name and position, so a moving item with no ID cannot be followed from run to run.
  • Crossed uses the straight line between the last position and the current one. A ship that sailed around the zone and back can count as crossed; one heard only once is not.
  • An item not seen for longer than Remember each item for is treated as new: if it is inside and moving, it has entered. A ship standing still (moored, at anchor, under 1 knot) that the last run simply did not hear counts as inside, not entered: moored ships report only every 3 minutes.
  • Items without a position are skipped.
  • Zone alert is free. Ships (AIS) hears only ships that report during its listen, and some ports are barely covered: see its page.

Works well with

  • Ships (AIS): Ships at sea or in port right now, from AIS (the signal ships send with their position, speed and heading; live from AISStream): every vessel heard in the Area of interest before this block, or around a point.
  • Area of interest: Sets where the flow looks: countries, cities or specific places, or areas you draw on a map.
  • Traffic incidents: Road closures, roadworks and other incidents on online maps right now, with where they are.
  • Filter: Keeps only the items that match a rule.
  • Branch: Splits items in two.
  • Email: Sends one email per run with all the items, or one email per item.
  • Show on a map: Shows the results as points on a map, with the area of interest.
  • Only new: Lets through only the items this flow has not found before, so a daily flow sends only what is new.

Templates that use it

Stories with it

Help articles

Guides and terms

Industries that use it

Logistics & delivery · Government & cities · Hotels & tourism · Media & publishing · Non-profits & humanitarian · Security & emergency services · Ports & shipping · Fishing & aquaculture

Try it

Build a flow with Zone alert on the home page, no account needed, or book a call. Try it live