Skip to content

An AI driven HR automation system integrating Microsoft Forms, OneDrive, n8n, Azure Logic Apps and SendGrid built with DevSecOps and Cloud Automation principles.

License

Notifications You must be signed in to change notification settings

Deniska1980-data/IssueCoin-HR-AI-System-for-Cloud-Automation-private-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Industry Automation Cloud with AI Agents – HR Department (MVP Prototype), private verzion

β€œThis project demonstrates how cloud-based HR workflows can be fully automated using AI agents, DevOps pipelines, and secure integrations across Azure, n8n, and OneDrive.”

Author: Denisa PitnerovΓ‘
Junior DevOps | Cloud & AI Automation Enthusiast | Self-taught Learner


πŸ’‘ Project Overview

This project was created as part of my personal journey in DevOps, Cloud and AI automation.
My goal is to build a functional HR system that uses AI agents, cloud integrations and automation workflows.
All processes are orchestrated under the main AI agent IssueCoin HR, who manages sub-agents and coordinates HR operations.


🧩 System Architecture and AI Agents

The project is divided into several functional agents:

  • 🧠 IssueCoin HR Agent – the main supervisor, responsible for coordination, reporting and email communication.
  • πŸ‘©β€πŸ’» Attendance Agent – processes employee leave requests using Microsoft Forms, OneDrive, n8n and SendGrid.
  • 🧳 OnOff_Boarding Agent – handles employee onboarding and offboarding workflows via Azure Logic Apps, OneDrive, Outlook and SendGrid API.
  • πŸ“ Other agents (Access, Payroll, Reports) will be added later as the HR ecosystem expands.

Each agent reports to its superior – the IssueCoin HR Agent, who supervises them and will eventually use Azure OpenAI as its β€œbrain” for autonomous reasoning and decision-making.

🧩 Tech Stack:

  • Python (Pydantic, JSON handling)
  • Azure Logic Apps & OneDrive API
  • n8n Workflow Automation
  • SendGrid Email API
  • OAuth2, 2FA, and Secrets Management

πŸ“Έ Screenshots and Workflow Overview

🧩 1. Microsoft Forms – Leave Request Form

Employee fills out the vacation request form, which triggers the HR automation process in the IssueCoin system.

Microsoft Forms – Leave Request Form

☁️ 2. OneDrive – Data Storage Structure

The request is automatically stored in an Excel file on OneDrive. Each HR process (Attendance, Payroll, Onboarding) has its own structured folder.

OneDrive – Data Storage Structure

πŸ“Š 3. Excel Table – Centralized Data

All form responses are logged in the table IssueCoin_Ε½Γ‘dost_o_volno_firma.xlsx, which serves as a single source of truth for automation workflows.

Excel Table – Centralized Data


βš™οΈ 4. n8n Workflow – Automation Process

The n8n workflow connects OneDrive, SendGrid API, and triggers for approval or rejection notifications.

n8n Workflow – Automation Process


πŸ” 5. SendGrid – Secure Email Integration

SendGrid API enables safe and verified email communication within the HR automation process.

SendGrid – Secure Email Integration


πŸ“§ 6. HR Manager – Approval Email

Once the employee submits the request, the HR manager automatically receives an email for approval or denial.

HR Manager – Approval Email


πŸ€– 7. IssueCoin AI Agent HR – Decision Notification

After the HR manager decides, the IssueCoin AI Agent sends a confirmation email to the employee with the final result.

IssueCoin AI Agent HR – Decision Notification


🧠 8. Azure Logic Apps – Automation Flow Overview

Azure Logic Apps manages recurring processes, reads from Excel tables, and triggers email workflows for Onboarding/Offboarding.

Azure Logic Apps – Automation Flow Overview


πŸ’Ό 9. Email Configuration – On/Off Boarding Template

Configuration of dynamic email templates for OnBoarding/OffBoarding notifications with embedded HTML and variable placeholders.

Email Configuration – On/Off Boarding Template

πŸ’‘ Each image illustrates a functional step in the fully automated HR workflow within the project Industry Automation Cloud with AI Agents – HR Department. The system follows the AI Pyramid Model, where the IssueCoin Agent acts as the main coordinator for all sub-agents (Attendance, OnBoarding, OffBoarding, Payroll).


🧠 AI Agent Pyramid Model (Pydantic Architecture)

The AI Agent Pyramid represents how the agents communicate and report within the system hierarchy.
All HR agents report to the main IssueCoin HR Agent, who aggregates, analyzes and generates reports.
This structure is modeled using Python and Pydantic, ensuring data consistency and validation across all sub-agents.

from pydantic import BaseModel, EmailStr
from typing import List

class AttendanceAgent(BaseModel):
    name: str = "Attendance Agent"
    tools: List[str] = ["Forms", "OneDrive", "n8n", "SendGrid"]
    def handle_leave_request(self, employee_email: EmailStr):
        return f"Processed leave request for {employee_email}"

class OnOffBoardingAgent(BaseModel):
    name: str = "OnOff_Boarding Agent"
    tools: List[str] = ["Azure Logic Apps", "OneDrive", "SendGrid", "Outlook"]
    def prepare_onboarding(self, employee_name: str):
        return f"Prepared onboarding documents for {employee_name}"

class IssueCoinHRAgent(BaseModel):
    name: str = "IssueCoin HR Agent"
    sub_agents: List[str] = ["AttendanceAgent", "OnOffBoardingAgent"]
    def generate_report(self):
        return f"{self.name} aggregated data from all sub-agents."

# Example interaction
hr_agent = IssueCoinHRAgent()
print(hr_agent.generate_report())

🧩 This model shows:

Clear hierarchy: Sub-agents report upwards to a supervisor.

Data validation: Pydantic ensures each agent's inputs and outputs are structured.

Scalability: New agents (Access, Payroll, etc.) can easily be added to the hierarchy.

Future AI expansion: Azure OpenAI will become the cognitive layer for reasoning and automation.

βš™οΈ Workflow Phases (Step by Step)
🟒 Phase 1 – Attendance and Leave Requests

The employee submits a leave request via Microsoft Forms.

Data is stored automatically on OneDrive (Excel / CSV).

n8n monitors file changes using triggers.

SendGrid API sends approval/denial emails to the HR manager.

Once β€œApprove” or β€œReject” is clicked, an automatic response is sent to the employee.

The communication flow runs between Yahoo (Employee) and Outlook (Company byDenisa).

🟣 Phase 2 – Pre-Onboarding Workflow

Built in Azure Logic Apps.

Automatically triggers emails 7 days before a new employee’s start date.

Sends a pre-boarding questionnaire via Outlook or SendGrid.

Each email dynamically includes name, team and start date from the OneDrive data source.

πŸ”΅ Phase 3 – Onboarding

Once the employee is confirmed, they are added to the Employee Register (Excel/OneDrive).

Access credentials are automatically prepared (OneDrive, Forms, Chatsky).

The OnOff_Boarding agent reports completion to the IssueCoin HR Agent.

πŸ”Έ Phase 4 – Agent Communication

All sub-agents (Attendance, OnOff_Boarding, Payroll…) report to the main IssueCoin HR Agent.

IssueCoin HR aggregates data, evaluates results and generates HR reports.

πŸ’» Code and Workflow Examples
1️⃣ n8n Webhook (JSON Payload)
{
  "employee_name": "Denisa PitnerovΓ‘",
  "employee_email": "[email protected]",
  "date_from": "2025-11-20",
  "date_to": "2025-11-25",
  "reason": "Vacation",
  "workflow": "LeaveRequestApproval"
}

2️⃣ Azure Logic App – HTTP Trigger
{
  "triggers": {
    "manual": {
      "type": "Request",
      "kind": "Http",
      "inputs": {
        "schema": {
          "type": "object",
          "properties": {
            "employee_name": { "type": "string" },
            "employee_email": { "type": "string" }
          }
        }
      }
    }
  }
}

3️⃣ AI Decision Logic (Python + Pydantic)
from pydantic import BaseModel, EmailStr
import random

class LeaveRequest(BaseModel):
    employee_name: str
    employee_email: EmailStr
    date_from: str
    date_to: str
    reason: str

def decide_leave(request: LeaveRequest):
    approved = random.choice([True, False])
    if approved:
        return f"βœ… Leave approved for {request.employee_name}."
    else:
        return f"❌ Leave denied for {request.employee_name}."

πŸ” DevSecOps & Security Implementation

All API keys, credentials and connections are stored securely:

n8n Credentials Manager

Azure Logic App Connections

OAuth2 and 2FA authentication

Separate app passwords for Outlook, Yahoo and SendGrid

Implemented principles:

πŸ”’ Separation of secrets

🧱 Least privilege principle

🧩 Multi-factor authentication

βœ… Connection validation before deployment

🧠 Technical Setup & Testing Challenges

Since I work in a personal, non-corporate environment without enterprise permissions or a team of colleagues,
I had to build and test everything fully on my own from analysis to debugging.

πŸ”₯ Main challenges I faced:

Azure and n8n could not connect directly due to permissions, so I had to design alternative workflows.

I didn’t have access to Power Automate or SharePoint, so I used OneDrive and custom webhooks instead.

Learned how to build triggers, debug JSON errors and integrate SendGrid API with SMTP.

Fixed real-world issues such as invalid payloads, missing triggers or failed API responses.

πŸ’¬ Every failure was a lesson. It taught me how systems behave under real conditions and how to think like an engineer.

πŸ“š Courses and Knowledge

πŸŽ“ Vanderbilt University – Prompt Engineering for Generative AI

βš™οΈ DevOps & DevSecOps (KodeKloud, IBM, Red Hat)

☁️ Azure & Cloud Fundamentals (Google, Microsoft)

πŸ€– AI Prompt Engineering & Automation (IBM, SkillUp, Coursera)

🐍 Python & Automation Fundamentals (Coursera)

These courses gave me theoretical foundations, but my real experience comes from hands-on projects like this one.
---
## 🌿 About the Author  

I’m **Denisa PitnerovΓ‘** a junior **DevOps & AI Automation Enthusiast**.  
I learn step by step, make mistakes, fix them and always aim to understand *why* something works not just that it does.

I use AI tools like **ChatGPT** and **Gemini** as my coding and debugging partners, but I’m the one who deploys, tests and ensures full functionality.

> 🧠 As Professor Barry from AI for Lawyers said:
β€œWe must never blindly trust AI. Always ask questions why it works, what happens if I change this and how can I make it better?”
This mindset helps me combine **AI, DevOps and Cloud** into a functional, secure and useful system.

---

## 🌱 Project Information  

**πŸ‘©β€πŸ’» Denisa PitnerovΓ‘** – Junior DevOps & AI Automation Enthusiast  

πŸ“§ **Email:** (denisa_pitnerova@yahoo.com)  
πŸ”— **LinkedIn:** (www.linkedin.com/in/denisa-pitnerova)  
πŸ™ **GitHub:** (www.github.com/Deniska1980-data)  
πŸ“Š **Kaggle:** (www.kaggle.com/denisapitnerov/code)  

---

## πŸ“„ License  
This project is licensed under the **MIT License** β€” free to use, modify, and distribute with proper attribution.

About

An AI driven HR automation system integrating Microsoft Forms, OneDrive, n8n, Azure Logic Apps and SendGrid built with DevSecOps and Cloud Automation principles.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages