1
---
2
name: flowstudio-power-apps-canvas-ship
3
description: >-
4
Push and publish Power Apps canvas app changes through FlowStudio MCP, and
5
get out of trouble: refused pushes, apps that call flows, damaged drafts and
6
Power Apps Studio saving over your work. Load this skill when asked to: push
7
or publish canvas app changes, recover from a push refused because the app
8
moved, fix a push that fails on a deleted flow, spot a damaged draft or
9
restore a good version, or work alongside an open Power Apps Studio session.
10
Requires a FlowStudio MCP subscription; see https://mcp.flowstudio.app
11
---
12
13
# Shipping Power Apps Canvas App Changes with FlowStudio MCP
14
15
The last mile: getting a checked change live, and getting out of trouble when
16
a push is refused or a draft is damaged.
17
18
**Prerequisite**: The `flowstudio-power-apps-canvas-mcp` skill (sessions, draft versus
19
live) and `flowstudio-power-apps-canvas-edit` (how the edits were staged).
20
Subscribe at https://mcp.flowstudio.app
21
22
---
23
24
## Source of Truth
25
26
> **Always call `tool_search` with `"skill:canvas-app"` first** to confirm tool
27
> names and parameter schemas. They change between server versions.
28
> This skill covers behavior the schemas cannot tell you. Tool behavior was
29
> checked on the production server on 2026-11-20; lines marked "on a real app"
30
> come from customer apps built between August and November 2026. If what a
31
> response shows actually happened disagrees with this file, the response
32
> wins. The server's general guidance text does not override the warnings
33
> here.
34
35
---
36
37
## Every Step, Every Time
38
39
A change is not shipped until every step passes.
40
41
1. **Preview.** `diff_canvas_app` from `base` to `session` shows what the push
42
will import, control by control. Read the per-control changes, not the
43
summary counts ("Versions and Diffs" in `flowstudio-power-apps-canvas-read`).
44
`check_canvas_formula` with no formula should show only findings you have
45
judged. Also diff `published` to `session`: the base can already hold
46
someone else's unpublished work, and step 3 releases that too. If it shows
47
changes that are not yours, ask the person before publishing.
48
- After a `renameScreen`, that screen's `Src/<Screen>.pa.yaml` will hold
49
only the screen name. Push the rename on its own, then stop before
50
publishing and ask the person to open the app in Studio and check that
51
screen ("Renaming screens" in `flowstudio-power-apps-canvas-edit`).
52
- If Microsoft's canvas authoring MCP server is also connected, its
53
`compile_canvas` parses `Src/*.pa.yaml` without Studio and reports the
54
YAML errors that stop Studio opening an app. Use it with care: authoring
55
and validation sessions can hold the app's edit lease, and one saved a
56
near-empty app as the head on a real app
57
([refusal-recovery.md](references/refusal-recovery.md)). Afterwards check
58
`list_canvas_app_versions` for an unexpected `Autosaved` version, and ask
59
the person to close the tool when you are done.
60
2. **Push.** `update_canvas_app` with `push: true` and a short
61
`commitMessage` (FlowStudio appends ` #flowstudio-mcp`). You can send the
62
last edits and `push: true` in the same call, but then step 1 never saw
63
them; do that only for edits you have already dry-run. Check:
64
- `pushed: true` and `landedAs: "draft"`;
65
- no `notMatched`. Anything listed there is **not** in the draft, even
66
though the push went ahead: fix it and push again before publishing;
67
- no `laterVersionWarning`. If it is there, a version saved after your
68
push differs from it: do not publish. Diff `landedAsVersion` to
69
`laterVersion` and treat it as a base-moved case;
70
- `landedAsVersion`: note it;
71
- `files` (`replaced`, `added`, `deleted`) matches the size of your change.
72
3. **Publish**, only when the person asked for it or approves it.
73
`publish_canvas_app` takes no version: it publishes the app's
74
newest version, whoever saved it. First check that the newest row of
75
`list_canvas_app_versions` is your `landedAsVersion`. Then publish and
76
check `published: true`. Publishing is asynchronous; the old version can
77
serve for a few seconds, and people with the app open must reload it.
78
Publish makes the draft live in place: the version keeps its id and commit
79
message (also seen on a real app), and it cannot add a note.
80
4. **Read back.** `list_canvas_app_versions` should show your version with
81
`isLive: true` (if `isPublishing` is still `true`, wait a few seconds and
82
list again). Then `describe_canvas_control` with
83
`definition: "published"` on every control you changed, and compare.
84
5. **Report** the live version id, what changed, and what the person should
85
open to see it. No canvas tool returns a play link: ask them to open the
86
app from make.powerapps.com, Apps, Play. (The link usually has the form
87
`https://apps.powerapps.com/play/e/<environment id>/a/<app id>`; not
88
checked here.)
89
90
If the person asked only to push or save a draft, stop after step 2 and
91
report `landedAsVersion` as a draft that users do not see yet. Otherwise
92
never report done from the push alone: a push creates a draft that nobody runs.
93
94
---
95
96
## Push Outcomes
97
98
| Outcome | What you see | Do |
99
|---|---|---|
100
| Pushed | `pushed: true` | check `notMatched` and `laterVersionWarning` (step 2), then publish only if the person asked for it or approves |
101
| Refused | `pushed: false` and a `refused` object | read `reason` and `howToProceed` |
102
| Still importing | `importing`, or `session.import.state: "running"` | resume with `push: true` and no new edits; if it stays running, follow "Long Calls and Timeouts" in `flowstudio-power-apps-canvas-mcp` |
103
| Long call | `taskId` with `status: "working"` | poll `get_task` every `pollIntervalMs` |
104
| Error | the call fails | read the message; staged edits are kept |
105
106
Pushes took 13-28 seconds for small apps and 31-47 seconds for an app that
107
calls a flow. On a real app, one with 14 SharePoint sources and no flow took
108
44 seconds. Time grows with flows and data sources. Most of it is Power
109
Platform exporting and importing the app; the reply's `stages` shows where the
110
time went.
111
112
A push with nothing staged builds nothing, unless it carries a
113
`commitMessage`. According to the server code, that re-imports the head as a
114
new version carrying the note (a way to add a note, since publish cannot), and
115
sending the same note again answers "Already saved". This was not tested.
116
117
Two more things that can stop a push:
118
119
- **An old session.** Before you stage anything, follow the session rule in
120
"The Session" in `flowstudio-power-apps-canvas-mcp`: staged edits you did not make need
121
a diff and the person's say-so before you discard them.
122
- **Your own safety checks.** On a real app, an edit that changed who can do
123
what (the list of admin emails in `App.OnStart`) was stopped by the agent's
124
own permission check as a permission grant. Expect it to need the person's
125
approval, and tell them before you stage it.
126
127
---
128
129
## Guards
130
131
- `expectedAppVersion` makes any `update_canvas_app` call (staging, dry run or
132
push) fail unless your session is based on the version you name. It checks
133
the session's base, not the live app; a version saved after your session
134
started is caught by the base-moved refusal instead. Pass
135
`session.basedOnVersion` (`20261120T002715Z`) or the same version's
136
`appVersion` from `list_canvas_app_versions` (`2026-11-20T00:27:15Z`); both
137
forms are accepted. Do not take it from `list_canvas_apps`: its
138
`appVersion` is the published version, which differs from your base
139
whenever there is a draft. A mismatch comes back as an **error**, not a
140
refusal: `App changed since you read it (expected ..., base is ...)`.
141
- `editLease` in the reply (`held`, `takenOver`) says whether FlowStudio held
142
Studio's edit lease during the import. `takeOverLease: true` takes it from
143
an open Studio tab, which turns that tab read-only until reloaded. With no
144
Studio tab open it changes nothing (`takenOver: false`). Taking over from a
145
live tab was not tested. Reloading a read-only tab loses anything unsaved in
146
it, so set `takeOverLease` only when the person has said their tab has no
147
unsaved work and agreed to it going read-only. Without it the push still
148
runs, and `editLease` reports who holds the lease.
149
150
---
151
152
## When the App Moved: Base-Moved Refusals
153
154
When someone else saves a version after your session started
155
(`session.baseMovedBy` above 0), the push is refused with
156
`reason: "base-moved"`. Nothing is written and your staged edits are kept.
157
(If the newer versions change nothing in the app, the push goes on top
158
instead and the reply says `savedOverNoChange`.) The refusal lists
159
`sessionBasedOn`, `liveHead`, the `newerVersions` with their commit messages,
160
`yourStagedFiles`, and `stagedFilesVsHead`, which names any file both sides
161
changed. `liveHead` is the head (the newest saved version), not the published
162
one; pass the refusal's value, not the `isLive` id.
163
164
First, `diff_canvas_app` with `from: "base"` and `to` set to the refusal's
165
`liveHead` value, to see what they changed. If most of the app's controls are
166
gone, stop: that is the danger case below. If it shows your own earlier pushed
167
changes undone, a Studio tab saved an old copy over them (see "Power Apps
168
Studio"); include those edits again when you replay.
169
170
If the newer versions are Studio saves (no ` #flowstudio-mcp` in the commit
171
message, or `Autosaved`), that tab is still open. Ask the person to save
172
anything they want to keep in it, then close it, or reload it after you
173
publish. Once you push, the tab holds an older copy and its next save,
174
automatic or not, reverts your push.
175
176
The refusal's `howToProceed` describes the overwrite route. These skills
177
still prefer replay unless `stagedFilesVsHead` names no file. Two ways
178
forward:
179
180
1. **Replay (preferred).** `discard_canvas_app_session`, `get_canvas_app` to
181
open a session on the head, and send your `edits` again. Edits are
182
property-level, so changes to different properties both survive. If the
183
other writer changed a property you also set, the replay replaces their
184
value: diff `base` to the head's version id first and ask the person about
185
any property you both changed. Keep your edit list so a replay is one call.
186
2. **Overwrite.** `update_canvas_app` with `push: true` and
187
`overwrite: "<liveHead>"`. Your staged files are applied on top of the
188
head, so files you did not touch keep the newer content. **A file both
189
sides changed takes your copy whole.** On 2026-11-20 another writer changed
190
a label on a screen the push had also edited, and the overwrite push
191
dropped their change without a further warning. Only overwrite when
192
`stagedFilesVsHead` names no file, or the diff shows nothing in those files
193
you need to keep.
194
195
**Danger case: a near-empty head.** If the head is `Autosaved` and the diff
196
shows most of the app's controls removed, someone saved a broken app. Do not
197
overwrite, replay, push or publish: any session opened on this head builds on
198
the broken app, an overwrite takes every file you did not stage from it, and
199
publish would make the broken version live. The live app is not affected;
200
check `isLive`. Restore the last good version first
201
([refusal-recovery.md](references/refusal-recovery.md)).
202
203
---
204
205
## Apps That Call Flows
206
207
- The push has a step that checks every flow the app calls still exists, but
208
on 2026-11-20 it did not catch a deleted flow (below). Flows are imported as
209
`Existing`, so the flows themselves are not changed (`flowsPreserved`).
210
`connectionReferencesRestored` lists connections (flows, SharePoint, Office
211
365 Users) the server wrote back into the app record so Studio does not show
212
them as not connected; it is information, not a problem.
213
- **A deleted flow fails the push with a raw error**:
214
`exportPackage returned 200 with no operation Location: : The provided flow '<id>' has been deleted.`
215
It is not a `stale-flow-reference` refusal and carries no
216
`connectionReferences` to recover with. `removeDataSource` cannot remove a
217
flow either. Restore the flow (`restore_live_flow` with the id), then push
218
again with no edits; your staged edits are kept.
219
- `checkFlowConnections` in the reply warns that an import can break the app's
220
link to a flow: Studio then shows it as "Not connected" and calls fail with
221
"Connection not configured for this service". Only Studio's Power Automate
222
pane shows this; `list_live_connections` does not. Ask the person to check
223
after any push whose reply carries `checkFlowConnections`. Whether later
224
pushes keep the link was not tested.
225
- A refusal with `reason: "stale-flow-reference"` means the app record points
226
at a flow that no longer exists. Push again with the `connectionReferences`
227
value the refusal gives you. This comes from the tool description; testing
228
with a deleted flow produced the raw error above instead.
229
230
---
231
232
## Copies and Solutions
233
234
- `saveAsNewApp: "<name>"` with `push: true` saves the session as a new app.
235
The source is untouched apart from closing its session. **The new app is
236
created published.** The reply's `appId` is the source; the new app is
237
`newApp.appId`. A `fromApp` copy uses the same live lists and flows as its
238
source (on a real app); expect the same from `saveAsNewApp`. See "Creating
239
Apps" in `flowstudio-power-apps-canvas-edit`.
240
- `add_to_solution` with `app` and `solution` (unique name or id) puts the app
241
in a Dataverse solution. An app outside any solution is made
242
solution-aware first (`method: "makeSolutionAware"`). It counts toward the
243
person's credits even during the canvas preview.
244
245
---
246
247
## Power Apps Studio
248
249
An open Studio tab is a second writer. Its saves write Studio's whole
250
in-memory copy of the app as the new version, which reverts pushes the tab
251
never saw. Studio also saves on its own (`Autosaved` versions), so not
252
pressing Save is not enough.
253
254
- The one hard rule: a Studio tab opened before your pushes must be reloaded
255
or closed before anyone works in it. First ask whether the person has
256
unsaved work there; if so, they save it before you open your session.
257
- A tab opened after your last push is safe until you push again. Its saves
258
move the head, and your next push is refused with base-moved. Deal with the
259
tab before you replay (see "When the App Moved: Base-Moved Refusals"), and
260
check in the diff that your earlier pushes are still there.
261
- Version restores need Studio closed (it holds the edit lease).
262
- Judge results in the published app (its play link) after a hard reload. A
263
Studio tab's editor and its preview (Play, F5) run the copy that tab loaded,
264
so use them only in a tab opened after your last push.
265
266
Details and case studies are in
267
[studio-coexistence.md](references/studio-coexistence.md).
268
269
---
270
271
## Reference Files
272
273
- [refusal-recovery.md](references/refusal-recovery.md): restoring a good version after a broken head
274
- [studio-coexistence.md](references/studio-coexistence.md): how Power Apps Studio saves, the edit lease, and judging results
275
276
## Related Skills
277
278
- `flowstudio-power-apps-canvas-mcp`: sessions, draft versus live, timeouts and costs
279
- `flowstudio-power-apps-canvas-edit`: stage the edits you ship
280
- `flowstudio-power-apps-canvas-read`: diffs, versions and what is live
281
- `flowstudio-power-automate-debug`: diagnose a flow the app calls
282