β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
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.
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.
- Python (Pydantic, JSON handling)
- Azure Logic Apps & OneDrive API
- n8n Workflow Automation
- SendGrid Email API
- OAuth2, 2FA, and Secrets Management
Employee fills out the vacation request form, which triggers the HR automation process in the IssueCoin system.
The request is automatically stored in an Excel file on OneDrive. Each HR process (Attendance, Payroll, Onboarding) has its own structured folder.
π 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.
βοΈ 4. n8n Workflow β Automation Process
The n8n workflow connects OneDrive, SendGrid API, and triggers for approval or rejection notifications.
π 5. SendGrid β Secure Email Integration
SendGrid API enables safe and verified email communication within the HR automation process.
π§ 6. HR Manager β Approval Email
Once the employee submits the request, the HR manager automatically receives an email for approval or denial.
π€ 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.
π§ 8. Azure Logic Apps β Automation Flow Overview
Azure Logic Apps manages recurring processes, reads from Excel tables, and triggers email workflows for Onboarding/Offboarding.
πΌ 9. Email Configuration β On/Off Boarding Template
Configuration of dynamic email templates for OnBoarding/OffBoarding notifications with embedded HTML and variable placeholders.
π‘ 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).
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.






