My flow stopped working all of a sudden, getting Parameter 'Attachment Content' cannot be null or empty.
It's a pretty simple flow. I get the content of an .xlsx file, make a backup copy into the same folder (which works fine) then I use the file content for the attachment in the send an email (V2) action, which fails:get file content and make a copy
use same content for the attachment
Looking at the run history I can see the following:
Get file content raw outputs:
Solved! Go to Solution.
I don't like it when flows that had been working suddenly fail.
I can only suggest that you try:
to fix, for whatever reason, any hidden "corruption" in the flow or some other change in the SharePoint back-end?
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
I don't like it when flows that had been working suddenly fail.
I can only suggest that you try:
to fix, for whatever reason, any hidden "corruption" in the flow or some other change in the SharePoint back-end?
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
@ekarim2020 thanks for your suggestions. I tested the first option extensively, to no avail. However I discovered some interesting fact. In one of the tests, I forgot to add the .xlsx extension in the attachment name, and the flow completed successfully! The mail was sent, attachment with no file extension, but when detached and saved as .xlsx, it opens fine.
I tested with both, Infer Content Type in the Get file content action Yes or No, but it makes no difference.
Attachment name = xlsx extension.xlsx
Get file contents output:
Attachment inputs:
The flow fails with attachment cannot be null or empty.
Attachment name = no file extension
Get file contents output:
Attachment inputs:
The flow completes successfully, but the attachment in the mail has no extension and must be saved as .xlsx locally before it can be opened or processed further in the flow.
No matter if the content bytes are office xml format or octet stream, it works fine without file extension, but the content bytes input is null if the attachment name ends with .xlsx
I have another flow with exactly the same construct, and it continues to run fine. The only difference is that it's triggered by a SharePoint list item created or modified action, while the two that fail since Friday are triggered by a PowerApp button.
(1) If you hardcode the attachment file name in to the send mail action, is the attachment received and can it be opened?
(2) Test with a simple flow: Get File content, Send Mail:
If the basic flow works, we can then add further actions later.
Let me know.
Ellis
@ekarim2020 I've hardcoded the filename for my tests. The flow fails if the attachment name ends with .xlsx, it works fine without extension or with no attachment at all. The parameters passed to the PowerApps run command behave correctly, all is fine as long as there is no attachment or the attachment name doesn't end with .xlsx.
@ekarim2020 Tested with a simple flow just consisting of these two steps,
Working as expected:
Will now try and re-create the entire Send an email action from scratch.
@ekarim2020 option 2 did the trick, no point in messing with the attachment, it's the whole step that needs to be re-created.
- Edit the original flow
- Expand advanced options of the failing step
- Take a screenshot
- Delete the step
- Re-create it exactly as it was
- Succeed
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
45 | |
16 | |
15 | |
14 | |
13 |
User | Count |
---|---|
77 | |
38 | |
27 | |
18 | |
18 |