web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send email with files ...
Power Automate
Unanswered

Send email with files from SP folder as attachments with shared mailbox using power automate

(1) ShareShare
ReportReport
Posted on by 2

Hi everyone!
I've been trying to create a flow in power automate to do this simple task but it is being impossible: i need to send an email with an attachment, the file is located in a SharePoint folder that has only 2 .pdf

I've tried all methods(get file/get file content/get file content using path, get file metadata) and all of those steps get the attachment correctly I believe, but once I attach it to the email it says it is null 'Flow Run Failure: One or more fields provided is of type 'Null'.: One or more fields provided is of type 'Null', a different type is expected.'

I tried initializing an array variable with the name and contentBytes and then putting that as the attachment and it does not work either


I have watched and followed all of the existing tutorials online and none have helped me solved the problem, can you please help me?

thank you so much

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,493 Super User 2025 Season 2 on at
     
    To get proper help, you have to share your flow please so we can see what your expressions and actions are, and then the flow run itself and the actions with errors please.
     
    Adding @Tomac as he said the attachment format changed recently too, but that won't account for your nulls.
     
    Please share so we can help you out.
     
    Cheers

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey
  • CU22081309-0 Profile Picture
    2 on at
    Hi Michael! thanks for your answer
    this is my flow
    when I run the flow the outputs for 'Get file content' are 
    $content-type
    application/pdf
    $content
    JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9Ue
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    which I read it means it is getting the file correctly, but once i attach it it shows me 'Flow Run Failure: One or more fields provided is of type 'Null'.: One or more fields provided is of type 'Null', a different type is expected.' 
    and this as code view in the email
     
    i have tried attaching with outputs('Get_file_content')?['body']['$content'] and I get the same error message once tested it

     
  • Michael E. Gernaey Profile Picture
    53,493 Super User 2025 Season 2 on at
     
    Did you resolve this?
     
    I noticed that you are using (or it did) double quotes around the content bytes expression which would make the expression a string, not the value of the expression.
     
    Also, if you are going to use the file content path, I would use get file content using path not the one you are using as I would use the actual file identifier instead.
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard