Hi,
I'm trying to move attachments from Dynamics notes to Sharepoint folder with flow.
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...
Thanks in advance for your help.
Marcin
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.
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!
Hi @wak80 ,
Please see this blog post
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
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsUnfortunetly 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.
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.
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
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsHi @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.
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.
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
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsHi @wak80
Please see the flow screenshot below:
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!
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:
Hope it helps.
Best Regards,
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
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogPower Automate Video TutorialsHi,
@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 definition
Flow log
Error while opening Word file
Hi @wak80 ,
Regarding the inability to use some of the Dynamic content directly in the expression designer, this is the case, not all Dynamic content can be directly referenced.
If you cannot use the expected Dynamic content, you could directly get the expression corresponding to Dynamic content by Peek code, and then fill it in the expression designer.
For example, to obtain the expression corresponding to Document, you can first fill the Dynamic content in Compose, and then click peek code to get the expression.
In addition, I did a test on my side, I can use base64ToBinary() function to get the contents of the file and format it.
Please check if Word file in Notes can be opened normally and is a valid file. You could also test with the new word file.
Word file stored to SharePoint Library:
Expression:
base64ToBinary(items('Apply_to_each')?['documentbody'])
Best Regards,
Hi @v-bacao-msft,
On my tenant it's not working. I raised ticket in MS support on Friday and this ticket was forwarded to product group. I will let you know what is the outcome.
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
87 | |
57 | |
41 | |
37 | |
33 |
User | Count |
---|---|
88 | |
72 | |
64 | |
59 | |
38 |