Harnessing the Power of Automation: Creating a Custom Connector for a LOB HR System in Power Automate

Pexels Thisisengineering 3861958

Introduction

In the digital age, automation is no longer a luxury but a necessity. Businesses are constantly looking for ways to streamline their operations and improve efficiency. One such tool that has been making waves in the world of business automation is Microsoft Power Automate. Power Automate allows you to create automated workflows between your favorite apps and services to synchronize files, get notifications, collect data, and more. One of its most powerful features is the ability to create custom connectors, which allow you to connect to your own APIs, including those of a Line of Business (LOB) Human Resource (HR) management system.

The Power of Custom Connectors

Custom connectors in Power Automate are like bridges that allow Power Automate to communicate with your LOB HR system. They define the API calls that can be made to your system, allowing Power Automate to retrieve data from it, send data to it, and trigger actions within it. This opens up a world of possibilities for automating HR tasks. For example, you could create a workflow that automatically updates an employee’s details in your HR system when they update their profile in another app, or a workflow that sends a notification whenever a new leave request is submitted.

Creating a Custom Connector: A Step-by-Step Guide

Creating a custom connector involves several steps, from signing in to Power Automate and starting the custom connector wizard, to defining the actions or triggers, specifying the authentication type, adding the request and response methods, testing the custom connector, and finally, publishing it. Each step requires careful attention to detail and a good understanding of your LOB HR system’s API.

  1. Sign in to Power Automate: Go to the Power Automate website and sign in with your credentials.
  2. Start the custom connector wizard: On the left pane, select Data > Custom connectors. Select New custom connector > Create from blank. Enter a name for the custom connector, and then select Continue.
  3. Update general details: On the General tab, fill in the Description field and update the Host field to the address for your LOB HR system API.
  4. Specify authentication type: On the Security tab, under Authentication type, select the type of authentication your LOB HR system API uses. This could be API KeyOAuth 2.0Basic Authentication, or No Authentication.
  5. Define the actions or triggers: In the Definition tab, define the actions or triggers for the custom connector. Provide a summary, description, and operation ID for each action or trigger.
  6. Add the request and response methods: In the Request and Response sections, specify the HTTP method, URL, headers, body, key, output, and validation for each request and response.
  7. Test the custom connector: After defining all the necessary details, test the custom connector to make sure it’s working as expected.
  8. Publish the custom connector: Once the testing is successful, publish the custom connector.

Sample Code for a Custom Connector and an HR API

To give you a better idea of what the code for a custom connector and an HR API might look like, here are some sample code snippets. The first is a JSON definition for a GetEmployeeDetails operation in a custom connector, and the second is a C# code snippet for a hypothetical GetEmployeeDetails method in an HR API controller.

{
  "actions": {
    "GetEmployeeDetails": {
      "description": "Get details of an employee",
      "operationId": "GetEmployeeDetails",
      "parameters": {
        "EmployeeId": {
          "description": "ID of the employee",
          "in": "path",
          "required": true,
          "type": "string"
        }
      },
      "request": {
        "method": "get",
        "path": "/employees/{EmployeeId}"
      },
      "responses": {
        "200": {
          "description": "OK",
          "schema": {
            "type": "object",
            "properties": {
              "EmployeeId": {
                "type": "string"
              },
              "EmployeeName": {
                "type": "string"
              },
              "EmployeeRole": {
                "type": "string"
              },
              "EmployeeManager": {
                "type": "string"
              },
              "EmployeeDepartment": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}

API Sample request GET

[HttpGet("{EmployeeId}")]
public IActionResult GetEmployeeDetails(string EmployeeId)
{
    var employee = _context.Employees.FirstOrDefault(e => e.EmployeeId == EmployeeId);
    if (employee == null)
    {
        return NotFound();
    }

    var result = new
    {
        EmployeeId = employee.EmployeeId,
        EmployeeName = employee.EmployeeName,
        EmployeeRole = employee.EmployeeRole,
        EmployeeManager = employee.EmployeeManager,
        EmployeeDepartment = employee.EmployeeDepartment
    };

    return Ok(result);
}

Benefits of Using Power Automate and Custom Connectors

The benefits of using Power Automate and custom connectors are manifold. They allow you to:

  • Automate repetitive tasks: By automating routine tasks, you can save time and reduce the risk of errors.
  • Improve efficiency: Automation allows you to get more done in less time, leading to increased productivity and efficiency.
  • Enhance data accuracy: Automated data entry and updates can help to improve the accuracy of your data and reduce the risk of errors.
  • Streamline processes: By automating workflows, you can streamline your business processes and make them more efficient.
  • Improve decision-making: With accurate, up-to-date data at your fingertips, you can make more informed decisions.
11749548

“TechNova Solutions”. TechNova Solutions is a mid-sized tech company with several departments such as Engineering, Sales, Marketing, HR, and more. They have employees working in different roles and at various levels of seniority.

TechNova Solutions has an existing Line of Business (LOB) Human Resource (HR) management system where they maintain all their employee data. However, they face challenges in manually updating the data and retrieving specific information when needed. This is where Power Automate and custom connectors come into play.

Use Case: Automating Employee Onboarding

When a new employee joins TechNova Solutions, there are several tasks that need to be completed as part of the onboarding process. These tasks include creating a new employee record in the HR system, setting up their email account, assigning them to a department, and more.

Previously, the HR team had to manually perform these tasks, which was time-consuming and prone to errors. But with Power Automate and a custom connector for their HR system, these tasks can now be automated.

Here’s how it works:

  1. Creating a New Employee Record: When a new employee is hired, the HR team enters their details into a form in Power Automate. This triggers a workflow that uses the custom connector to create a new employee record in the HR system.
  2. Setting Up Email Account: The same workflow also triggers an action to create a new email account for the employee in Microsoft 365.
  3. Assigning to a Department: Based on the role of the new employee, the workflow assigns them to a department in the HR system using the custom connector.
  4. Notification: Once all these tasks are completed, the workflow sends a notification to the HR team confirming the successful onboarding of the new employee.

Conclusion

In conclusion, creating a custom connector in Power Automate for a LOB HR system can be a powerful tool for automating HR workflows. While it requires a good understanding of your HR system’s API and careful attention to detail, the benefits in terms of improved efficiency, accuracy, and productivity make it well worth the effort. 

Joao Livio

João has over two decades of IT experience and holds several certifications, including Microsoft Certified Professional (MCP) and Microsoft Certified Technology Specialist (MCTS). He is also a Lean Specialist with expertise in Lean Management, Nintex, and other training programs from LinkedIn and Udemy, including exams related to Azure and the Power Platform. As a Consultant and Advisor for Modern Work, João assists clients in unlocking their digital potential and optimizing productivity and collaboration. His approach is agnostic to technology, focusing on practical solutions that align with business goals. He has consistently been recognized as a Microsoft Most Valuable Professional (MVP) for 10 consecutive years. His commitment to excellence extends beyond technical expertise; he also values consistency, mental health, creative thinking, teamwork, and fun at work. João believes that learning every day within a team context is the key to continuous improvement.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.