dataverse-flow-api
/dataverse-flow-api
Tworzy, podłącza połączenia, aktywuje i poprawia przepływy Power Automate przez Dataverse Web API, np. dla formularzy Microsoft Forms zapisujących wiersze.
- Autor
- hoaiphongle0505 ↗
- Repozytorium
- claude-power-platform-toolkit ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 27.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Tworzy, podłącza połączenia, aktywuje i poprawia przepływy Power Automate przez Dataverse Web API, np. dla formularzy Microsoft Forms zapisujących wiersze.
Oryginalny opis (EN)
Create, bind connections, activate, edit and debug Power Automate cloud flows through the Dataverse Web API from an authenticated browser session. Use for flows triggered by Microsoft Forms or HTTP that write Dataverse rows and notify by email and Teams.
Jak działa
- 1. Find the right environment first
- 2. Connection references
- 3. Create the flow
- 4. Activate, edit, deactivate
- 5. Forms trigger gotcha
- 6. HTTP-trigger flows (anonymous)
- 7. Debug a failed run
- Browser-tool notes
Podgląd SKILL.md
---
name: dataverse-flow-api
description: Create, bind connections, activate, edit and debug Power Automate cloud flows through the Dataverse Web API from an authenticated browser session. Use for flows triggered by Microsoft Forms or HTTP that write Dataverse rows and notify by email and Teams.
---
# Power Automate flows through the Dataverse Web API
Run the calls from a browser tab already signed in to the Dataverse org
(`https://<ORG>.crm<N>.dynamics.com/api/data/v9.2/...`) using `fetch` in the page. Same-origin calls use the session.
## 1. Find the right environment first
Flows live in the environment that owns the Dataverse org. Do not guess environment IDs. Read them
from the portal URL or the org. A flow created in the wrong environment cannot see your tables.
## 2. Connection references
A flow created through the API uses connection references.
- List: `GET /connectionreferences?$select=connectionreferencelogicalname,connectorid,connectionid`
- Create (unbound): `POST /connectionreferences` with `connectionreferencelogicalname`,
`connectionreferencedisplayname`, `connectorid = /providers/Microsoft.PowerApps/apis/shared_<connector>`.
- Bind: `PATCH /connectionreferences(<id>)` with `{ "connectionid": "<connection id>" }`.
The connection id is the last-but-one segment of the connection details URL in the Power Automate
portal: `.../connections/<connector>/<CONNECTION_ID>/details`.
- A flow cannot be turned on while any reference is unbound ("Connection Id missing for connection reference ...").
**Creating a Forms or Teams connection needs the user's OAuth consent.** Open
`Connections > New connection`, let the user finish the sign-in popup, and confirm the status is
`Connected` (not `Reconnect`) before binding.
## 3. Create the flow
`POST /workflows` with:
```json
{ "name": "<flow name>", "category": 5, "type": 1, "primaryentity": "none",
"statecode": 0, "clientdata": "<JSON string>" }
```
`clientdata` = `{ "properties": { "connectionReferences": {...}, "definition": {...} }, "schemaVersion": "1.0.0.0" }`.
Each entry in `connectionReferences`:
`{ "runtimeSource": "embedded", "connection": { "connectionReferenceLogicalName": "<logical name>" }, "api": { "name": "shared_<connector>" } }`.
Actions use `type: "OpenApiConnection"` with `host: { connectionName, operationId, apiId }`,
`parameters`, and `authentication: "@parameters('$authentication')"`. See `templates/forms-to-dataverse-flow.js`.
Useful operation IDs: `CreateFormWebhook` (trigger), `GetFormResponseById`, `CreateRecord` (Dataverse),
`SendEmailV2` (Outlook), `PostCardToConversation` (Teams, poster "Flow bot", location "Chat with Flow bot").
## 4. Activate, edit, deactivate
- Activate: `PATCH /workflows(<id>)` `{ "statecode": 1, "statuscode": 2 }`
- To change the definition: set `statecode 0 / statuscode 1`, PATCH `clientdata`, activate again.
- Verify with `GET /workflows(<id>)?$select=statecode,statuscode`.
- The portal "edit" URL for an API-created flow may redirect to the flow list. Open the details page
and use Edit there, or keep changing it through the API.
## 5. Forms trigger gotcha
A flow written by hand receives the trigger body as a batch:
`{ "value": [ { "eventType": "ResponseAdded", "resourceData": { "formId", "responseId" } } ] }`.
The path `triggerOutputs()?['body/resourceData/responseId']` is empty here. Use:
```
@first(triggerBody()?['value'])?['resourceData']?['responseId']
```
Form answers come back keyed by question id: `outputs('Get_response_details')?['body/r<32 hex>']`.
Multi-select answers arrive as a JSON-like string such as `["A","B"]`, so strip `[`, `]` and quotes.
## 6. HTTP-trigger flows (anonymous)
If the tenant allows it, `triggerAuthenticationType: "All"` makes an HTTP trigger callable without sign-in.
Return CORS headers from a Response action. The callback URL contains a signature, so treat it like a secret.
## 7. Debug a failed run
1. Portal: flow details, 28-day run history, open the failed run.
2. Click the red action and read **Inputs** and **Outputs**. A 400 with an empty parameter usually means a bad expression path.
3. Click the trigger to see the real trigger body and fix the path to match it.
4. Fix through the API, reactivate, and test with a real submission.
## Browser-tool notes
- Very large inline JavaScript can be rejected by the browser extension. Build the JSON inside the page from
compact code instead of pasting a huge literal.
- A tab can vanish mid-task. Open a new tab and retry.
- Output containing URLs with signatures or query strings may be blocked. Do not print callback URLs.
Wersje
W bazie nie ma innych skilli o nazwie dataverse-flow-api.
Migawka bazy z 13.11.2026 · wersja paczki c7f96bb2a7ce (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100power-automate
Obsługuje chmurowe przepływy Microsoft Power Automate z kodu przez Dataverse Web API i OAuth2 Entra ID: tworzenie, włączanie, aktualizacja, usuwanie oraz debugowanie historii uruchomień. - 100dynamics365-expert
Wspiera pracę z platformą Dynamics 365: aplikacje model-driven i canvas, przepływy Power Automate, Dataverse, wtyczki i niestandardowe workflow. - 100power-platform
Buduje, wdraża i weryfikuje rozwiązania Microsoft Power Platform jak oprogramowanie: aplikacje canvas jako .pa.yaml w git, Dataverse, przepływy Power Automate, pac pack oraz strony Power Pages. - 100power-automate-solution-flow-standards
Ustala standardy budowy przepływów Power Automate w rozwiązaniu Dataverse: nazwy, referencje połączeń, obsługę błędów i wdrożenia. - 96dataverse-python-api-reference
Dostarcza referencję API Dataverse dla Pythona, gdy trzeba sprawdzić dostępne metody i parametry. - 100add-dataverse
Dodaje tabele Dataverse do aplikacji kodowej Power Apps z wygenerowanymi modelami i serwisami TypeScript, także tworząc nowe tabele.