Find Closest Region

Overview

Finds the region whose center is closest to the given coordinates

Category: Scheduling

Use this action to find the region closest to a given location. Useful when creating jobs to decide which region they belong to. Pass latitude and longitude, and the action returns the closest matching region.

Request

Parameter Type Required Description Example
latitude number Yes Latitude of the location -33.8688
longitude number Yes Longitude of the location 151.2093

Response

This action’s output is available as $findClosestRegion in JSONata expressions. See Response format for the standard result.data / result.errors structure and error handling patterns.

Field Type Description
result.data.UID string The UID of the closest region
result.data.Name string The name of the closest region
result.data.Distance number Distance from the location to the region center in kilometers

Example output:

{
  "UID": "0014ccb7-73ad-40e1-9282-2c492a0f313a",
  "Name": "Sydney CBD",
  "Distance": 2.5
}