Headcount Helper

Automating the Hiring Process using Adaptive Cards in Teams with a Customized Approval Workflow

Cole Russell
January 16, 2023

Solution Description

The goal of this automation was to transform how Hiring Manager’s input data for a job openning and then how the Hiring Team uses that data to create Requisitions which will be posted online to acquire talent.

This is a lengthy process between Finance, Business Managers, Hiring Managers, and other Personnel Managers which takes place at all levels of the company.

By automating this process we have reduced toil for the Managers involved, reduced the cycle time from position opening to live posting, and ultimately increased hiring across the board.

E2E Diagram

Headcount_Helper_Figma

Headcount Helper v1 Automation

For Version 1 of this solution, I have automated how the Business Manager is notified of a new PCN (Position Control Number), how they validate the data in the system, and then how that PCN is approved, all via Adaptive Cards delivered via Teams Channels with a customized approval process.

v1 Automation Steps

  1. The Power Automate Flow runs every night against the “DaVinci” PCN Database
  2. When a new PCN is found an Adaptive Card is created and sent to the L1 Business Manager Hiring Channel
  3. The Business Manager can either Approve As-Is or Reject the PCN
  4. If the PCN is rejected within the Adaptive Card, the current card is updated to represent that decision while another Adaptive Card is Generated for the L2 Business Manager in a separate channel with the recommended changes
  5. Once the L2 Business Manager performs those changes they then click submit and those changes are similarly captured by the Adaptive Card

Initial Adaptive Card

Headcount_Helper_Initial_Adative_Card

Level 2 Business Manager Reply Adaptive Card

Headcount_Helper_Final_Adative_Card

Initial Adaptive Card JSON Code

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "Container",
            "style": "emphasis",
            "items": [
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "text": "Headcount Helper",
                                    "fontType": "Default",
                                    "weight": "Default",
                                    "size": "Medium",
                                    "horizontalAlignment": "Left",
                                    "height": "stretch",
                                    "wrap": true,
                                    "color": "Default"
                                }
                            ],
                            "width": "70px",
                            "padding": "None",
                            "verticalContentAlignment": "Center",
                            "horizontalAlignment": "Center",
                            "spacing": "None"
                        },
                        {
                            "type": "Column",
                            "width": "stretch",
                            "verticalContentAlignment": "Center",
                            "padding": "None",
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "text": "NEW PCN",
                                    "wrap": true,
                                    "size": "Large",
                                    "weight": "Bolder",
                                    "horizontalAlignment": "Center",
                                    "color": "Warning",
                                    "fontType": "Default"
                                }
                            ]
                        },
                        {
                            "type": "Column",
                            "width": "70px",
                            "items": [
                                {
                                    "type": "Image",
                                    "id": "4b3986aa-ca62-8df9-f4c9-5d9bc8585978",
                                    "url": "https://cdn-icons-png.flaticon.com/512/3137/3137864.png",
                                    "horizontalAlignment": "Right",
                                    "altText": "Headcount Helper",
                                    "width": "32px",
                                    "height": "32px",
                                    "spacing": "None"
                                }
                            ],
                            "verticalContentAlignment": "Center"
                        }
                    ],
                    "padding": "None"
                }
            ],
            "padding": "Default",
            "bleed": true
        },
        {
            "type": "Container",
            "items": [
                {
                    "type": "FactSet",
                    "facts": [
                        {
                            "title": "PCN",
                            "value": "@{items('Apply_to_each')['fact_position[PCN]']}"
                        },
                        {
                            "title": "L4",
                            "value": "@{items('Apply_to_each')['fact_position[Reports to L4]']}"
                        },
                        {
                            "title": "L5",
                            "value": "@{items('Apply_to_each')['fact_position[Reports to L5]']}"
                        }
                    ],
                    "spacing": "Medium",
                    "separator": true
                }
            ],
            "bleed": true,
            "verticalContentAlignment": "Center",
            "horizontalAlignment": "Center"
        },
        {
            "$data": "${pcns}",
            "type": "Container",
            "items": [
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "width": "stretch",
                            "spacing": "None",
                            "items": [
                                {
                                    "type": "ActionSet",
                                    "actions": [
                                        {
                                            "type": "Action.OpenUrl",
                                            "title": "Employee Central",
                                            "iconUrl": "https://cdn-icons-png.flaticon.com/512/1077/1077012.png",
                                            "url": "@{items('Apply_to_each')?['dim_pcn_status[Employee Central Link]']}",
                                            "tooltip": "Click to view Employee Central!"
                                        }
                                    ],
                                    "horizontalAlignment": "Center"
                                }
                            ]
                        },
                        {
                            "type": "Column",
                            "width": "stretch",
                            "items": [
                                {
                                    "type": "ActionSet",
                                    "actions": [
                                        {
                                            "type": "Action.OpenUrl",
                                            "title": "DaVinci",
                                            "url": "@{items('Apply_to_each')?['dim_pcn_status[PCN Notes Link]']}",
                                            "iconUrl": "https://cdn-icons-png.flaticon.com/512/1077/1077012.png",
                                            "tooltip": "Click to view PCN Notes!"
                                        }
                                    ],
                                    "horizontalAlignment": "Center",
                                    "spacing": "None"
                                }
                            ],
                            "bleed": true,
                            "spacing": "None",
                            "horizontalAlignment": "Center"
                        }
                    ]
                }
            ],
            "spacing": "Small",
            "horizontalAlignment": "Center",
            "bleed": true
        },
        {
            "type": "Container",
            "items": [
                {
                    "type": "ActionSet",
                    "actions": [
                        {
                            "type": "Action.Submit",
                            "title": "Approve",
                            "data": {
                                "id": "acApprove",
                                "action": "Approved"
                            },
                            "style": "positive"
                        },
                        {
                            "type": "Action.ShowCard",
                            "title": "Reject",
                            "card": {
                                "type": "AdaptiveCard",
                                "body": [
                                    {
                                        "type": "Input.Text",
                                        "id": "acReject",
                                        "placeholder": "Please specify an appropriate reason for rejection.",
                                        "isMultiline": true
                                    }
                                ],
                                "actions": [
                                    {
                                        "type": "Action.Submit",
                                        "title": "Send",
                                        "data": {
                                            "id": "acComments",
                                            "action": "Rejected"
                                        }
                                    }
                                ],
                                "$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
                            },
                            "style": "destructive"
                        }
                    ],
                    "horizontalAlignment": "Center",
                    "spacing": "Medium"
                }
            ],
            "style": "emphasis",
            "verticalContentAlignment": "Center",
            "horizontalAlignment": "Center",
            "bleed": true
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.4"
}