I created a powerautomate workflow that when an invoice is approved, we create a new invoice entry in the AP invoice lists and append attachment. In the Invoices screen, I can see and download the attachment. However, in the AP Invoice window (list) it is saying Something went wrong. We can't open this file. In the downloads, the size of the file is 1 kb. It's recognizes the name of the PDF but won't open.
Here is my Flow. I have when an item is created or modified in the Invoices list. Get Item (ID). Initialize a variable - Name: VarAttachments and Array type. Get attachments from the Invoice ID. And then Get attachment content from the Invoice ID and File identifier ID.
I do switch based on Department for the AP Team.
Anyone know what could be wrong with this. I hope this is enough information.
Not exactly sure what you are doing here, but I can see the issue. In the Add attachment action you have the Id as the content. You need to get the content of the file you want to attach, and put the dynamic item Content in that action. For example:
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492