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 / Moving notes documents...
Power Automate
Unanswered

Moving notes documents from Dynamics to Sharepoint folder

(0) ShareShare
ReportReport
Posted on by 21

Hi, 

 

I'm trying to move attachments from Dynamics notes to Sharepoint folder with flow.

1.png

Unfortunetly there is an issue. There is no option to pick Document Body in File Content field from Dynamic Content in Create file action step. However there is such option in File Name field...

2.png

Thanks in advance for your help.

 

Marcin

Categories:
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @wak80 

     

    You might want to use the CDS connector to do this. Also, please see the blog post below to copy attachments from CDS to Sharepoint. 

    https://powerusers.microsoft.com/t5/Microsoft-Flow-Community-Blog/How-to-copy-attachments-from-the-CDS-to-SharePoint-Online/ba-p/294759

     

    Hope this Helps!

     

    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!

  • abm abm Profile Picture
    33,004 Most Valuable Professional on at

    Hi @wak80 ,

     

    Please see this blog post

     

    https://community.dynamics.com/365/b/dynamicscrmconsultant/posts/part-2-use-microsoft-flow-to-move-notes-attachments-from-dynamics-365-to-sharepoint

     

    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

     

  • wak80 Profile Picture
    21 on at

    Unfortunetly the blog posts do not answer my issue. Changing connector also does not change anything - documentbody value needed in base64tobinary function is not available to choose.

  • abm abm Profile Picture
    33,004 Most Valuable Professional on at

    Hi @wak80 ,

     

    Thanks for your reply.

     

    Not sure what you meant by the chainging the connector.

     

    Please see below. Click tab Expression. Start typing base64 as you can see the options available.

     

    b.png

     

    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

     

  • wak80 Profile Picture
    21 on at

    Hi @abm,

     

    By changing connector I mean changing Dynamics 365 get items step to CDS get items step for fetching notes - it was suggested in @yashag2255 answer.

     

    I know that to sucessfully move document from Dynamics note to SharePoint folder I should use base64tobinary function. The issue is thatdocument body value is not available to select on dynamic values list to pass as it should be passed as parameter to base64tobinary function. Values that are possible to select are shown on the second image in my original post.

  • abm abm Profile Picture
    33,004 Most Valuable Professional on at

    Hi @wak80 ,

     

    Thanks a lot for your reply and good explanation.

     

    I did tried to setup a similar flow like yours and I managed to upload the document attachment sucessfully to SharePoint from CRM notes attachment.

     

    Here is my flow step. Please note I am only showing the foreach loop only.

     

    d.png

     

    Yes agreed that it doesn't show the document content from the default list. The trick is start typing the property name under Dynamic content. It will show the relevant property.

     

    If you have any questions please let me know.

     

    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

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @wak80 

     

    Please see the flow screenshot below:

    bbs.PNG

     

    You can achieve this using the Dynamics connector too. 

     

    Note: Ensure that you use the condition to check if the note is an attachment or it will keep failing for creating the item in sharepoint. 

     

    Hope this Helps!

    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!

  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @wak80 ,

     

    Please use the expression below to configure File content field.

    If we only use Document to configure the File content field, files uploaded to SharePoint may not open properly.

    Expression reference:

    base64ToBinary(items('Apply_to_each')['documentbody'])

    Image reference:

    37.PNG

    Hope it helps.

     

    Best Regards,

  • abm abm Profile Picture
    33,004 Most Valuable Professional on at

    Hi @wak80 ,

     

    Did any of these answers were helpful? 

     

    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

     

     

  • wak80 Profile Picture
    21 on at

    Hi, 

    @abm @yashag2255 @v-bacao-msft  many thanks for your answers. 

    1. I can use search for finding Document in dynamic content

    2. Using expression designer I cannot use this field - for me it's a bug that should be fixed by Ms

    3. I wrote expression that @v-bacao-msft suggested

    4. I tested flow: flow ran susccesfully but despite using base64ToBinary function I cannot open the word file Flow definitionFlow definitionFlow logFlow logError while opening Word fileError while opening Word file

     

     

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
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 130

Last 30 days Overall leaderboard