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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Create file on SharePoint from Email Attachment (Template Error)

(0) ShareShare
ReportReport
Posted on by 432

Hello All,

 

I've made a flow that goes off on the trigger 'when a mail arrives' and saves the email as .eml and the attachments in a folder on SharePoint.

 

Now I had to adapt the flow to work on a shared mailbox, so ive created a new flow but with the 'when a mail arrives in a shared mailbox' trigger.   However now I am unable to save my attachments to Sharepoint.

 

These are the relevant flow blocks:

example.png

simply put: if  Attachments Name ends with PDF the file is saved.   File name = Attachment name,  File content = Attachment content.  

 

This used to work but now i am receiving a template error as such:

 

InvalidTemplate. Kan de sjabloontaalexpressies niet verwerken in de invoer voor de actie Bestand_maken_8 op regel 1 en in kolom 2800: Voor de sjabloontaalfunctie base64ToBinary wordt verwacht dat de parameter een tekenreeks is. De opgegeven waarde is van het type Null. Ga naar https://aka.ms/logicexpressions#base64ToBinary voor informatie over het gebruik..

Rough translation:
Invalid Template. Can't proces the template language expression in the input for the action 'create_file_8' on rule 1 and in colum 2800: For the template language expression base64ToBinary a string parameter is expected; The given input is of type Null. Go to blabla etc for info. 

 

 

So it seems that I'm not getting the mail's attachment contents at all since it says its null.. (i guess).

And Yes: In the trigger advanced options i selected 'Yes' on add attachments.

yes.PNG

 

What can i do to save my files to SharePoint with this flow again? (with the shared mailbox trigger)

I have the same question (0)
  • Verified answer
    gjeh Profile Picture
    432 on at
    Re: Create file on SharePoint from Email Attachment (Template Error)

    What i've noticed is that all in the Body element of the trigger block a maximum of only 2 attachments show up.

    If i delete all images in my signature before sending the mail it does work. So there is still quite an issue right there as you can't expect everyone to always delete their signatures, and there will be cases where a mail contains several pdf attachments.

     

     

  • alrezac Profile Picture
    on at
    Re: Create file on SharePoint from Email Attachment (Template Error)

    Hi,

     

    Thank you for your post. It looks like you were able to get this figured out on your end. This is definitely odd. I will reach out to some resources on my end and see if maybe this is some kind of known issue. 

     

    Regards,

     

    Alex

     

    -------

     

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 614 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 401 Moderator

#3
chiaraalina Profile Picture

chiaraalina 282

Last 30 days Overall leaderboard