Automating Leave Notifications with Azure Functions, Employment Hero API, Power Automate & Teams

John Koziaris
Chief Executive Officer

At alltasksIT, we’re always looking for ways to streamline internal operations and enhance team communication. One recent innovation we implemented is an automation system that integrates with Employment Hero’s API to track employee leave and notify the right people—at the right time—automatically.

✅ The Goal

We wanted to build a system that would:

  • Automatically fetch upcoming employee leave data.
  • Notify relevant managers and team members in advance.
  • Keep the tech teams and operations teams in the loop via Microsoft Teams.
  • Run on a schedule with no manual input.

🔧 The Solution

Step 1: Azure Function to Connect with Employment Hero API

We developed an Azure Function in Python that securely connects to the Employment Hero API. This function does the heavy lifting:

  • Pulls a list of all employees currently on leave today.

  • Checks for employees who will be on leave over the next 7 days and the next 14 days.

  • Formats the data into a clean, readable summary.

The function runs serverlessly and scales automatically with our needs—low cost, low maintenance.

Step 2: Power Automate Integration

To trigger the Azure Function on a schedule, we used Power Automate (formerly Microsoft Flow). With this integration:

  • The function is triggered on specific days and times—e.g., Monday mornings or every weekday at 8 AM.

  • The returned data is passed into a Teams message using Power Automate’s Teams connector.

Step 3: Microsoft Teams Notifications

The final output lands directly where our teams are most active—Microsoft Teams. The Power Automate flow posts a message to a designated Teams channel, mentioning:

  • Who’s on leave today.

  • Who will be away in the next 7 and 14 days.

  • A mention/tag for managers and the teaching team to ensure visibility.

This simple addition has massively improved team planning and reduced surprises caused by unexpected absences.

💼 Real Business Value

With this setup:

  • Managers are proactively informed.

  • Staff can plan better around known absences.

  • It removes the burden of someone manually sending leave updates every week.

  • It ensures transparency and continuity across teaching and operations.

Example Images:

🏢 Powered by alltasksIT

At alltasksIT, we specialize in building smart, scalable solutions that integrate with your existing systems. Whether it’s connecting HR platforms, building dashboards, or automating Microsoft 365 workflows, we’re here to help you work smarter—not harder.

Want to set up something similar for your team? Contact us today.

Author

John Koziaris

Chief Executive Officer (CEO)

Founder and Principal of alltasksIT with 30+ years IT experience, John has a broad and varied experience across cloud computing strategies.

John has been successfully realising IT and networking solutions for small to medium businesses for over 25 years.