I broke my flow and I cannot figure out why!! (Form Approval with attachment)
I had an approval process that was working well then I moved the form it was attached to and now I broke it. The problem appears to be somewhere in the Parse JSON and the create a web link.
I created a form where the donor must upload a picture. Submitting the form starts an approval process.
Everything worked great until I moved the form to a Teams Group.
This is where the break is occurring. It has something to do with the Parse JSON and the Create Share link.



Comments
-
@Susan Fioribello - In the Parse JSON action, click the x for the item listed for "Content" and re-add the dynamic content output from the get response details action.
0 -
@Susan Fioribello
all error fixing starts with the error itself.First is to ensure your run did happen when the form is submitted, if the flow has no run history, then you want to make sure your form ID is updated on the trigger step and the “get response” action. (when you “move” a form from user to group, i don't remember if that will change the form ID or not)
Form ID highlighted in yellow (when you get the URL from the browser location bar when designing the form).
If flow does trigger (have a run history) check the action that failed and see what the error message is to determine what needs to be done. (if the flow failed at the Parse JSON action, your create share link action will not execute, see the Parse JSON action to see what the error is)
0 -
@Austen Brown
I checked the Form ID, it is definitely loading. I re-added the schema for JSON and that appears to work. It looks like it is failing at Create Share Link. The error says “Nonspecified”1 -
@Austen Brown
The Parse JSON appears to be working but it is failing at the “for each” then the “create a share link fails as there is no data”
I found this page and am following the steps but it isn't working. Approve a File Uploaded via Microsoft Forms – What Me Pa..Panic? (dontpapanic.com)
Also, when I pull the dynamic fields for the Parse JSON the choices all start with “body” for example, there is no [id] there is only [body id]. When I chose it for the share link it doesn't say ‘first(body(‘Parse_JSON’))?[‘id’]’ it says “first(items('For_each')['id'])” even though I pulled it in through the dynamic field.0 -
@Susan Fioribello - What is the apply to each (containing the create file link action) running off of? With the expression “first” you shouldn't need to put this action within an apply to each.
0 -
@Austen Brown
When I had it working Create share link was not in a “For each”.But it keeps getting added automatically. in the Dynamic content the Parse JSON items all begin with the word Body. That wasn't the case prior. So when I chose “Parse JSON-Body id” the “For each” gets added.
I suspect whatever I did to cause “Body” to appear is making the “for each” get added.
If I take the Create share link out of For each, I get an error message that I need it. When the Create share link is in the For each loop it is not available for the Approval.
0 -
@Susan Fioribello - There is a new designer bug that adds errant/unneeded apply to each loops. I recommend switching to the older designer, and pulling the link action out of the apply to each.
0 -
@Susan Fioribello
new editor definitely has more issue that's unknown, so use old editor (the switch is on the upper right corner of flow window) like Austen saidHowever, the Apply to Each is “correct"ly placed by flow b/c a single question on form for uploading CAN allow uploading of more than 1 file, even when you can limit the question to allow only single file to be uploaded, FLOW connector action has to accommdate the potential “array” of file being uploaded.
The Parse JSON schema tells the flow that there is an array of file, so when you reference one of the field for the file upload (i.e. id) in your create share link action, flow will automatically place the action in an Apply to each for the array of files uploaded.
You can go one of 2 path:
- leave the Parse JSON as is (benefit is less change)
- remove the dynamic content from the Create share link action and drag and move the action outside of the apply to each and delete the apply to each
- in the dynamic content, put in this expression:
first(body('Parse_JSON_Donation_picture_upload'))?['id']
- change the Parse JSON to only look at the first file of the upload question (benefit is to allow you to get all of the file upload property, including name, without using first() expression on all of them, and flow will never create a new Apply to each loop when you directly select the field for the file upload)
- in the Content field of Parse JSON action, remove the dynamic content (which is the file upload question), and go to expression and type in first(), then put your text cursor between the paranthesis and go to dynamic content and select the file upload question
- change the Schema to what I have below
- remove the dynamic content from the Create share link action and drag and move the action outside of the apply to each and delete the apply to each
- then directly select the id dynamic content from the parse json action
Schema to use if you select option 2 above:
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"link": {
"type": "string"
},
"id": {
"type": "string"
},
"type": {},
"size": {
"type": "integer"
},
"referenceId": {
"type": "string"
},
"driveId": {
"type": "string"
},
"status": {
"type": "integer"
},
"uploadSessionUrl": {}
}
}
0 - leave the Parse JSON as is (benefit is less change)
-
@Austen Brown
I tried switched to the old designer but it also added the “For each”.
Is it possible that my JSON schema is doing something to make this happen?0 -
I am getting so frustrated with this. No matter what I do I cannot add the attachment to the Approval. Classic example of why you should make a copy before fussing with a flow!
Would one of you be willing to do a zoom or teams session with me to figure out this one issue?
0 -
@Susan Fioribello
I will use what you are trying to do as sample for my session in bbdevday: 6/6 Thursday session on Power Automate Tips and Tricks at 3PM-3:45PM EDT. If you signed up for bbdevday and is attending, you can come to the session to learn.https://blackbaud.swoogo.com/bbdevdays2024
if you are not, I will see if I can get the video recording posted for you later on
2 -
Unfortunately, Thursday is our staff development day so I won't even be on the computer. I would love a recording!
Thank you so much!!!
0 -
@Susan Fioribello
here's link to the on demand videoIf you are unable to access, @Erik Leaver maybe can help.
1 -
@Alex Wong
What a great session! I am so sorry I wasn't able to attend live.I followed your instructions. The problem is that [id] from either is not showing as an available field
0 -
@Susan Fioribello
the reason why you do not see the id dynamic content is b/c the action to create share link require field Item Id is looking for an integer, which id is not an integer, so power automate “smartly” not show it. i just notice this this morning that id doesn't work to create share link, you need another step in between.Get file metadata using path (you will need to compose your path from where you know the folder of the upload and then add the name of the file from the 2nd parse json.
then you will get the ItemId from the get file metadata action.
0 -
@Susan Fioribello
bbdevdaytestuploadfilecreatesharelink_20240607180455.zipdecodeUriComponent(replace(body('Parse_JSON_Require_Single_File_Upload_First_File')?['link'], 'https://yourorgsharepointurl/teams/BusinessAutomation', ''))
expression used above will use the link dynamic content from the 2nd parse json and decode it to a path that can be used after replacing the initial part of the url that is the site address. This way you don't need to worry about knowing the folder path of where to find your uploaded file.
use the zip file to import and try it out
0 -
Woo Hoo!!! It works perfectly!
I cannot thank you enough for all of your help and patients.
You are amazing!
2
Categories
- All Categories
- 6 Blackbaud Community Help
- High Education Program Advisory Group (HE PAG)
- BBCRM PAG Discussions
- Luminate CRM DC Users Group
- DC Luminate CRM Users Group
- Luminate PAG
- 186 bbcon®
- 1.4K Blackbaud Altru®
- 389 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 14 donorCentrics®
- 355 Blackbaud eTapestry®
- 2.4K Blackbaud Financial Edge NXT®
- 616 Blackbaud Grantmaking™
- 542 Blackbaud Education Management Solutions for Higher Education
- 33 Blackbaud Impact Edge™
- 3.1K Blackbaud Education Management Solutions for K-12 Schools
- 909 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 207 JustGiving® from Blackbaud®
- 6.2K Blackbaud Raiser's Edge NXT®
- 3.5K SKY Developer
- 236 ResearchPoint™
- 116 Blackbaud Tuition Management™
- 375 YourCause® from Blackbaud®
- 160 Organizational Best Practices
- 232 The Tap (Just for Fun)
- 31 Blackbaud Community Challenges
- Blackbaud Consultant’s Community
- 19 PowerUp Challenges
- 3 Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 Raiser's Edge NXT PowerUp Challenge: Events
- 3 Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 Raiser's Edge NXT PowerUp Challenge #1 (Query)
- 71 Blackbaud Community All-Stars Discussions
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 743 Community News
- 2.8K Jobs Board
- Community Help Blogs
- 52 Blackbaud SKY® Reporting Announcements
- Blackbaud Consultant’s Community
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
- Blackbaud Francophone Group
- Blackbaud Community™ Discussions
- Blackbaud Francophone Group