Action list only — not a full rebuild

Fix TT - Get Certificate: Exactly What To Change

This page is just the "what do I actually need to do right now" list for the flow you have already been building, following what came out of troubleshooting the "only success/message show up" problem. Nothing here is new work — it is undoing/replacing a small number of things you already built. No step numbers to track against the main guide; this list stands on its own.

Root cause, in one sentence: a flow cannot have two separate Respond to a PowerApp or flow actions — not even one per Condition branch with matching field names. Power Apps cannot reliably combine them into one schema, which is why some output fields silently stopped being recognised by the app no matter how many times the data source was refreshed. Confirmed against a moderator-verified answer on Microsoft's own Power Platform community forum.

0. Clean up the duplicate flow — you don't need it

Earlier, while we were still chasing what turned out to be a caching red herring, you made a duplicate copy of this flow (e.g. TT - Fetch Certificate) via Save As, to test whether the problem was tied to the original flow's identity. It wasn't — the real cause (two Respond actions in one flow) was identical in both copies, so the duplicate proved nothing was special about the original and isn't needed going forward.

  1. In Power Apps Studio, open btnOpenCertificate.OnSelect. If it currently calls 'TT-FetchCertificate'.Run(...) (or whatever you named the duplicate), change it back to 'TT - Get Certificate'.Run(...) — start typing the flow name and let autocomplete fill in the real identifier.
  2. In the Data pane, remove the duplicate flow (e.g. TT - Fetch Certificate) from the app's data sources if it was added.
  3. In Power Automate, you can delete the duplicate flow entirely, or just leave it turned off/unused — your call, it does no harm sitting there unused, but deleting it avoids any future confusion about which one is the "real" one.

Everything below fixes the original TT - Get Certificate flow — that's the one to keep using.

1. Delete both existing Respond actions

Open TT - Get Certificate in edit mode in make.powerautomate.com. You are looking for two separate Respond to a PowerApp or flow actions:

For each one: click the three dots in the top-right corner of the action's card → Delete → confirm. Do this for both before moving on — the flow will be in a half-finished state until Step 5 below, that's expected.

2. Add two more variables, alongside the two you already have

You should already have varFileName and varFileContentBase64 sitting as Initialize variable actions at the very top of the flow — directly under the trigger, before Get item. Add two more in that exact same spot, above Get item, the same way you added those:

  1. Click the + below your last existing "Initialize variable" action (or between it and Get item) → search Initialize variable → select the Control connector's action of that name.
  2. Fill it in: Name: varSuccess. Type: click the type dropdown and choose Boolean. Value: leave this box completely empty — don't type anything, not even a fx expression.
  3. Repeat: add a second Initialize variable the same way. Name: varMessage. Type: String. Value: leave empty.

You should now have four "Initialize variable" actions stacked at the top, in this order: varFileName, varFileContentBase64 (however you had them before), then your new varSuccess, varMessage. Order between them doesn't matter, but all four must be above Get item and outside any Condition/loop — Power Automate only allows this action at the flow's top level, it will refuse to save if one ends up inside a branch.

3. In the "If yes" (authorised) branch: replace the deleted Respond with two Set variable steps

Go back into the If yes branch. Your Apply to each loop (with Get attachment content and your two Set variable steps for varFileName/varFileContentBase64 inside it) should still be there and untouched. You're adding two brand-new actions directly below the loop, still inside the If yes branch — the same spot where the Respond action you deleted in Step 1 used to sit.

  1. Click the + just below the closing edge of the Apply to each box (still inside the yellow/grey If yes branch, not inside the loop itself) → search Set variable → select it.
    Fill in: Name: from the dropdown, pick varSuccess. Value: click the fx icon (the small function/lightning icon to the right of the value box) and type the bare word true — no quotes, no capital letter. Confirm it shows as a small blue/coloured pill in the box, not plain text, before moving on.
  2. Click + again, directly below that, still in the same branch → another Set variable.
    Fill in: Name: varMessage. Value: just click into the plain text box and type OK — do not click fx for this one, it's a literal text field, not a true/false field.

4. In the "If no" (unauthorised) branch: same idea, two Set variable steps

Switch to the If no branch (it should currently be empty, since you deleted its Respond action in Step 1).

  1. Click + inside the If no branch → Set variable. Name: varSuccess. Value: click fx, type false. Confirm it shows as a pill, same as before.
  2. Click + again, below that → Set variable. Name: varMessage. Value: plain text box, type exactly You are not authorized to view this certificate.

Do not add anything for varFileName/varFileContentBase64 in this branch — leave them alone, they just keep whatever blank value they were initialised to in Step 2.

5. Add exactly one Respond action, after both branches rejoin

Scroll down until you can see the whole Condition box (both If yes and If no branches side by side) end, with its bottom edge closing them both off. You need to add a new action below that closing edge, outside both branches — there is usually a + directly under the whole Condition box, separate from the + buttons inside either branch. If you're not sure you're in the right spot, the new action's card should span the full width of the flow canvas, not be indented inside a branch.

  1. Click that + → search Respond to a PowerApp or flow → select it.
  2. Click + Add an output four times and configure each one:

Double-check the spelling and capitalisation of all four titles exactly as shown — the app's formula on the other end refers to these by name, and a mismatch (e.g. filename vs fileName) reproduces the exact "isn't recognized" error this whole rebuild was fixing.

6. Save, then check the app

  1. Click Save in the top-right of the flow designer. If it saves cleanly with no red error banner, the structural fix is in.
  2. In Power Apps Studio, open the Training Tracker app, go to the Data pane, find TT - Get Certificate, click its Remove, then + Add data and add it back — this forces Power Apps to re-read the flow's now-corrected output schema rather than an old cached one.
  3. Explicitly save the app itself too (not just the data source) — the small File → Save, or Ctrl+S. Then fully close the app (back to the app list) and reopen it, to be sure Studio isn't holding an old in-memory copy.
  4. Open btnOpenCertificate.OnSelect and check the autocomplete on whichever variable holds the flow's result (e.g. varCertDownload.). All four fields (success, message, fileName, fileContentBase64) should now show up, permanently — this is a structural fix, not a caching one, so it should not come back.
You do not need to touch TT - Save Certificate. That flow technically has the same two-Respond-action structure, but it only ever returns two fields (success/message) on both branches, so there is nothing for Power Apps to disagree about — it works fine as-is. Leave it alone.
← Back to the main Certificate Privacy Upgrade section