Hi, I would like some assistance in removing unnecessary steps or simplifying the flow. I'm going to add alot more email recipients with different keywords and dont want it to become unmanagable.
The flow basically does this:
1. List files in Onedrive folder
2. Grab files with one or more specific keywords and add as attachment
3. Move the grabbed files to a "Sent" folder
4. Send those files to a unique email-adress
5. If no files with a specific keyword are found, the email should NOT be sent to that person.
I think I got the flow working as intended now but I will have to accommodate for hundreds of different combinations of keywords and over 40 different "Send email"s.
Issues I had was the email sending several times, so I moved it out of the loop and added "check if appended array contains 1 or more items" to stop sending empty emails. I had to add a condition for checking isFolder as it broke when trying to add folder as an attachment (Sent folder is a sub-folder and is listed as an item when listing files)
Hey @Anonymous,
My go to solution would be to have a list with all the Keywords you want to look for. Once you have that, you can List Files with that specific keyword by using OData Filters.
EDIT: About the "Send Email" action. If the recipient/s of the email varies based on the Keyword you are looking for, you could also add the recipients to the list. Example:
Keyword 1 | Recipient 1 |
Keyword 2 | Recipient 2 |
Keyword 3 | Recipient 3 and Recipient 4 |
I'm not sure if that approach fits your needs, but let me know if it does and I could provide you with a more detailed solution for your requirement.
Kind Regards,
Valero
Hi, thanks for the tip.
The problem is that there are.. alot. I'm not sure I'm ready for automating recipients yet.
The reports are pdf, sometimes along with jpgs (with the same keywords). About 30-40 emails are sent each morning at the same time.
To get it right I'm using two sets of keywords (Events and Locations). Some recipients want all reports from a specific location, but not all events. Some want all reports about certain events regardless of location. To further complicate it, the CC's are not always the same, but to To: field is mostly just one person or a set group of people matched to a certain combination.
So basically:
Recipient | Location | Events |
Rec1 | Loc1 | Ev1-Ev4, Ev7-11 |
Rec2 | Loc2 | All events |
Rec3 | All locations (added CCs for Loc5-10) | Ev1, Ev2 |
And so on.. About 20 different recipients/combination of recipients recieve almost 95% of the reports. The outliers will have to be manually sent.
Edit: And there will have to be separate emails for several reports even if they are to the same person if there are different sets of Ev/Loc combinations. The subject should describe the Ev+Loc (I have Dynamic Filename as subject). Only identical Ev+Loc combination reports can be sent in the same email to the same person.
... How do I get the file content from onedrive matching only the keywords I filtered from the sharepoint list? Seems condition works better then odata here. Do I have to upload all files to the sharepoint list just to fetch them again to the emails?
User | Count |
---|---|
88 | |
43 | |
21 | |
18 | |
16 |
User | Count |
---|---|
132 | |
48 | |
42 | |
36 | |
28 |