web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Zip Files of Attachmen...
Power Automate
Suggested Answer

Zip Files of Attachments in Sharpoint

(3) ShareShare
ReportReport
Posted on by 53
Is it possible to handle the following?
・The "Business Trip Take-Out Management Export File" folder (zip) is stored under the download folder
The following items are stored under the "Business Trip Take-Out Management Export File" folder:
・CSV file (the "Attachment" item within the file contains a file link (link to the attachment))
・The "Business Trip Take-Out Management App Attachment" folder is stored"
 
 
I am Passing the below as JSON format to Power automate
 
ClearCollect(
    varGalleryData,
    ForAll(
        gallery_ShinseiIchiran.AllItems,
        {
            '01区分': ThisRecord.class_request,
            '02申請No': ThisRecord.ID,
            '03グループ名': LookUp(cltGroupManageList, ID = id_grp_mng_Rqst, name_dept),
            '04JOB名_理由等': ThisRecord.reason_req,
            '05帯同者': ThisRecord.accompanying,
            '06出張先': ThisRecord.dest_place,
            '07出張期間': Text(ThisRecord.Bsns_start_date, "yyyy/mm/dd") & Char(10) & Text(ThisRecord.Bsns_end_date, "yyyy/mm/dd"),
            '08持出期間': Text(ThisRecord.start_date, "yyyy/mm/dd") & Char(10) & Text(ThisRecord.end_date, "yyyy/mm/dd"),
            '09持出日数': If(!IsBlank(ThisRecord.start_date), (ThisRecord.end_date - ThisRecord.start_date) + 1),
            '10出発_帰着': ThisRecord.start_place.Value & ThisRecord.start_time & "~" & ThisRecord.end_place.Value & ThisRecord.end_time,
            '11期限切れ時に通知する': If(ThisRecord.notify_expiration = true, "✔️", "✖"),
            '12入門証': varRecordNyuuMonShou.CombinedValues,
            '13車両入門証': varRecordSharyouNyuuMonShou.CombinedValues,
            '14携帯電話': ThisRecord.stat_phone,
            '15通信カード': ThisRecord.stat_wifi,
            '16個人使用PC_NCCOENO': ThisRecord.stat_pc,
            '17その他媒体(外付けHDD)': ThisRecord.stat_other_devices,
            '18持出申請': Text(ThisRecord.stat_out_requesting, "yyyy/mm/dd") & Char(10) & ThisRecord.stat_out_requester,
            '19持出承認': If(
                !IsBlank(ThisRecord.stat_out_approver) && IsBlank(ThisRecord.stat_in_requester) && !IsBlank(ThisRecord.reason_rej),
                "否認" & Char(10) & ThisRecord.stat_out_approver,
                Text(ThisRecord.stat_out_approving, "yyyy/mm/dd") & Char(10) & ThisRecord.stat_out_approver
            ),
            '20持帰申請': Text(ThisRecord.stat_in_requesting, "yyyy/mm/dd") & Char(10) & ThisRecord.stat_in_requester,
            '21持帰承認': If(
                !IsBlank(ThisRecord.stat_in_approver) && !IsBlank(ThisRecord.reason_rej),
                "否認" & Char(10) & ThisRecord.stat_in_approver,
                Text(ThisRecord.stat_in_approving, "yyyy/mm/dd") & Char(10) & ThisRecord.stat_in_approver),
            '22持出情報1': ThisRecord.stat_Info1,
            '23持出情報2': ThisRecord.stat_Info2,    
            '24ファイル添付': Concat(
                LookUp(cltRequest, ID = ThisRecord.ID).Attachments,
                DisplayName & Char(10)
            )
 
        }
    )
);
Categories:
I have the same question (0)
  • Suggested answer
    Jon Unzueta Profile Picture
    1,827 Super User 2025 Season 2 on at
     

    Yes, it’s possible to handle this scenario using Power Automate, but it requires a combination of file system access, parsing logic, and structured data handling. Let’s break down your requirements and how to approach them:


    🧩 Your Scenario Summary

    You have:

    1. A ZIP folder named "Business Trip Take-Out Management Export File" stored in the Downloads folder.
    2. Inside the ZIP:
      • A CSV file with a column named "Attachment" that contains links to files.
      • A folder named "Business Trip Take-Out Management App Attachment".

    You want to:

    • Extract and parse the CSV.
    • Access the attachments referenced in the "Attachment" column.
    • Possibly combine this with data from Power Apps (as shown in your ClearCollect JSON).
    • Export everything into Excel or another structured format.

     Recommended Approach Using Power Automate

    Step 1: Unzip the Folder

    • Use the "Get file content" action to access the ZIP file.
    • Use Encodian or Plumsail connectors (third-party) to unzip files in Power Automate.
    • Alternatively, unzip manually outside Power Automate and place contents in OneDrive or SharePoint.

    Step 2: Parse the CSV File

    • Use "Get file content" on the CSV.
    • Use "Create CSV table" or "Parse CSV" (with custom expressions or premium connectors).
    • Extract the "Attachment" column values.

    Step 3: Access Attachments

    • If the "Attachment" column contains file paths, use "Get file content using path".
    • If it contains URLs, use HTTP GET to download the files.

    Step 4: Combine with Power Apps Data

    • Your ClearCollect JSON can be passed to Power Automate via a Power Apps trigger.
    • Use "Parse JSON" to extract and map the fields.
    • Combine this with the CSV data using "Append to array variable" or "Create HTML table".

    Step 5: Export to Excel

    • Use "Add a row into a table" action.
    • Ensure your Excel file has a predefined table with headers matching your data.

    ⚠️ Notes

    • Power Automate cannot directly access local folders like Downloads — you must move the ZIP to OneDrive, SharePoint, or a cloud-accessible location.
    • If you need to automate from a local machine, consider using Power Automate Desktop.
    🏷️ Tag me if you have any further questions or if the issue persists.
    ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems.
    ❤️ Give it a Like if you found the approach useful in any way.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard