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

SharePoint PDF arrive in email as type FILE

Hello! 

Currently, I'm working on conditionally attaching PDF documents from a SharePoint list to an email. 


Jesserboy2020_4-1600803108063.png

 

Because there are multiple documents, and set conditions as if if they should be attached, I've set up the following flow that updates an array for attachments, and sends an email: 

 

Jesserboy2020_1-1600802911537.png

 

Jesserboy2020_2-1600802973142.png

 

The flow works, yet when the files arrive in the emails, they are Type File: 

Jesserboy2020_3-1600803046168.png

Jesserboy2020_0-1600804032685.png

 

Is there a way to ensure that they arrive as PDFs, which they are in SharePoint? 

Thank you for all your help!

8 REPLIES 8
Highlighted
Impactful Individual
Impactful Individual

Re: SharePoint PDF arrive in email as type FILE

Hello Team,

 

There sure is, can you share across a screenshot of your Send an email action, how you have configured it and I will tell you how to make sure that the file you send via that action is PDF.

 

Awaiting response..

Highlighted
Frequent Visitor

Re: SharePoint PDF arrive in email as type FILE

Here is a screenshot: 

Jesserboy2020_0-1600803715798.png

 

Highlighted
Impactful Individual
Impactful Individual

Re: SharePoint PDF arrive in email as type FILE

Hello Team,

 

Are you dynamically creating a PDF, I cannot see any action where you are trying to fetch the Attachment, can you explain more because I can see a variable being passed to the Send an Email action that holds the attachments.

 

How are you creating that Attachments variable ?

 

Highlighted
Frequent Visitor

Re: SharePoint PDF arrive in email as type FILE

The array is initialized in this step: 

Jesserboy2020_0-1600805523236.png


Then, when the condition is met, it triggers the grabbing of a specific file: 

Item 1: 

Jesserboy2020_1-1600805638527.png

Item 2: 

Jesserboy2020_2-1600805690997.png

 

Is this what you're looking for? 

Highlighted
Impactful Individual
Impactful Individual

Re: SharePoint PDF arrive in email as type FILE

Hello Team,

 

That's it, this is what I wanted.

 

Now all you have to do is change the Name from FactFinder to FactFinder.PDF and similarly NeedAnalysis to NeedAnalysis.PDF

 

yashkamdar_0-1600805859364.png

 

 

When I used to do this where the Name of my file used to come from a Dynamic content, I used to use a Concatenate expression to append .PDF at the end but in your case you can simply hard code .PDF at the end of the file names because you are explicitly naming your Files.

 

yashkamdar_1-1600805970368.png

 

This should definitely solve your issue out.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

Highlighted
Frequent Visitor

Re: SharePoint PDF arrive in email as type FILE

Please ignore.

Highlighted
Impactful Individual
Impactful Individual

Re: SharePoint PDF arrive in email as type FILE

Hello Team,

 

You still need to pass the Content bytes, only passing the name will not suffice.

 

So to be very clear here is what you need to do is just modify the Name from FactFinder to FactFinder.PDF, you will still need to pass the ContentBytes because that is what holds the actual file content.

 

{
	 "Name": "FactFinder.PDF",
	  "ContentBytes": FileContent

}

 

 

Do the exact same thing for NeedsAnalysis.

 

If you are finding this difficult to follow, check your private message, I have dropped an email over there.

 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

Highlighted
Impactful Individual
Impactful Individual

Re: SharePoint PDF arrive in email as type FILE

Hello Team,

 

I figured this out, there was a slight mistake.

 

 

Here is what you need to do

 

{
	 "Name": "FactFinder.PDF",
	  "ContentBytes": outputs('Get_file_content')?['body']?['$content']

}

 

 

Can you please use this in both the expressions and let me know if this works. This has to work.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (6,172)