Build AI workflows across departments

An employee uses a laptop beside an onboarding kit, with colleagues and connected team symbols in the background.

Build with AI · Sources reviewed 2026-11-19

A growing business often has the necessary software and still loses work between systems. HR knows a start date, a manager knows the employee’s role, IT knows the equipment standard, and facilities knows whether a desk is available. The challenge is connecting those responsibilities without creating another inbox nobody owns.

AI can help interpret free-text requests and prepare useful task descriptions. The larger improvement comes from explicit state, dependable integrations, and a clear owner for each exception. This is where an individual productivity experiment becomes a shared service.

On this page

Worked build: prepare and coordinate an onboarding plan

The fictional example is a company with several departments and a small internal IT team. An HR-approved new-hire record starts the workflow. The system retrieves the approved role profile, prepares proposed tasks, obtains the necessary decisions, and tracks completion across IT and facilities.

The model does not decide whether to hire the person or which privileges the role deserves. Those decisions already exist in authoritative records. Its job is to turn manager notes into a readable plan and identify requests that do not match the approved profile.

Prerequisites: an HR source with a stable employee or case ID; a role catalog; an identity directory; a service-management or task system; a durable case register; and an integration owner. Use test identities and fictional personnel data while building. Confirm each connector’s available fields, authorization model, and licensing.

Define the contract between teams

Team Authoritative information Decision it owns
HR Approved case, start date, employment status Whether the onboarding case remains valid
Manager Role and documented business needs Whether requested exceptions are justified
IT Approved device and access catalog Implementation method and technical completion
Facilities Location and physical resources Desk and building-access arrangements
Workflow owner Case state and integration health Recovery and escalation when the process stalls

Keep sensitive HR details outside the model input when they are unnecessary for this job. The task description may need a role and location; it rarely needs the employee’s compensation or medical information.

Use a concrete input and output

{
  "case_id": "ONB-DEMO-027",
  "case_version": 3,
  "hr_status": "approved",
  "role_profile": "SALES-ASSOCIATE-v2",
  "start_date": "2027-01-11",
  "location": "Greensboro",
  "manager_note": "Standard laptop and CRM access. They may help with finance reporting later."
}

The retrieved fictional profile SALES-ASSOCIATE-v2 contains three approved entries:

Profile entry Permitted task Scope and owner
SALES-ASSOCIATE-v2/device-01 standard_laptop IT provides the standard laptop.
SALES-ASSOCIATE-v2/access-01 sales_crm IT provisions the Sales CRM group only.
SALES-ASSOCIATE-v2/facilities-01 facilities_setup Facilities reserves a desk and prepares a workspace at the HR-approved location: Greensboro for this case. This entry does not grant additional building-access permissions.

The expected plan preserves case ONB-DEMO-027, version 3, and cites device-01 for its laptop task, access-01 for its CRM-access task, and facilities-01 for its facilities task, each under profile SALES-ASSOCIATE-v2. The facilities task comes from the approved role profile even though the manager note does not repeat it.

The profile contains no finance-reporting entry. The expected output therefore includes an unresolved finance-access question, with no finance task or permission. It must not transform “may help later” into an approved finance permission.

Each task also needs an owner, due date rule, dependency, and external task ID after creation. Store the full profile-entry identifier with the result so its source remains unambiguous.

Build the process in seven stages

  1. Accept an authoritative event. Confirm that the case is approved in the HR system. A forwarded email or model summary alone cannot activate the workflow.
  2. Create or update the case. Use the stable case ID as the uniqueness key. Store the latest version and compare it with earlier events so an old retry cannot overwrite newer instructions.
  3. Retrieve the role profile. Read the approved catalog entry and its version. If it is missing, assign the case to the manager and IT owner for clarification.
  4. Prepare the plan. Give the model only the relevant case fields and profile. Require a proposed task list with evidence for every requested permission and separate questions for unsupported requests.
  5. Validate and decide. Reject unknown task types, unapproved group names, malformed dates, and missing owners. Route exceptions to the people responsible for those decisions.
  6. Create tasks through ordinary integrations. Submit validated tasks with an idempotency key such as case ID plus task type plus case version. Store the destination’s returned record IDs.
  7. Reconcile completion. Check the authoritative task systems. Update the case from actual completion evidence, and escalate overdue or failed tasks to the named owner.

This sample configuration describes the application design; it is not an import file for a particular platform:

case_key: case_id
event_order: reject_older_case_versions
allowed_tasks: [standard_laptop, sales_crm, facilities_setup]
model_output: proposed_tasks_and_questions
unknown_access_request: manager_and_it_review
task_key: case_id + task_type + case_version
completion_evidence: destination_record_id_and_status
cancel_event: recheck_case_then_stop_pending_actions

A useful model instruction is: “Use the role profile as the only source of permitted access. For each proposed task, cite its profile entry. Put every unmatched request in questions; do not select a similar permission.” The application must independently enforce the catalog and destination permissions.

A practical Microsoft route

In a Microsoft environment, evaluate a protected list or Dataverse table as the case register, Power Automate for events and task coordination, and an approved model capability for plan preparation. Use separate development and production environments and managed connections appropriate to your tenant.

Power Automate provides approval actions, including an action that waits for a response. Approvals have environment and Dataverse prerequisites; the approval connector itself is standard, while other connectors and AI steps can change the licensing requirement. Check the complete flow. Microsoft’s approval guidance and licensing guidance describe those distinctions.

Persist the business case independently of a single waiting workflow run. That makes a stalled approval recoverable and lets an operator see the current status without reading execution logs.

A developer route

A code-based implementation can use an event queue, a case database, explicit transition rules, a model adapter, and narrowly scoped adapters for task systems. Write each transition and its evidence to the case history. Separate task creation from task completion, and support replay without recreating finished work.

A workflow framework can help preserve state. LangGraph, for example, distinguishes checkpoints for a thread from stores for information used across threads. Neither choice supplies the business rules or access checks automatically. LangGraph’s persistence documentation explains the mechanisms.

Test the events that interrupt a normal week

Test duplicate HR events, a changed start date, a withdrawn onboarding case, an unavailable task system, a missing manager, and a role profile changed while approval is pending. Also test a task creation that succeeds remotely but times out locally. Recovery should check the destination before creating another task.

A cancellation may require compensating actions. Stop pending work, identify completed actions, and send the appropriate owner a concrete reversal task. Do not assume that changing the case status removes an account or recovers shipped equipment.

Track completion before the start date, exception age, duplicate tasks, failed integrations, and reviewer effort. The initial cases are a proposed acceptance suite, not a claim of a deployed company system.

Operate it as a shared service

Assign a business owner and a technical maintainer. Keep an on-call or business-hours support route proportionate to the process. Maintain a manual checklist for outages and a dashboard of cases awaiting action.

Budget for workflow licensing, model calls, connector limits, task-system seats, monitoring, and maintenance time. Costs can increase when a simple departmental flow becomes an organization-wide process with different licensing terms.

At smaller scale, the same design can be a shared checklist with manual decisions. At enterprise scale, add regional rules, formal release management, stronger separation of duties, and service-level reporting. Continue with enterprise knowledge systems or workflow design.

Share this page