KB-currency refresh (medium priority, 2026-06-19) via /architect:kb-update. 74 medium-prioritets filer re-verifisert mot Microsoft Learn (MCP) — delegert til 15 parallelle Opus-subagenter (3 bølger) gruppert etter delt kilde, med disjunkte fil-sett. Verifisert i hovedkontekst (scope-sjekk + diff-review av de faktatunge gruppene + tester). Hovedendringer (faktuelle korreksjoner + currency): - Azure AI Search semantic ranker: TILGJENGELIG PÅ ALLE TIERS (også Free/Basic m/ gratis månedlig kvote) — gammel KB sa feilaktig "kun S1+". Korrigert i tier-tabell, anti-patterns og beslutningstabell (azure-ai-search-setup). - APIM score-threshold = DISTANSE (lavere = strengere): tuning-tabellen i rag-caching-optimization hadde retningen baklengs — invertert til korrekt. - Agentic retrieval GA/preview-nyanse presisert (hovedkontekst-korreksjon mot agentic-retrieval-how-to-migrate): GA via REST 2026-04-01 returnerer EKSTRAKTIV grounding (references + activity), IKKE syntetiserte svar. Answer synthesis, ikke-minimal reasoning effort (LLM query planning) og multi-turn messages forblir preview (2026-05-01-preview). Subagent hadde overforenklet til "hele kjernepipelinen GA"; rettet i agentic-rag-patterns + citation-tracking. - Copilot Studio modell-tabeller (platforms/copilot-studio): fjernet Claude Opus 4.5 + GPT-5.2 (borte fra kilde), lagt til Claude Sonnet 4.6/Opus 4.6 (GA), Opus 4.7 + Mistral Medium 3.5 (experimental); GPT-5 Reasoning/Auto = preview; A2A GA (apr 2026). - Computer Use (CUA): Copilot Studio GA 2026-05-07; 4 modeller m/ tier/status (OpenAI CUA + Sonnet 4.5 GA, Sonnet 4.6 + Opus 4.6 experimental); 5 credits/ steg standard, 15 premium; US-only region-krav FJERNET i GA-dok; Cloud PC pool + Hosted browser + bring-your-own-machine. - Azure AI Search REST API-versjoner bumpet: 2025-09-01 -> 2026-04-01 (stabil), 2025-11-01-preview -> 2026-05-01-preview (hybrid-search, rag-security-rbac, chunking). - Power Automate-integrasjon: trigger "Run a flow from Copilot" -> "When an agent calls the flow"; App Service innebygd MCP (preview) lagt til. - M365 Copilot-manifest v1.26 -> v1.28 (GA, mai) / v1.29 dokumentert (juni); "Tenant graph grounding" -> "Work IQ". - Speech fast transcription 2t/300MB -> 5t/500MB; multilingual 14 -> 15 locales (+ pt-BR). Content Understanding reasoning preview -> GA (v1.0, 2025-11-01). - Security Copilot E5 -> E5+E7. Død Databricks-URL ci-cd/best-practices -> ci-cd/flows. Prompt Flow retirement (2027-04-20 -> MAF) notert der den presenteres som go-forward. Gateway-topologi-tabell-feil rettet. - Alle 74 Last updated -> 2026-06-19. Discovery ikke kjørt (historisk kun Databricks-støy) -> 389-telling uendret, ingen resync. validate 239 PASS, kb-integrity 115/115 (262 orphan-warnings uendret), gitleaks clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01REiKFhP4w6xGXXqWKpPCJJ
573 lines
24 KiB
Markdown
573 lines
24 KiB
Markdown
# Power Automate and Copilot Studio Integration
|
||
|
||
**Last updated:** 2026-06-19 | Verified: MCP 2026-06-19
|
||
**Status:** GA
|
||
**Category:** Copilot Extensibility & Integration
|
||
|
||
---
|
||
|
||
## Introduksjon
|
||
|
||
Power Automate og Copilot Studio utgjør sammen en kraftig low-code/no-code integrasjonsplattform for Microsoft AI-stakken. Denne integrasjonen lar agenter i Copilot Studio kalle automatiserte arbeidsflyter (flows) for å utføre komplekse operasjoner, integrere med eksterne systemer, og orkestrere prosesser som går utover agentens innebygde kapabiliteter.
|
||
|
||
Integrasjonen opererer på to nivåer:
|
||
1. **Agent Flows** — native flows skapt i Copilot Studio, optimalisert for agentbruk og fakturert via Copilot Studio-kapasitet
|
||
2. **Power Automate Cloud Flows** — tradisjonelle flows som kan konverteres til agent flows eller kalles direkte fra Copilot Studio
|
||
|
||
Begge typer flows kan trigges fra agenter, enten gjennom eksplisitte topic-baserte handlinger eller via generativ orkestrering hvor agenten selv velger når en flow skal kjøres.
|
||
|
||
**Confidence marker:** Verified (MCP microsoft-learn 2026-06-19)
|
||
|
||
---
|
||
|
||
## Kjernekomponenter
|
||
|
||
### 1. Agent Flows
|
||
|
||
Agent flows er flows skapt og forvaltet direkte i Copilot Studio. De tilbyr en sømløs maker-opplevelse og forenkler agentutviklingen.
|
||
|
||
| Egenskap | Beskrivelse |
|
||
|----------|-------------|
|
||
| **Opprettelse** | Natural language (via Copilot) eller visuell designer |
|
||
| **Triggers** | Instant (manuell), schedule-basert, eller event-drevet |
|
||
| **Hovedtrigger** | "When an agent calls the flow" (med "Respond to the agent"-action) — gjør flow tilgjengelig som tool i agenter |
|
||
| **Actions** | AI-kapabiliteter (LLM, document processing, natural language reply), Human-in-the-loop, Built-in tools, Connectors (700+) |
|
||
| **Fakturering** | Copilot Studio capacity per action (ikke Power Automate). Test i embedded chat er GRATIS. |
|
||
| **Kapasitetsgrense** | Når prepaid Copilot Studio-kapasitet er oppbrukt, blokkeres nye flow-kjøringer (running flows fullfører normalt) |
|
||
| **Solution-support** | Ja — inkluderer drafts, versioning, export/import |
|
||
|
||
**Nøkkelfordeler:**
|
||
- **Konsistent eksekvering** — deterministisk, samme input gir samme output
|
||
- **Enkel workflow-opprettelse** — AI-drevne forslag for triggers og actions
|
||
- **End-to-end synlighet** — design, monitor og innsikt i én grensesnitt
|
||
|
||
**Capacity-beregning:**
|
||
- Flow fra topic: 1 **Classic answer** + agent flow actions
|
||
- Flow fra generativ orkestrering: 1 **Autonomous action** + agent flow actions
|
||
- Test i embedded chat (fra flow designer eller agentens test chat): **INGEN** capacity-forbruk
|
||
- Microsoft 365 Copilot-lisensierte brukere og test-kjøringer påvirkes ikke av kapasitetsgrenser
|
||
|
||
### 2. Power Automate Cloud Flows
|
||
|
||
Tradisjonelle cloud flows kan integreres med Copilot Studio på to måter:
|
||
|
||
| Metode | Beskrivelse | Fakturering |
|
||
|--------|-------------|-------------|
|
||
| **Direkte kall** | Bruk trigger "When an agent calls the flow" i eksisterende cloud flow | Power Automate license |
|
||
| **Konvertering til agent flow** | Konverter cloud flow til agent flow i Power Automate-portalen | Copilot Studio capacity |
|
||
|
||
**Konverteringskrav:**
|
||
1. Flow må være i en solution
|
||
2. Copilot Studio capacity må være tilgjengelig i environment
|
||
3. Konvertering er one-way (kan ikke reverseres pga. faktureringsendring)
|
||
|
||
**Konverteringsprosess:**
|
||
```
|
||
Power Automate portal → Velg flow → Edit →
|
||
Endre plan til "Copilot Studio" → Save → Bekreft
|
||
```
|
||
|
||
### 3. Triggers og Actions
|
||
|
||
**Triggers:**
|
||
|
||
| Type | Beskrivelse | Bruksområde |
|
||
|------|-------------|-------------|
|
||
| **Instant** | Manuell kjøring on-demand | Agent-initierte handlinger |
|
||
| **Schedule** | Tidsstyrt (daglig, ukentlig, månedlig) | Batch-prosessering, rapporter |
|
||
| **Event** | Respons på andre events (email, Dataverse-endringer) | Automatisk prosessering |
|
||
|
||
**Actions:**
|
||
|
||
| Kategori | Eksempler | Connector-support |
|
||
|----------|-----------|-------------------|
|
||
| **AI capabilities** | Generate text, run prompt, process documents, natural language reply | AI Builder, Azure AI |
|
||
| **Human-in-the-loop** | Approvals, manual input | Power Automate approvals |
|
||
| **Built-in tools** | Loops, branching, data operations, date/time, child flows | Native |
|
||
| **Connectors** | M365 services (SharePoint, Teams, Outlook), 3rd-party (Salesforce, ServiceNow), custom | 700+ |
|
||
|
||
---
|
||
|
||
## Arkitekturmønstre
|
||
|
||
### Mønster 1: Topic-basert Flow Calling
|
||
|
||
**Bruksområde:** Deterministisk flow-kall når bruker trigger spesifikk topic.
|
||
|
||
**Implementering:**
|
||
1. Opprett agent flow med "When an agent calls the flow" trigger (+ "Respond to the agent"-action)
|
||
2. Definer inputs (String, Number, Boolean, etc.)
|
||
3. I Copilot Studio topic: legg til "Call an action" node
|
||
4. Map topic-variabler til flow inputs
|
||
5. Bruk flow outputs i "Message" node
|
||
|
||
**Eksempel:**
|
||
```
|
||
Topic: "Get weather forecast"
|
||
Trigger phrases: "will it rain", "today's forecast", "get weather"
|
||
|
||
Flow:
|
||
1. Question node → Ask city (Var1)
|
||
2. Question node → Ask ZIP code (Var2)
|
||
3. Action node → Call "Get weather forecast" flow
|
||
- Input: City = Var1, ZIP = Var2
|
||
- Output: location, day_summary, chance_of_rain
|
||
4. Message node → "Today's forecast for {location}: {day_summary}. Chance of rain is {chance_of_rain}%"
|
||
```
|
||
|
||
**Fordeler:**
|
||
- Full kontroll over når flow kalles
|
||
- Deterministisk oppførsel
|
||
- Enkel feilhåndtering
|
||
|
||
**Ulemper:**
|
||
- Må opprette topic for hver flow
|
||
- Mindre fleksibel enn generativ orkestrering
|
||
|
||
### Mønster 2: Generativ Orkestrering med Tools
|
||
|
||
**Bruksområde:** La agenten selv velge når og hvordan flows skal brukes basert på konversasjonskontekst.
|
||
|
||
**Implementering:**
|
||
1. Opprett agent flow med "When an agent calls the flow" trigger (+ "Respond to the agent"-action)
|
||
2. Publish flow
|
||
3. I Copilot Studio: gå til Tools → Add a tool → Flow
|
||
4. Velg flow og konfigurer:
|
||
- **Name og Description** — beskrivelse som hjelper orchestrator å forstå når flow skal brukes
|
||
- **Inputs** — hvordan agenten skal fylle variable values
|
||
- **Completion** — hva agenten skal gjøre etter flow fullføres
|
||
|
||
**Eksempel:**
|
||
```
|
||
Flow: "Get weather forecast"
|
||
Description: "Get today's weather forecast at a provided city name or zip code."
|
||
|
||
Agent orchestrator ser bruker input: "What's the weather like in Seattle?"
|
||
→ Velger automatisk "Get weather forecast" tool
|
||
→ Fyller input: City = "Seattle", ZIP = null
|
||
→ Returnerer resultat til bruker
|
||
```
|
||
|
||
**Fordeler:**
|
||
- Naturlig samtaleflyt
|
||
- Agenten velger riktig flow basert på kontekst
|
||
- Mindre vedlikehold av topics
|
||
|
||
**Ulemper:**
|
||
- Mindre deterministisk
|
||
- Krever god flow description for orchestrator
|
||
|
||
### Mønster 3: Multi-Service Integration Pattern
|
||
|
||
**Bruksområde:** Orkestrere data fra flere M365-tjenester eller 3rd-party systemer.
|
||
|
||
**Implementering:**
|
||
1. Flow med multiple actions:
|
||
- Connector action 1 → Hent data fra system A (f.eks. SharePoint)
|
||
- Connector action 2 → Hent data fra system B (f.eks. Dynamics 365)
|
||
- Data operation → Kombiner/transformer data
|
||
- Connector action 3 → Skriv resultat til system C (f.eks. Teams)
|
||
2. Return verdier til agent for presentasjon
|
||
|
||
**Eksempel (A1 Travel case):**
|
||
```
|
||
Topic: "Create travel policy"
|
||
1. Agent samler inn inputs via spørsmål (company, travel notice days, reimbursements)
|
||
2. Call flow:
|
||
- Populate Word template (SharePoint connector)
|
||
- Generate unique filename (Compose action)
|
||
- Save document to SharePoint (SharePoint connector)
|
||
- Email document to client (Outlook connector)
|
||
- Return confirmation to agent
|
||
3. Agent bekrefter til bruker: "Travel policy created and sent to {email}"
|
||
```
|
||
|
||
**Fordeler:**
|
||
- Sentral integrasjonslogikk
|
||
- Gjenbrukbar på tvers av agenter
|
||
- Auditlogging i Power Automate
|
||
|
||
**Ulemper:**
|
||
- Kompleksitet øker med antall systemer
|
||
- Feilhåndtering må håndtere multiple failure points
|
||
|
||
### Mønster 4: Approval Workflows
|
||
|
||
**Bruksområde:** Human-in-the-loop godkjenningsprosesser.
|
||
|
||
**Implementering:**
|
||
1. Flow trigger: "When an agent calls the flow"
|
||
2. Action: "Start and wait for an approval"
|
||
- Approval type: Approve/Reject eller Custom responses
|
||
- Assignees: dynamisk eller statisk
|
||
3. Condition: hvis approved → utfør handling
|
||
4. Return approval result til agent
|
||
|
||
**Eksempel:**
|
||
```
|
||
Topic: "Request expense approval"
|
||
1. Agent samler inn expense details (amount, category, receipt)
|
||
2. Call approval flow:
|
||
- Start approval → Send til manager
|
||
- Wait for response
|
||
- If approved → Create expense record i Dynamics 365
|
||
- Return approval status
|
||
3. Agent informerer bruker: "Your expense request was {approved/rejected}"
|
||
```
|
||
|
||
**Fordeler:**
|
||
- Standardisert approval UI (Teams/Outlook/Power Automate app)
|
||
- Compliance tracking
|
||
- Integrert med M365 notification system
|
||
|
||
**Ulemper:**
|
||
- Synkron venting kan time out (bruk async pattern for lange approvals)
|
||
- Krever Power Automate approval license
|
||
|
||
### Mønster 5: Event-driven Automation
|
||
|
||
**Bruksområde:** Automatisk trigger agent-handlinger basert på eksterne events.
|
||
|
||
**Implementering:**
|
||
1. Cloud flow med event trigger (f.eks. "When a new email arrives")
|
||
2. Condition/filter for relevante events
|
||
3. Call Copilot Studio agent via connector eller HTTP
|
||
4. Agent prosesserer event og returnerer resultat
|
||
5. Flow tar videre handling basert på agent output
|
||
|
||
**Eksempel (Expense Agent):**
|
||
```
|
||
Trigger: "When a new email arrives" (Outlook)
|
||
Filter: Subject contains "Receipt" OR has attachment
|
||
1. Extract receipt attachment
|
||
2. Call Copilot Studio agent "Expense Entry Agent"
|
||
- Pass receipt content
|
||
- Agent extracts expense details via AI Builder
|
||
3. If extraction successful:
|
||
- Create expense line i Dynamics 365
|
||
- Send confirmation email
|
||
4. Else:
|
||
- Flag for manual review
|
||
```
|
||
|
||
**Fordeler:**
|
||
- Proaktiv automatisering
|
||
- Reduserer manuell datainnlegging
|
||
- Skalerer til høyt event-volum
|
||
|
||
**Ulemper:**
|
||
- Krever robust feilhåndtering
|
||
- Event-filter må være presis for å unngå false positives
|
||
|
||
---
|
||
|
||
## Beslutningsveiledning
|
||
|
||
### Når velge Agent Flows vs Cloud Flows?
|
||
|
||
| Kriterie | Agent Flows | Cloud Flows |
|
||
|----------|-------------|-------------|
|
||
| **Primært bruk** | Agent-interaksjoner, konversasjonsflyt | Bakgrunnsprosessering, event-drevet automatisering |
|
||
| **Opprettelse** | Copilot Studio designer eller natural language | Power Automate designer eller Copilot |
|
||
| **Fakturering** | Copilot Studio capacity | Power Automate license (med mindre konvertert) |
|
||
| **Orchestrering** | Optimalisert for agent orchestrator | Optimalisert for flow orchestrator |
|
||
| **Solution support** | Ja | Ja |
|
||
| **Best for** | Low-code makers, agent-sentrerte workflows | Pro-code developers, enterprise-wide automation |
|
||
|
||
### Når bruke Topic-basert vs Generativ Orkestrering?
|
||
|
||
| Kriterie | Topic-basert | Generativ Orkestrering |
|
||
|----------|--------------|------------------------|
|
||
| **Kontroll** | Høy — eksakt kontroll over når flow kalles | Middels — agent orchestrator velger |
|
||
| **Fleksibilitet** | Lav — må opprette topic per flow | Høy — én flow, mange bruksområder |
|
||
| **Kompleksitet** | Høy — mange topics å vedlikeholde | Lav — færre topics, mer intelligens i agent |
|
||
| **Bruksområde** | Kritiske prosesser (approvals, compliance) | Generell assistent-funksjonalitet (søk, rapporter) |
|
||
| **Feilhåndtering** | Eksplisitt i topic | Implisitt i orchestrator |
|
||
|
||
### Connector Valg
|
||
|
||
| Connector-type | Eksempler | Bruksområde |
|
||
|----------------|-----------|-------------|
|
||
| **Microsoft First-party** | SharePoint, Teams, Outlook, Dynamics 365 | M365-integrasjon, enterprise workflows |
|
||
| **Certified 3rd-party** | Salesforce, ServiceNow, Zendesk, GitHub | CRM, ITSM, customer support |
|
||
| **Premium** | Azure AI Services, SQL Server, SAP | AI-prosessering, database, ERP |
|
||
| **Custom** | HTTP, Azure Functions, custom connectors | Proprietære systemer, custom APIs |
|
||
|
||
**Lisensiering:**
|
||
- Standard connectors: inkludert i Power Automate license
|
||
- Premium connectors: krever Premium license (ca. $15/user/month)
|
||
- Custom connectors: krever Premium license
|
||
|
||
---
|
||
|
||
## Integrasjon med Microsoft-stakken
|
||
|
||
### Power Platform Ecosystem
|
||
|
||
```
|
||
┌─────────────────────────────────────────────────────────┐
|
||
│ Power Platform │
|
||
├─────────────────────────────────────────────────────────┤
|
||
│ │
|
||
│ ┌──────────────┐ ┌──────────────┐ ┌───────────┐ │
|
||
│ │ Copilot │───▶│ Power │───▶│ Dataverse │ │
|
||
│ │ Studio │ │ Automate │ │ │ │
|
||
│ │ (Agents) │◀───│ (Flows) │◀───│ (Data) │ │
|
||
│ └──────────────┘ └──────────────┘ └───────────┘ │
|
||
│ │ │ │ │
|
||
│ │ │ │ │
|
||
│ ▼ ▼ ▼ │
|
||
│ ┌──────────────────────────────────────────────────┐ │
|
||
│ │ AI Builder (AI Models) │ │
|
||
│ └──────────────────────────────────────────────────┘ │
|
||
│ │
|
||
└─────────────────────────────────────────────────────────┘
|
||
│ │ │
|
||
▼ ▼ ▼
|
||
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
|
||
│ M365 Copilot │ │ Power Apps │ │ Power BI │
|
||
└──────────────┘ └──────────────┘ └──────────────┘
|
||
```
|
||
|
||
**Integrasjonspunkter:**
|
||
|
||
1. **Copilot Studio → Power Automate**
|
||
- Call flows as tools (generativ orkestrering)
|
||
- Call flows from topics (topic-basert)
|
||
- Convert cloud flows to agent flows
|
||
|
||
2. **Power Automate → Copilot Studio**
|
||
- Trigger agent conversations via connector
|
||
- Pass data til agenter via HTTP
|
||
- Event-driven agent invocation
|
||
|
||
3. **Dataverse som felles datalager**
|
||
- Flows lagrer resultater i Dataverse
|
||
- Agenter leser fra Dataverse
|
||
- Solution-aware flows og agenter i samme solution
|
||
|
||
4. **AI Builder integrasjon**
|
||
- Flows kaller AI Builder models (document processing, text analysis)
|
||
- Agenter bruker AI Builder via flows
|
||
- Training data lagres i Dataverse
|
||
|
||
### M365 Copilot Actions
|
||
|
||
Power Automate flows kan også gjøres tilgjengelige som **Actions** i M365 Copilot:
|
||
|
||
| Action-type | Beskrivelse | Eksempel |
|
||
|-------------|-------------|----------|
|
||
| **Power Automate flow action** | Trigger flow fra M365 Copilot chat | "List my pending approvals" |
|
||
| **Connector action** | Bruk certified connector direkte | "Get my open Salesforce cases" |
|
||
| **Prompt action** | AI Builder prompt | "Summarize this document" |
|
||
| **Conversational action** | Copilot Studio agent som action | "Book a meeting room" (via agent) |
|
||
|
||
**Deploy-prosess:**
|
||
1. Opprett flow i Power Automate
|
||
2. Publish flow til solution
|
||
3. I M365 Admin Center: Integrated Apps → Deploy action
|
||
4. Brukere får tilgang via M365 Copilot app i Teams
|
||
|
||
---
|
||
|
||
## Offentlig sektor (Norge)
|
||
|
||
### Compliance og Datahåndtering
|
||
|
||
| Krav | Løsning | Notater |
|
||
|------|---------|---------|
|
||
| **Data residency** | EU Data Boundary | Power Automate flows kjører i samme region som environment |
|
||
| **GDPR** | Dataverse compliance | Alle flow-data lagres i Dataverse med GDPR-støtte |
|
||
| **Auditlogging** | Flow run history | 28 dagers run history (standard), lengre med retention policies |
|
||
| **Access control** | Dataverse security roles | Flows arver security context fra kaller |
|
||
|
||
### Godkjenninger og Attestasjon
|
||
|
||
Offentlig sektor krever ofte formelle godkjenningsprosesser. Power Automate approval-funksjonen støtter:
|
||
|
||
- **Multi-stage approvals** — flere godkjenningsnivåer (saksbehandler → avdelingsleder → direktør)
|
||
- **Parallel approvals** — alle må godkjenne samtidig
|
||
- **First-to-respond** — første godkjenner avgjør
|
||
- **Custom responses** — egendefinerte svaralternativer utover Approve/Reject
|
||
- **Audit trail** — komplett logg av hvem som godkjente når
|
||
|
||
**Eksempel bruksområder:**
|
||
- Reiseregning-godkjenning (som i Expense Agent)
|
||
- Innkjøpsrekvisisjoner
|
||
- Dokumentfremdrift i saksbehandlingssystemer
|
||
- HR-prosesser (ferie, permisjon)
|
||
|
||
### Integrasjon med Norske Systemer
|
||
|
||
| System | Integrasjonsmetode | Notater |
|
||
|--------|-------------------|---------|
|
||
| **Altinn** | Custom connector via HTTP | Krever API-nøkler, premium license |
|
||
| **ePhorte/Public 360** | Custom connector eller Azure Function relay | Avhenger av leverandør-API |
|
||
| **NAV-systemer** | Custom connector (hvis API tilgjengelig) | Krever samarbeidsavtale |
|
||
| **Felles datakatalog** | HTTP connector | Åpen API, ingen auth |
|
||
|
||
---
|
||
|
||
## Kostnad og lisensiering
|
||
|
||
### Power Automate Licensing
|
||
|
||
| License | Pris (USD/user/måned) | Inkludert |
|
||
|---------|----------------------|-----------|
|
||
| **Per user** | $15 | Unlimited flows, standard + premium connectors, 5000 AI Builder credits |
|
||
| **Per flow** | $100 (flat fee) | Unlimited users, dedicated flow, premium connectors |
|
||
| **Pay-as-you-go** | Variabel | Per flow run (ca. $0.60/run for premium) |
|
||
|
||
### Copilot Studio Capacity
|
||
|
||
| Capacity type | Consumption | Pris (USD) |
|
||
|---------------|-------------|-----------|
|
||
| **Agent flow actions** | Per action executed | Inkludert i Copilot Studio license |
|
||
| **Classic answer** | Per message (topic-basert) | 1 message per flow call fra topic |
|
||
| **Autonomous action** | Per generative action | 1 action per flow call fra orchestrator |
|
||
|
||
**Eksempel kostnadsberegning:**
|
||
|
||
Scenario: 100 brukere, 1000 flow runs/måned via Copilot Studio agent
|
||
|
||
| Komponent | Beregning | Kostnad (USD/måned) |
|
||
|-----------|-----------|---------------------|
|
||
| Copilot Studio license | 100 users × $200/user | $20,000 |
|
||
| Agent flow actions | 1000 runs × 5 actions/run = 5000 actions | Inkludert i CS license |
|
||
| Premium connectors (hvis brukt) | Krever Power Automate Premium | +$1,500 (100 users × $15) |
|
||
| **Total** | | **$21,500** |
|
||
|
||
**Kostnadstips:**
|
||
1. **Konverter cloud flows til agent flows** — faktureres via Copilot Studio capacity i stedet for Power Automate license
|
||
2. **Batch operations** — kombiner flere actions i én flow run
|
||
3. **Caching** — unngå redundante API-kall ved å lagre resultater i Dataverse
|
||
4. **Use Standard connectors** — unngå Premium license-krav hvor mulig
|
||
|
||
---
|
||
|
||
## For arkitekten (Cosmo)
|
||
|
||
### Når anbefale Power Automate + Copilot Studio?
|
||
|
||
**Bruk denne integrasjonen når:**
|
||
1. Agenten må integrere med M365-tjenester (SharePoint, Teams, Outlook)
|
||
2. Komplekse multi-step workflows som går utover agentens native kapabiliteter
|
||
3. Godkjenningsprosesser med human-in-the-loop
|
||
4. Event-driven automatisering (email-trigger, Dataverse-endringer)
|
||
5. Gjenbruk av eksisterende Power Automate flows
|
||
6. Low-code/no-code løsning er prioritert (ikke Semantic Kernel)
|
||
|
||
**Vurder alternativer når:**
|
||
1. Pro-code er foretrukket → **Semantic Kernel + Azure Functions**
|
||
2. Kompleks AI-orkestrering kreves → **Azure AI Foundry**
|
||
3. Real-time web API-kall holder → **Copilot Studio HTTP connector** (uten flow)
|
||
4. Kun Dataverse CRUD → **Copilot Studio Dataverse connector** (uten flow)
|
||
|
||
### Arkitekturspørsmål å stille
|
||
|
||
| Spørsmål | Hva det avdekker |
|
||
|----------|------------------|
|
||
| "Hvilke systemer skal agenten integrere med?" | Connector-behov, premium license-krav |
|
||
| "Trenger dere godkjenningsprosesser?" | Approval workflow pattern |
|
||
| "Skal dette trigges av events eller brukerinteraksjon?" | Event-driven vs topic-based pattern |
|
||
| "Har dere eksisterende Power Automate flows?" | Konvertering til agent flows |
|
||
| "Hva er toleransen for non-deterministisk oppførsel?" | Topic-based vs generativ orkestrering |
|
||
| "Hvor mange brukere vil kjøre flows daglig?" | Kostnadsberegning, license type |
|
||
|
||
### Design Patterns Matrix
|
||
|
||
| Bruksmønster | Agent Flow | Cloud Flow | Topic-basert | Generativ Ork. |
|
||
|--------------|-----------|------------|--------------|----------------|
|
||
| Enkel M365-integrasjon | ✅ | ✅ | ✅ | ✅ |
|
||
| Kompleks multi-service | ✅ | ✅ | ✅ | ⚠️ (kan være uforutsigbar) |
|
||
| Approval workflows | ✅ | ✅ | ✅ | ❌ (krever deterministisk flow) |
|
||
| Event-driven (email, etc.) | ❌ | ✅ | ❌ | ❌ |
|
||
| Batch processing | ❌ | ✅ | ❌ | ❌ |
|
||
| Real-time agent interaction | ✅ | ⚠️ (kan time out) | ✅ | ✅ |
|
||
|
||
**Symboler:**
|
||
- ✅ Anbefalt
|
||
- ⚠️ Fungerer, men med forbehold
|
||
- ❌ Ikke egnet
|
||
|
||
### Beste Praksis
|
||
|
||
1. **Flow design:**
|
||
- Hold flows små og fokuserte (single responsibility)
|
||
- Bruk child flows for gjenbrukbar logikk
|
||
- Implementer robust error handling (Try-Catch-Finally pattern)
|
||
- Bruk Compose actions for debugging (log intermediate values)
|
||
|
||
2. **Agent integration:**
|
||
- Skriv tydelige flow descriptions for orchestrator (generativ ork.)
|
||
- Map inputs/outputs eksplisitt i topics (topic-based)
|
||
- Test flows uavhengig før agent-integrasjon
|
||
- Bruk Flow Checker for validering
|
||
|
||
3. **Performance:**
|
||
- Unngå loops med ukjent antall iterasjoner (timeout risk)
|
||
- Batch API-kall hvor mulig (reduce connector calls)
|
||
- Bruk parallel branches for uavhengige actions
|
||
- Implementer caching for data som endres sjelden
|
||
|
||
4. **Security:**
|
||
- Bruk managed identities for Azure-ressurser
|
||
- Lagre secrets i Azure Key Vault (ikke hardkode i flows)
|
||
- Review connection references regelmessig
|
||
- Implementer least privilege for service accounts
|
||
|
||
5. **Governance:**
|
||
- Alltid opprett flows i solutions (ikke utenfor)
|
||
- Bruk environment strategies (dev/test/prod)
|
||
- Dokumenter flows med comments i designer
|
||
- Implementer naming conventions (f.eks. `[Environment] - [Flow Name] - [Version]`)
|
||
|
||
### Troubleshooting Checkliste
|
||
|
||
| Problem | Mulig årsak | Løsning |
|
||
|---------|-------------|---------|
|
||
| Flow trigger ikke | Trigger condition ikke oppfylt | Review inputs og trigger conditions |
|
||
| Flow timeout | Lang-kjørende actions | Bruk async pattern eller split flow |
|
||
| Agent finner ikke flow | Flow ikke published | Publish flow og refresh i Copilot Studio |
|
||
| Connection failure | Utløpt credentials | Re-authenticate connection i Power Automate |
|
||
| Capacity overage | For mange agent flow actions | Review flow design, batch operations |
|
||
|
||
---
|
||
|
||
## Kilder og verifisering
|
||
|
||
**Microsoft Learn dokumentasjon (Verified 2026-02, re-verified MCP 2026-06-19):**
|
||
|
||
1. **Agent flows and workflows overview** (Re-verified MCP 2026-06-19)
|
||
https://learn.microsoft.com/en-us/microsoft-copilot-studio/flows-overview
|
||
|
||
2. **Call an agent flow**
|
||
https://learn.microsoft.com/en-us/microsoft-copilot-studio/advanced-use-flow
|
||
|
||
3. **Use Agent Flows in Copilot Studio (Training)**
|
||
https://learn.microsoft.com/en-us/training/modules/use-agent-flows/
|
||
|
||
4. **Cloud flows**
|
||
https://learn.microsoft.com/en-us/power-platform/release-plan/2024wave2/power-automate/cloud-flows
|
||
|
||
5. **Create a cloud flow in Power Automate**
|
||
https://learn.microsoft.com/en-us/power-automate/get-started-logic-flow
|
||
|
||
6. **Use actions to extend Microsoft 365 Copilot**
|
||
https://learn.microsoft.com/en-us/microsoft-365-copilot/extensibility/overview-business-applications
|
||
|
||
**Real-world case studies:**
|
||
|
||
7. **A1 Inteligência em Viagens case study** (Travel policy automation)
|
||
https://learn.microsoft.com/en-us/power-platform/guidance/case-studies/boost-efficiency-experience-case-study
|
||
|
||
8. **Dynamics 365 Field Service sample data agent**
|
||
https://learn.microsoft.com/en-us/dynamics365/guidance/resources/field-service-deploy-copilot-studio-create-sample-data
|
||
|
||
**Code samples:**
|
||
- Natural language flow creation (Copilot)
|
||
- "When an agent calls the flow" trigger setup (+ "Respond to the agent"-action)
|
||
- Topic-based flow calling pattern
|
||
- Approval workflow with Power Automate
|
||
|
||
**Confidence level:** Verified — all information sourced from official Microsoft Learn documentation via microsoft-learn MCP server (2026-02, re-verified 2026-06-19).
|