Hi @clarkzara
Reading an Excel File Attached to a SharePoint List: I'm attempting to read an Excel file that's attached to a SharePoint list. I understand that the first step involves using the "Get attachments" action to retrieve the attachment content. However, I'm uncertain about how to retrieve and utilize the file identifier obtained from this action. Could someone provide guidance on extracting the file identifier from the result of the 'Get attachments' step and subsequently accessing the attached Excel file within my Power Automate Desktop flow?
I have seen many folks reporting "bad gateway error" in all different cloud packages in PAD. For the above scenario I would recommend the below approach.
In my list, there are two attachments under the ID 1.
Initially, I utilized the 'get attachments' action and set my list ID to 1.
Since there are two attachments within this specific list ID, I employed a foreach loop to iterate through all the attachments retrieved from the 'get attachment' response.
Subsequently, I invoked the 'Get attachment content' action, passing the file identifier as 'Currentitem.id' as like below screenshot

Next, I retrieve the binary data of my attachment from the aforementioned action. As I intend to access the data within the Excel file, I recreate the Excel file using the "onedrive file create" action. Additionally, I've synchronized the same OneDrive path with my local system.
Once the above action is completed, the Excel file from OneDrive becomes available on my local system as well.
Subsequently, I utilize the "Launch Excel" function, passing the OneDrive folder name along with the file name to open it on my local system, enabling me to read the data from the Excel file.

Attaching Files to SharePoint List Items: In another part of my workflow, I'm trying to attach a file directly to an item in a SharePoint list. While I've successfully managed to upload a file to a SharePoint folder, I'm encountering a "Bad Gateway" error when attempting to attach the file directly to a SharePoint list item. This error seems unusual, especially considering that I've established a connection to SharePoint and successfully uploaded a file to a SharePoint folder. Any suggestions on troubleshooting this issue would be highly appreciated.
For the above use case, solution is simple.
Utilize the "Add attachment" action with the following steps:
1. Specify the list name and its corresponding ID to which you intend to attach the file.
2. Provide the file name.
3. If your file is stored locally, convert it into binary format and include it as file content.
Once these steps are completed, your file will be uploaded to the list as an attachment. That's all there is to it!

Thanks,
Deenuji Loganathan 👩💻
Automation Evangelist 🤖
Follow me on LinkedIn 👥
-------------------------------------------------------------------------------------------------------------
If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀