admin管理员组文章数量:1389204
I created an excel file (excel file 1) using a simple macro which collects information such as "Full Name", "Work Stream ID", and a path to a different excel file for each employee which collects all the relevant information about the hours worked for each month (Timesheets). I'm a beginner PowerAutomate user, and now I want to create a workflow in PowerAutomate which sends and email to the person responsible for each workstream, which has the relevant timesheets for the employees which worked for this specific workstream attached. Some employees work for multiple Work Streams. My question is: How can I put these corresponding timesheets in an array so I can then attach in my email? Do I need intermediate steps like first grouping the corresponding timesheets and put them in a folder, or saving these groups as a zip file to then attach them in groups? Has someone done something like this before and is able to help?
This is what I have tried so far. I want to manually trigger this flow. I'm at the point where I now successfully grouped the rows in excel file 1 by the value Workstream using PowerAutomate. Now I want to copy the files which correlate to the workstream into an email. There are 13 workstreams and I am fine with using 13 different conditions (if there's a prettier way, I'm open for suggestions). My problem is: The files I want to attach are only referenced with a path to the actual files in sharepoint in my excel file 1. How do I copy these files into my email body?
enter image description hereThis is how I grouped the rows of excel file 1.
I found this link of someone doing something similar. Maybe this will help.
I created an excel file (excel file 1) using a simple macro which collects information such as "Full Name", "Work Stream ID", and a path to a different excel file for each employee which collects all the relevant information about the hours worked for each month (Timesheets). I'm a beginner PowerAutomate user, and now I want to create a workflow in PowerAutomate which sends and email to the person responsible for each workstream, which has the relevant timesheets for the employees which worked for this specific workstream attached. Some employees work for multiple Work Streams. My question is: How can I put these corresponding timesheets in an array so I can then attach in my email? Do I need intermediate steps like first grouping the corresponding timesheets and put them in a folder, or saving these groups as a zip file to then attach them in groups? Has someone done something like this before and is able to help?
This is what I have tried so far. I want to manually trigger this flow. I'm at the point where I now successfully grouped the rows in excel file 1 by the value Workstream using PowerAutomate. Now I want to copy the files which correlate to the workstream into an email. There are 13 workstreams and I am fine with using 13 different conditions (if there's a prettier way, I'm open for suggestions). My problem is: The files I want to attach are only referenced with a path to the actual files in sharepoint in my excel file 1. How do I copy these files into my email body?
enter image description hereThis is how I grouped the rows of excel file 1.
https://learn.microsoft/en-us/microsoft-365/community/power-automate-send-sharepoint-files-as-attachments I found this link of someone doing something similar. Maybe this will help.
Share Improve this question edited Mar 17 at 16:39 user29975189 asked Mar 14 at 15:49 user29975189user29975189 11 bronze badge 5- When initializing the array in the start, make sure it's type is selected to Array and value is set to ' [ ] ' (empty square brackets). sometimes, reselecting Array datatype fixes underlying bugs. – Laviza Falak Naz Commented Mar 17 at 6:13
- Thank you @LavizaFalakNaz. I corrected this mistake and revised my flow as a whole. – user29975189 Commented Mar 17 at 10:29
- You mean to say that excel file 1 contains a list of paths and you need to attach files in all those paths to your email? – Laviza Falak Naz Commented Mar 17 at 11:10
- @LavizaFalakNaz yes. Excel file1 has a list of paths to different Excel files in sharepoint and I want to attach the contents of these paths in my email – user29975189 Commented Mar 17 at 14:11
- Please check the answer. i have posted valid solution. Thankyou – Laviza Falak Naz Commented Mar 18 at 9:17
1 Answer
Reset to default 0We start by fetching the list of paths from Excel. If you already have them in flow, good. if not, use this function to fetch the paths.
here's what my excel looks like:
fetch all rows:
Then, use 'Get content by Path' by sharepoint to fetch content for each file and push to your attachments array.
Add to array:
Then add the variable to the email:
Here's the final email:
本文标签:
版权声明:本文标题:sharepoint - Attaching multiple excel files to different mails based on a specific cell values (preferably in PowerAutomate) - S 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744645318a2617366.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论