Hello,
I've been tasked with creating a flow that will send an email to all our staff with custom attachments.
A typical attachment would be in this format: "John.Smith-123456789.PDF" (FirstName.LastName-EmployeeNumber)
As we have approximately 1500 staff there are cases where we have duplicate names so simply cannot extract the name from the file and match it to a username.
I had a theory that if we have a list of All names, email addresses and employee numbers we could then match the employee number in the filename against the one in the list and send an email to the email address associated with the employee number attaching the PDF file.
What is the best way of doing this as I dont yet have the PDF files.
This is how my current flow looks.
Hi @sudosaurus,
You could refer to the following steps to create your Flow:
Step 1: Create the trigger When a file is created in the library.
Step 2: Process the file name without extension "John.Smith-123456789", to get the Employee Number "123456789" by using the expression - split(triggerBody()?['{Name}'],'-')[1]
Step 3: Use the Employee number to find the Employee item in the Employee list by using Get items with the Filter Query.
Step 4: Get the file content from the trigger.
Step 5: Send email according to the Email address from Employee list.
Please have a try, I hope it can help you.
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @sudosaurus
Has your problem been solved?
If your problem has been solved, You could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!
Best Regards,
Community Support Team _ Lin Tu
User | Count |
---|---|
102 | |
40 | |
28 | |
23 | |
16 |
User | Count |
---|---|
132 | |
52 | |
50 | |
36 | |
24 |