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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / When new file is creat...
Power Automate
Unanswered

When new file is created send an email with PDF

(0) ShareShare
ReportReport
Posted on by 29

Hello,

Im trying to pick up the PDF file and send an email whenever there is a new Entry has been inputted. So i have 2 sharepoint list, 1 sharepoint list for records and one sharepoint list for document. The flow should be, when a new entry is created it will find the PDF file base on the ASCET ID(title column) and ASCET ID(PDF file name) ive tried and tested but i got an error on the file name & file attachment "InvalidTemplate. Unable to process template language expressions in action 'Send_an_email_from_a_shared_mailbox_(V2)' inputs at line '0' and column '0': 'The template language function 'base64' expects its parameter to be a string, an object or an array. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#base64 for usage details.'."

 Any idea on this error? Thanks in advance!

NigusInPajamas_0-1700486137476.png

NigusInPajamas_1-1700486316020.png

 

 

Categories:
  • Anchov Profile Picture
    1,986 on at

    One thing I noticed in you flow that could be causing this issue, you can try:

    Anchov_0-1700490434576.png

    Title is not a required field and is typically blank (unless users go out of their way to fill it out). It also doesn't include the file extension, which is needed for this field.


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

    Cheers!
    Rick Hurt

  • NigusInPajamas Profile Picture
    29 on at

    I've tried everything with Name on it still same error

  • Anchov Profile Picture
    1,986 on at

    looking for a "hidden" base64 expression.

    Anchov_0-1700497880954.png

    if you see something that looks like this, try:

    Anchov_1-1700497937026.png

    Anchov_2-1700497947518.png

    Anchov_3-1700497970869.png

    Should look like this:

    Anchov_4-1700497998217.png

     

     

     

  • NigusInPajamas Profile Picture
    29 on at

    Still not working, but is it possible to get the pdf item on Sharepoint document site based from Title column from Sharepoint list?

  • Anchov Profile Picture
    1,986 on at

    Hi @NigusInPajamas, to provide more assistance, I'd need additional screenshots. Regarding your second question, you can filter documents based on the title using an OData filter. This allows you to target a file based on the Title field. Once you've identified the target file, proceed to retrieve the Name and File Content using the other actions in your existing workflow.

    Anchov_0-1700573443491.png

     

  • NigusInPajamas Profile Picture
    29 on at

    Hello,

    Here's my current flow, upon getting to Get file Content it always said that the file cannot be found

    NigusInPajamas_0-1700574803924.png

    NigusInPajamas_1-1700574834514.png

     

  • Anchov Profile Picture
    1,986 on at

    There are three issues with your code above.

    1. The "Get files (properties only)" action returns an array. You'll either need to use an "Apply to each" action to cycle through the array (even if only one file is returned), or use an expression to retrieve the first object of the array. Here's an example expression that I used:

    first(outputs('Get_files_(properties_only)')?['body/value'])['{Identifier}']

    2. The file identifier that the 'Get file Content' action requires is the '{Identifier}' property, not 'ID'.

    3. You should incorporate some error handling to address the scenario where your flow doesn't find a file with the specified title. I usually handle this using a condition and an expression:

    length(outputs('Get_files_(properties_only)')?['body/value'])

    Here is the finished flow (tested and it works)

    Anchov_0-1700577293087.png


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

    Cheers!
    Rick Hurt

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 271

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard