cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Flow Idea can this work

I have an Idea for a flow that would make office operations easier.

Connectors are Onedrive for business and outlook.  The flow might need others.

 

1. A named file (PDF) is dropped into a OneDrive for B folder and the trigger begins as a portion of the file name being recognized. (same as the folder plus a second name separated by a -  that are not recognized but help with distinction.)

2. The name of the file is then associated with a specific email address that the file will be sent to via attachment. Email Fax (ie metrofax) so email address would look like 14444444@metrofax.com for example.

3. An attached template letter (like a greeting would be the facesheet.)

4. The name of the folder would be inserted into a specific area of the template to personalise the template letter.  The separated name would (-) now be significant and also added to the template in a specific area for personalization of the template letter.

ie.  Hello Mr. (1st file name) we met Ms. (second name) today...........

5.  The face sheet and the file would then be attached to the email/fax and sent.

6.  The flow could be reused just by creating a new named folder (for the same name+ (- name)  file drop) and adding the 14444444@metrofax.com new number.

 

Does anyone have a better way of doing this? Simpler maybe.  If one flow that fits all can be achieved that would be great too.

Thanks for your input in advance.

7 REPLIES 7
Highlighted
Community Support
Community Support

Re: Flow Idea can this work

Hi @drlea12 ,

 

Do you want to send an email with attachment when a file is created in OneDrive for Business folder?

 

About last step, do you want to rename the file? Could you share more details on this point?

 

I have created a simple flow for your scenario, please check it for a reference.

 

Add the trigger When a file is created (Properties only), get file content of the file.

 

Add the action Send an email, fill in subject filed, and for the body field, I will attach the content of the greeting letter.

 

To get the first part of the file name, use the following function:

first(split(triggerBody()?['NameNoExt'],'-'))

 

To get the second part of the file name, use the following code:

first(skip(split(triggerBody()?['NameNoExt'],'-'),1))

 

And add the file as attachment.

 

An image for your reference.

1.PNG

2.PNG

 

Best regards,

Mabel

 

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Regular Visitor

Re: Flow Idea can this work

Do you want to send an email with attachment when a file is created in OneDrive for Business folder?

Yes the actual file and the template letter with the first name of the file and the second name of the file, separated by a hyphen or colon, placed in a specific sentance in the text of the template letter would be sent by fax email.  The email address would be 1#######@metrofax.com (In my case).  The email name would be changed for each separate onedrive folder that runs the flow.  The first name will be used as the trigger.

 

About last step, do you want to rename the file? Could you share more details on this point?

The file does not need to be renamed (by the flow) as long as I can put identifying information in the file name that is distiguishing. For instance John-Smith (first file) then John-Smith202 (second file) and get the same outcome.

 

Thank you for being so detailed.  Much appreciated.

Highlighted
Regular Visitor

Re: Flow Idea can this work

Also Mabel, Does this solution allow me to create a second PDF file that would replace the body section of the email with the PDF template that will recieve the two names?  The body section of the email face sheet does not allow for formatting.

Highlighted
Regular Visitor

Re: Flow Idea can this work

1. A named file (PDF) is dropped into a OneDrive for B folder and the trigger begins as a portion of the file name being recognized. (same as the folder plus a second name separated by a -  that are not recognized but help with distinction.)

2. The name of the file is then associated with a specific email address that the file will be sent to via attachment. Email Fax (ie metrofax) so email address would look like 14444444@metrofax.com for example.

3. An attached template letter (like a greeting would be the facesheet.) (This would be a template PDF letter to be sent as a second attachment along with the original file.  It would recieve the two names of the file (letters only no numbers) in specific areas on the template)

4. The name of the folder would be inserted into a specific area of the template to personalise the template letter.  The separated name would (-) now be significant and also added to the template in a specific area for personalization of the template letter.

ie.  Hello Mr. (1st file name) we met Ms. (second name) today...........

5.  The face sheet and the file would then be attached to the email/fax and sent.

6.  The flow could be reused just by creating a new named folder (for the same name+ (- name)  file drop) and adding the 14444444@metrofax.com new number.

Highlighted
Community Support
Community Support

Re: Flow Idea can this work

Hi @drlea12 ,

 

Thanks for updating.

About #3, I am afraid that it might be not possible to insert the name of the folder into a specific area of the template.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regular Visitor

Re: Flow Idea can this work

Thank you Mabel.  Is it possible to have a templated letter (PDF) as the face sheet for the file (PDF) that is to be placed in the folder and trigger the flow?  The goal would be to have the templated facesheet attached to each individual (and unique) PDF file placed in the folder and have the two sent as an attachment through the email. Templated Face sheet+Each new unique file.  I would do multiple runs of this flow.

Highlighted
Community Support
Community Support

Re: Flow Idea can this work

Hi @drlea12 ,

 

Yes, it would be possible to be achieved.

 

You could trigger you flow by newly added files, then get the file metadata and file content of the static template letter, and sending the email with the two files attached.

 

Please take a try with it on your side.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (5,519)