FlowStudio Power Apps Canvas Edit

FlowStudio Power Apps Canvas Edit

Guides an AI to build and edit Power Apps canvas apps through FlowStudio MCP: screens, controls, Power Fx, galleries and data connections as checked named edits.

Skill files3 files

references/

SKILL.md377 lines
1
---
2
name: flowstudio-power-apps-canvas-edit
3
description: >-
4
Build and change Power Apps canvas apps through FlowStudio MCP: create apps,
5
add and restyle screens and controls, write Power Fx, build galleries, and
6
connect Dataverse, SharePoint, connectors and flows, all as named edits the
7
server checks. Load this skill when asked to: create an app, add or change a
8
screen or control, write or fix a Power Fx formula, add a gallery or table,
9
connect a data source or flow, fix a layout, or improve an app's quality
10
score. Requires a FlowStudio MCP subscription; see https://mcp.flowstudio.app
11
---
12
13
# Building and Editing Power Apps Canvas Apps with FlowStudio MCP
14
15
All edits go through `update_canvas_app` as named operations: set a property,
16
add a control, rename a screen. The server writes the package files, keeps
17
control ids unique, rewrites the YAML for most edits (not after
18
`renameScreen`, see "Renaming screens") and checks every formula. Do not edit
19
`Controls/*.json` or `Src/*.pa.yaml` by hand.
20
21
**Prerequisite**: The `flowstudio-power-apps-canvas-mcp` skill (sessions, timeouts) and,
22
for finding things, `flowstudio-power-apps-canvas-read`. Pushing and publishing are in
23
`flowstudio-power-apps-canvas-ship`. Subscribe at https://mcp.flowstudio.app
24
25
---
26
27
## Source of Truth
28
29
> **Always call `tool_search` with `"skill:canvas-app"` first** to confirm tool
30
> names and parameter schemas. They change between server versions.
31
> This skill covers behavior the schemas cannot tell you. Tool behavior was
32
> checked on the production server on 2026-11-20; lines marked "on a real app"
33
> come from customer apps built between August and November 2026. If what a
34
> response shows actually happened disagrees with this file, the response
35
> wins. The server's general guidance text does not override the warnings
36
> here.
37
38
---
39
40
## Workflow
41
42
1. **Open.** For an existing app, first ask whether the person has it open in
43
Power Apps Studio with unsaved work; they save it and close or reload the
44
tab before you start (`flowstudio-power-apps-canvas-ship`, "Power Apps Studio"). Then
45
`get_canvas_app`. If `session.pendingEdits` is above 0 and you did not
46
stage them, `diff_canvas_app` from `base` to `session` shows what they
47
are; ask the person before `discard_canvas_app_session` drops them.
48
2. **Get real names.** `list_canvas_controls` for control names,
49
`describe_canvas_control` for a control's property names and current
50
formulas, or for a type's properties (`name: "modernButton"`).
51
3. **Read the data first.** `get_canvas_app_sources` before any formula that
52
touches a table, so column names are real.
53
4. **Check formulas before writing them.** `check_canvas_formula` with
54
`formulas`, `screen` and `control`. `flowstudio-power-apps-canvas-read` lists what it
55
gets wrong.
56
5. **Dry run.** `update_canvas_app` with `dryRun: true`. It reports `from` and
57
`to` per edit and lists edits that match nothing.
58
6. **Stage.** The same call without `dryRun`. Read `notMatched`, `hints`,
59
`defaults` and `layoutSuggestions` in the reply.
60
7. **Read back.** `describe_canvas_control` on what you changed.
61
8. **Check the whole app.** `check_canvas_formula` with no formula, then
62
`score_canvas_app`. Fix what is worth fixing and repeat.
63
9. **Ship.** Follow `flowstudio-power-apps-canvas-ship`.
64
65
---
66
67
## How `update_canvas_app` Applies Edits
68
69
- `edits` is an ordered list and **runs in order**. After `renameControl`
70
from `Label1` to `lblTitle`, every later edit in the same batch must say
71
`lblTitle` (seen with a screen rename on 2026-11-20).
72
- **A batch is not all-or-nothing.** Edits that fail are listed in
73
`notMatched` with a reason; the rest are staged. Fix and re-send only the
74
failed ones.
75
- Formulas are Power Fx without the leading `=`. Text keeps its quotes
76
(`"\"Hello\""` in JSON). Colors are `RGBA(0, 120, 212, 1)`.
77
- App-level formulas (`OnStart`, `Formulas`, `StartScreen`) use
78
`screen: "App"` and `control: "App"`. Named formulas go in `Formulas`, for
79
example `fxTotal = Sum(colExpenses, Amount);`.
80
- Most formula problems come back as warnings and the edit is still staged,
81
so read the warnings. A formula with unbalanced brackets or quotes is
82
refused ("structurally invalid and was NOT staged") and listed in
83
`notMatched`; the rest of the batch still applies, and a push in the same
84
call goes ahead without it.
85
86
| `op` | Does | Seen in testing |
87
|---|---|---|
88
| `setProperty` (default) | writes `formula` to `property` | reply shows `from` and `to` |
89
| `removeProperty` | reverts a property to its default | the way to drop an unwanted formula |
90
| `addControl` | adds `control` of `type` under `parent` | see "Adding Controls" |
91
| `moveControl` | changes `parent` and/or position | `after` worked; `before` and `position` are from the tool description |
92
| `renameControl` | renames and rewrites every formula that uses it | reply gives `formulasRewritten` |
93
| `deleteControl` | removes a control | refused while formulas use it, listing them; `force: true` overrides |
94
| `addScreen` | adds an empty screen, last in order | `App.StartScreen` is untouched |
95
| `renameScreen` | renames and rewrites `Navigate` calls | empties that screen's YAML file; see "Renaming screens" |
96
| `deleteScreen` | removes a screen | refused while anything navigates to it; `force: true` overrides (fix the `Navigate` calls first) |
97
| `addDataSource` | Dataverse table, SharePoint list, connector or flow | see "Data Sources" |
98
| `refreshDataSource` | re-reads a source's schema | worked for all four kinds |
99
| `removeDataSource` | removes a table or list | refused while formulas use it; `force: true` overrides according to the tool description (not tested); does not handle connectors or flows |
100
| `addFlow` | same as `addDataSource` with `flow` | seen in a dry run only |
101
102
---
103
104
## Adding Controls
105
106
### Type names
107
108
`type` takes the YAML type name. In an app with modern controls (the default
109
for new apps) the server builds the modern version; `modern: false` gives the
110
classic one. The table uses the names the reply's `type` field gives:
111
112
| `type` | Modern app builds | Classic app builds |
113
|---|---|---|
114
| `Label` | `ModernText` (a text label) | `Label` |
115
| `Text` | **`ModernTextInput` (an input box)** | `Classic/TextInput`, per the server's hint |
116
| `TextInput` | `ModernTextInput` | `Classic/TextInput` |
117
| `Button` | `ModernButton` | `Classic/Button` |
118
| `Gallery` | `Gallery` | not tested |
119
| `Image` | `Image` (not tested) | not tested |
120
| `Table` | `Table` (the modern data table) | not tested |
121
| `Toggle` | not tested | `Classic/Toggle` |
122
| `Dropdown` | not tested | `Classic/DropDown` |
123
124
Galleries and images have one generation, used by modern and classic apps
125
alike. **`Text` builds an input box, not a label.** Use `Label` for display
126
text. The reply's `type` field says what was actually built; check it.
127
`list_canvas_controls` with `in: "catalog"` lists every type you can add.
128
129
### New controls can copy formulas from an existing one
130
131
When the app already has a control of the same type, `addControl` models the
132
new one on it (`modelledOn` in the reply). Normally it drops the model's own
133
settings. Seen on 2026-11-20, it copied them instead:
134
135
- a new label got `Size: 20` from the title label (listed in `defaults`);
136
- two new buttons got the first button's `DisplayMode` formula, which
137
disabled them whenever two unrelated text boxes were empty. One of the two
138
replies did not mention it.
139
140
In both cases the model control sat on a screen whose YAML a `renameScreen`
141
had emptied; one of the new buttons went on a different screen and still
142
copied. The server reads the model's own settings from the model's screen
143
YAML to know what to drop, and with nothing there it keeps everything except
144
`On...` formulas. So expect copying whenever the model is on such a screen,
145
wherever the new control goes, and in older apps with no YAML at all (read
146
from the server code, not tested).
147
148
After every `addControl`, `describe_canvas_control` the new control and
149
`removeProperty` anything it should not have, behavior formulas above all
150
(`DisplayMode`, `Visible`). Set every property you care about explicitly in
151
`properties`. `copyFrom` copies a chosen control on purpose.
152
153
### Where it goes
154
155
- `parent` is the container (or gallery) to put it in; the default is the
156
screen.
157
- In an AutoLayout container, order is reading order. Use `before`, `after`
158
or `position`. `X` and `Y` are ignored.
159
- On a screen or inside a gallery, controls are placed by `X` and `Y`; order
160
only decides which paints on top.
161
- Starting layouts from `create_canvas_app` and their containers:
162
- `responsive`: `HeaderContainer1`, `MainContainer1`, `FooterContainer1`
163
inside `ScreenContainer1`
164
- `sidebar`: `HeaderContainer1`, `SidebarContainer1`, `MainContainer1`
165
- `split-screen`: `LeftContainer1`, `RightContainer1`
166
- `phone`, `tablet`: an empty screen, controls by `X` and `Y`
167
- `addScreen` gives an empty screen with no containers, even in a responsive
168
app. Place controls by `X` and `Y`.
169
170
Act on what the reply says about the new control:
171
172
- `hints`, for example a missing `AccessibleLabel`. App Checker flags it on
173
modern buttons and icons, data tables, classic text inputs, combo boxes and
174
toggles, and galleries, not on labels or classic buttons.
175
- `layoutSuggestions`, for example `text-height` (a modern text label too
176
short for its font shows a scrollbar) and `input-label` (an input with no
177
visible label beside it).
178
179
### Renaming screens
180
181
On 2026-11-20 `renameScreen` left the renamed screen's `Src/<Screen>.pa.yaml`
182
holding only the screen name, and later edits did not rebuild it. Studio
183
parses that file when it opens the app (see "Images and Other Package Files"
184
below, and "Package Files" in `flowstudio-power-apps-canvas-read`), so the app may open
185
with that screen empty, or not open at all; this was not checked. The model
186
controls in "New controls can copy formulas from an existing one" sat on that
187
screen. Until the server is fixed:
188
189
- Name screens when you create them with `addScreen` rather than renaming.
190
For the first screen `create_canvas_app` makes, keep its name (`Screen1`).
191
In a `phone` or `tablet` app you can instead add a named screen, set
192
`App.StartScreen` to it, and delete the first (not tested). In a
193
`responsive`, `sidebar` or `split-screen` app that loses the starting
194
containers, so keep `Screen1` there.
195
- If a screen must be renamed, push the rename on its own, tell the person,
196
and ask them to open the app in Studio and check that screen before you
197
publish.
198
199
---
200
201
## Control Generations
202
203
There are three generations with different property names. The new modern
204
text input outputs `.Text`; the older Fluent one outputs `.Value`. Writing the
205
wrong one compiles as an error. Check the control's type with
206
`describe_canvas_control` and read
207
[control-dialects.md](references/control-dialects.md) before touching text,
208
color, font weight, alignment or input values.
209
210
---
211
212
## Galleries
213
214
- Add the gallery, then add its row controls with `parent` set to the gallery.
215
- Inside, read the row with `ThisItem.<column>` and size against
216
`Parent.TemplateWidth` and `Parent.TemplateHeight`. `TemplateSize` sets the
217
row height.
218
- A new gallery comes with a template whose `OnSelect` is
219
`UpdateContext({ itemSelected: true, CurrentItem: ThisItem })`.
220
- `fields` on `addControl` (the columns to show, in order) does not work on a
221
gallery yet; it is refused with a clear message. It is accepted on a
222
`Table`, but on 2026-11-20 the score then marked the column controls it
223
built as zero-size; whether they really were was not checked. Look at the
224
table in the published app before relying on it.
225
- The layout check suggests one AutoLayout container per row so the row
226
reflows on narrow screens. Wrapping existing row controls in a container
227
changes their `Parent`: on a real app, a `Select(Parent)` in them then
228
selected the container, not the row, and Studio showed errors. Change those
229
to `Select(<GalleryName>)`.
230
- Add a label whose `Visible` is `IsEmpty(<items>)` so an empty list says what
231
to do; the score marks galleries without one.
232
233
---
234
235
## Data Sources
236
237
Call `get_canvas_app_sources` after adding any source, and use the names it
238
returns.
239
240
| Source | Edit | Name in formulas |
241
|---|---|---|
242
| Dataverse table | `{"op": "addDataSource", "table": "contact"}` (logical name) | display name, for example `Contacts` |
243
| SharePoint list | `"connector": "sharepoint"`, `"dataset": "<site URL>"`, `"table": "<list title>"` | the list title, for example `'Grocery Price Catalog'` |
244
| Connector | `"connector": "shared_office365users"` | for example `Office365Users` |
245
| Flow | `"flow": "<flow id>"` | the flow's name with spaces removed, in single quotes if it still has hyphens or other symbols: `'Greeting-Flow'.Run(...)` |
246
247
- With more than one connection for a connector, the edit is refused with the
248
list of connections; pass `connection`.
249
- A flow must start with a Power Apps trigger to be callable (tested with
250
`PowerAppV2`). `list_live_flows` gives the id.
251
- `refreshDataSource` after a list or table gains columns, or after a flow's
252
inputs or outputs change.
253
- `removeDataSource` removes tables and lists only. There is no edit that
254
removes a connector or flow from an app.
255
- **Row limit.** Reads the data source cannot filter itself (a `ClearCollect`
256
of a whole list, a `Filter` it cannot run on the server) stop at
257
`DefaultConnectedDataSourceMaxGetRowsCount` rows, 500 by default, with no
258
error. On a real app the newest rows were the ones that went missing. The
259
setting is in `Properties.json`. There is no edit for it, and patching that
260
file with `update_canvas_app_files` was not tested, so filter on the server
261
or tell the person to raise it in Studio (the maximum is 2,000).
262
263
---
264
265
## Power Fx Traps
266
267
The checker misses these, or reports them only vaguely:
268
269
- `Select(btnSave)` does not wait. Formulas after it in the same `OnSelect`
270
run before `btnSave`'s `OnSelect` finishes. On a real app this stamped
271
records with the previous person's name. Write the follow-up
272
into `btnSave`'s own `OnSelect`, or repeat the logic, instead of relying on
273
`Select` to finish first.
274
- `Navigate` in a screen's `OnVisible` checks clean, but Studio reported it as
275
an error on a real app.
276
- A column named in quotes is a text constant: `Sort(Distinct(list, Origin),
277
"Result")` sorts nothing. Use `Value`, unquoted, in current apps (`Result`
278
in older ones). The checker shows only a vague "Arguments were rejected" for
279
the quoted form, and wrongly says `Value` is "not recognised" (2026-11-20).
280
Ignore that warning.
281
282
---
283
284
## Images and Other Package Files
285
286
`update_canvas_app_files` stages raw package files.
287
288
- Images: `create` `Assets/Images/<name>.png` with `encoding: "base64"`. The
289
server registers it, and formulas use it by name (`Image: logo`).
290
- `patch` changes one exact match in a text file without resending it. It
291
refuses when `find` matches nothing, or matches several places and you did
292
not pass `occurrence` (1 = first match).
293
- **Never write `Src/*.pa.yaml`.** The player runs the control JSON, and the
294
server warns that a YAML write changes nothing, but it still pushes the file.
295
The package then has YAML that disagrees with the app, and Studio parses
296
that YAML when it opens the app. On a real app a YAML syntax error stopped
297
Studio opening an app the player ran fine.
298
299
---
300
301
## Creating Apps
302
303
- `create_canvas_app` with `start` (`responsive`, `sidebar`, `split-screen`,
304
`phone`, `tablet`) and a `name` not used in the environment. `modern`
305
defaults to `true`. The app is created published, with one screen.
306
- `fromApp: "<app id>"` copies an app. It runs as a `saveAsNewApp` push on
307
the source app: the reply's top-level `appId` is the **source**, and the
308
copy is `newApp.appId`. Use the copy's id for every later call; running the
309
test-data steps below on the top-level `appId` changes the original app.
310
Staged edits in the source's session go into the copy and are then cleared
311
from the source, so check its `session.pendingEdits` first. On a real app a
312
copy took 20 seconds. On 2026-11-20 a copy of an app with a flow and three
313
data sources, made while two other creates ran, timed out twice and was
314
still created the first time. See "Long Calls and Timeouts" in
315
`flowstudio-power-apps-canvas-mcp` before retrying a create.
316
- `update_canvas_app` with `push: true` and `saveAsNewApp: "<name>"` saves
317
your session as a new app and leaves the source untouched, apart from
318
closing its session. As with `fromApp`, the reply's `appId` is the source
319
and `newApp.appId` is the new app. It took 13 seconds for a small app and
320
31 seconds on a real app. **The new app is created published**, so it is
321
live for anyone it is shared with.
322
- **A copy uses the same live data.** On a real app, a `fromApp` copy came
323
back published and connected to the same SharePoint lists and flows as the
324
source, so anything tested in it wrote to the real data. Expect the same
325
from `saveAsNewApp` (not checked). To point a copy at test data:
326
`removeDataSource` with `force: true` (it refuses while formulas use the
327
list), `addDataSource` a test list that ends up with the same name in
328
formulas, then `check_canvas_formula` on the whole app. That sequence was
329
not tested, and flows cannot be removed. Otherwise test only with data that
330
is safe to change.
331
- There is no tool to delete an app. Test apps and copies have to be deleted
332
by the person in the Power Apps maker portal; name them so they are easy to
333
find.
334
335
---
336
337
## Layout
338
339
Load `tool_search "skill:canvas-layout"` for Microsoft's layout guidance.
340
Every staging reply carries `layoutSuggestions`; `check_canvas_formula` with
341
`layout: true` lists them for the whole app. Common ones:
342
343
- a scrolling outer container (`LayoutOverflowY: LayoutOverflow.Scroll`) so
344
content taller than the screen can be reached. An inner container that
345
should fit its children exactly gets an exact `Height` and
346
`LayoutOverflow.Hide` instead (see
347
[autolayout-semantics.md](references/autolayout-semantics.md));
348
- `FillPortions: 0` plus a height for a gallery inside a scrolling container;
349
- `LayoutWrap` or a width test on `LayoutDirection` for rows that squeeze on a
350
phone.
351
352
[autolayout-semantics.md](references/autolayout-semantics.md) covers what the
353
player honors and ignores inside containers.
354
355
---
356
357
## Quality
358
359
`score_canvas_app` returns ranked fixes with their score gain. Work down the
360
list: empty-state labels, a way to reach every screen, `Notify` after a save
361
and a busy state on save buttons, a theme instead of literal colors. Re-score
362
after each round. Push and publish replies carry the score too.
363
364
---
365
366
## Reference Files
367
368
- [control-dialects.md](references/control-dialects.md): classic, Fluent and modern control property names, and what goes wrong between them
369
- [autolayout-semantics.md](references/autolayout-semantics.md): how the player sizes, scrolls and orders controls inside AutoLayout containers
370
371
## Related Skills
372
373
- `flowstudio-power-apps-canvas-mcp`: sessions, draft versus live, timeouts and costs
374
- `flowstudio-power-apps-canvas-read`: find controls, formulas and columns before you edit
375
- `flowstudio-power-apps-canvas-ship`: push, publish and recover from refused pushes
376
- `flowstudio-power-automate-build`: build or change a flow the app calls
377

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,381 prompts

More by @OpenSourceBuffGuy

See all
POV gloved hands swap a woman's outfit prompt image

POV gloved hands swap a woman's outfit

Plans a ten-second luxury fashion commercial from a storyboard, where gloved first-person hands swap a woman's outfit with timed beats and strict anti-morphing rules.

video-prompt, reference-image, timed-beats, pov, video-ad, fashion, visual-effects, transformation, multi-shot, camera-movement, photorealistic, studio-lighting, dramatic-lighting, luxury, woman, full-body, negative-prompt, guardrails, structured-output, for-filmmakers, for-marketers, gemini, long-form, product-video

Woman winking with peace sign in orange tee prompt image

Woman winking with peace sign in orange tee

Draws a sunny street-fashion portrait of a woman in an orange tee winking and making a peace sign, with outfit, hair and wall details spelled out.

image-prompt, nano-banana, portrait, woman, reference-image, face-reference, fashion, summer, photorealistic, cinematic, vibrant-colors, natural-light, golden-hour, vertical-format, jewelry, hairstyles, negative-prompt, cityscape, street-photography, editorial, medium-shot, text-rendering, for-photographers, long-form

Airport Terminal Diorama Rising From Sketchbook prompt image

Airport Terminal Diorama Rising From Sketchbook

Draws a tilt-shift miniature diorama of any airport rising out of an open sketchbook, with planes, ground crews and sketch lines fading into the page.

image-prompt, placeholders, template, miniature, architecture, architectural-rendering, 3d-render, isometric, aerial-view, low-angle, macro, photorealistic, cityscape, landmarks, travel, aviation, sketch, vertical-format, natural-light, golden-hour, for-artists, for-designers, nano-banana, long-form, creative-coding, diorama

Reviews

Loading reviews…

Discussion

Loading comments…