Filter organizational units by department

Recipe ToolsMarketingData ParserUtilities

What it does

When the clock triggers every 5 minutes, this automation parses a JSON document to extract home organizational units. It loops through each unit, identifies those where the short name equals Department, and adds matching items to a list.

Who it's for

Operations teams who need to regularly filter and track organizational units by department code.

How teams use this

Track department-level organizational changes

Run this automation every 5 minutes to keep a current list of all organizational units tagged as Department. The Job report logs show which units matched so the team can audit the results.

Feed department data to another system

Send the filtered HomeOrganizationUnits list to a downstream app like a data warehouse or HRIS platform. Only the Department-level units are included, so the receiving system gets clean, scoped data.

Alert when new departments are added

Extend this automation to compare the current HomeOrganizationUnits list against a previous run and check for new items. If new Department units appear, send a notification to a Slack channel so the team knows the org structure changed.

How it works

  1. Run every 5 minutes. The automation starts on a 5-minute schedule to continuously process organizational unit data.
  2. Parse the JSON document. Json Parser extracts the home organizational units from the JSON so the data is ready to filter and evaluate.
  3. Loop through each unit. Iterate over every item in the home organizational units list to check the short name field against Department.
  4. Add matching units to the list. When the short name equals Department, add that unit to the HomeOrganizationUnits list and log the result to the Job report.