cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Selina
Frequent Visitor

When a file is created, attach the file to email

Hi all,

 

I am new to MS Power Automate, so still finding my way around.

 

I want to create a flow that:

1. when a pdf file is added to a folder (trigger), then

2. an email with that particular pdf attached will be sent off to people for approval;

3. the recipients will depends on the name of the pdfs

 

I tried to use the template 'Start approval when a new item is added', but it doesn't seem to allow me to attach the file that triggered the flow. I suspect I would need to add some steps in to capture the file as output. However, I don't know what step that should be.

I tried to insert 'Get file metadata', but I don't seem to have an option under 'dynamic content'. 

Any suggestions?

 

Thank you in Advance.

 

Selina

2 ACCEPTED SOLUTIONS

Accepted Solutions

 

Hi @Selina ,

 

You should Fill id in File identifier field of the Get file content action.

 

Best Regards,

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

View solution in original post

 

Hi @Selina ,

 

You only need to fill in the identifier in the File identifier field of the Get file content action.

 

Then configure the File content output by Get file content in Attachment content.

 

Best Regards,

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

View solution in original post

8 REPLIES 8
v-bacao-msft
Community Support
Community Support

 

Hi @Selina ,

 

Please try to create a new flow from blank and refer to the following screenshot to configure flow:

144.PNG

 

Best Regards,

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

Hi @v-bacao-msft Barry,

 

Thank you for your reply. 

I just did a test, but there's an error, so the email wasn't sent. However, I don't understand what this error message mean...

Selina_0-1605497766875.png

 

This is my settings:

Selina_1-1605497891986.png

 

What am I missing?

 

 

Thank you in advance!

 

Regards,

Selina

 

Hi @Selina ,

 

You can try to use Get file content to get the file content, and then fill the file content output by this action into the Attachment content field.

Please try again.

 

Best Regards,

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

Hi Barry @v-bacao-msft 

 

It still doesn't work...

 

I tried to add 'Get file Content', but this error pops up:

Selina_0-1605586578700.png

 

Selina_1-1605586730515.png

 

 

I also tried to add 'file content' to 'Get File Metadata', and remove 'Get File Content', the error in my previous post...

 

 

Any idea?

 

Regards,

Selina

 

 

 

 

Hi @Selina ,

 

You should Fill id in File identifier field of the Get file content action.

 

Best Regards,

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

@v-bacao-msft

Ah Barry, we are making progress! The flow finally can send an email. However, the attachment is blank, i.e. it is showing a pdf attachment in the email, when when I opened it, it's a blank document.  

 

Below is the current setting. What am I missing this time?

Selina_1-1605764645883.png

 

 

Regards,

Selina

 

 

 

Hi @Selina ,

 

You only need to fill in the identifier in the File identifier field of the Get file content action.

 

Then configure the File content output by Get file content in Attachment content.

 

Best Regards,

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

Hi Barry @v-bacao-msft ,

It works!

 

Thank you so much for your help and patience! 

 

Regards,

Selina

Helpful resources

Announcements

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Check out the Copilot Studio Cookbook today!

We are excited to announce our new Copilot Cookbook Gallery in the Copilot Studio Community. We can't wait for you to share your expertise and your experience!    Join us for an amazing opportunity where you'll be one of the first to contribute to the Copilot Cookbook—your ultimate guide to mastering Microsoft Copilot. Whether you're seeking inspiration or grappling with a challenge while crafting apps, you probably already know that Copilot Cookbook is your reliable assistant, offering a wealth of tips and tricks at your fingertips--and we want you to add your expertise. What can you "cook" up?   Click this link to get started: https://aka.ms/CS_Copilot_Cookbook_Gallery   Don't miss out on this exclusive opportunity to be one of the first in the Community to share your app creation journey with Copilot. We'll be announcing a Cookbook Challenge very soon and want to make sure you one of the first "cooks" in the kitchen.   Don't miss your moment--start submitting in the Copilot Cookbook Gallery today!     Thank you,  Engagement Team

Tuesday Tip | How to Report Spam in Our Community

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: How to Report Spam in Our Community We strive to maintain a professional and helpful community, and part of that effort involves keeping our platform free of spam. If you encounter a post that you believe is spam, please follow these steps to report it: Locate the Post: Find the post in question within the community.Kebab Menu: Click on the "Kebab" menu | 3 Dots, on the top right of the post.Report Inappropriate Content: Select "Report Inappropriate Content" from the menu.Submit Report: Fill out any necessary details on the form and submit your report.   Our community team will review the report and take appropriate action to ensure our community remains a valuable resource for everyone.   Thank you for helping us keep the community clean and useful!

Users online (2,687)