Hi Gents,
New in the Power Automate world. I love everything about this program however having a lot of issues to my first serious flow.
I'm trying to create a Auto Emailer to grab some files from a SharePoint folder using a condition to be equal between the file name for the SharePoint file and a Excel column where we have the file name plus extension. I was able to make this work for files from one drive for business however when taking the files from SharePoint I'm running into issues.
Please check how I have designed the flow:
In the OneDrive version I have used "List Files" after the excel "List rows present in a table" action, and this return an array. However not able to find a alternative for the SharePoint to also return an array of file names, and then check if the excel "Attachment" field is equal with the file in the SharePoint folder. For each file I would like to send a email . The excel table looks like below:
ID | Email Address | CC | Bcc | First Name | Last Name | Subject | Attachment |
1 | first.last1@email.com | First Name | Last Name | Test 1 | first last.xlsx | ||
2 | first.last2@email.com | First Name 2 | Last Name 2 | Test 2 | first last2.xlsx |
I would like to send a email every time in the SharePoint Folder we have a file under the name of a customer and if no files found, no action will be taken.
Can someone assist with some ideas for this flow?
Thanks in advance.
Solved! Go to Solution.
Hey,
in your Send an email (V2) action, you should be able to use the Dynamic content File name with extension from the Get files (properties only) action above the Apply to each loops as Attachment Name... And the use the Dynamic content File Content from the Get file content action...
This way the attachment gets the extension it's supposed to have...
cheers
Hey,
in your Get item content action, could you try to select the Dynamic content Identifier and not ID from the Get file (properties only) action...
does that work?
cheers,
caspar
Hi Caspar,
It does work, the flow runs successfully however the file attached to the email appears as corrupted. I think it does not get the extension of the file and because of this it can not be accessed from the email.
Any idea how to fix this one?
Hey,
in your Send an email (V2) action, you should be able to use the Dynamic content File name with extension from the Get files (properties only) action above the Apply to each loops as Attachment Name... And the use the Dynamic content File Content from the Get file content action...
This way the attachment gets the extension it's supposed to have...
cheers
You were right. Thanks a lot for your prompt reply.
User | Count |
---|---|
85 | |
38 | |
23 | |
20 | |
16 |
User | Count |
---|---|
127 | |
48 | |
46 | |
27 | |
25 |