Hi,
I created a simple flow where users can attach files (if applicable). When i run the process WITH attachments, everything works fine, but when I run it WITHOUT attachments it fails.
Solved! Go to Solution.
Hi @P00118510
You need to change the condition expression to the following: contains(triggerBody(),'file')
This will check the trigger actions for the presence of a file...
Example flow, when a file is not provided:
And when a file is provided:
HTH
Jay
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
You need to put a condition in front of the Add Attachment action to see whether a file was supplied when the Flow kicked off. If it wasn't then go around the add attachment.
Hi,
i originally had the process without the condition statement and was working fine. I dont know what happened overnight but it stopped working today.
Any other ideas ?!!?
thank you for your response
The point is that if you don't supply file content when you trigger the Flow, but still try to create an attachment it is going to give you an error because you are trying to create a file without content.
Hi,
so i added a condition as per your suggestion but now it seems like the problem went to another part of the process.
My first step "manually trigger a flow" properly recognizes that there's an attachment added. But my 2nd step "Create an item" doesnt recognize the attachment. it says "has attachment-->false", thus my 3rd step which is the if condition doesnt kick in properly.
Hi @P00118510
You need to change the condition expression to the following: contains(triggerBody(),'file')
This will check the trigger actions for the presence of a file...
Example flow, when a file is not provided:
And when a file is provided:
HTH
Jay
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Thank you Jay, it worked like a charm.
User | Count |
---|---|
38 | |
36 | |
17 | |
14 | |
12 |
User | Count |
---|---|
26 | |
20 | |
19 | |
13 | |
13 |