Starting from this week, the Power Automate connector for Dynamics 365 Business Central adds new actions for handling images and attachments and these new actions are available on all regions. I previewed these new actions in Microsoft Italy one at the partner events in end of November, but now we can share more details about that.
The newly added actions are the following:
and they essentyally add the following:
- ability to access and update media type fields
- ability to access related files from documents (attachments or PDF files)
How can I use these actions?
Here some scenarios where these actions can be useful:
Adding images to records
Imagine that for every created new Customer record, you want to automatically add a new picture taken from an image file that you have on Onedrive. You can create the following workflow:
The new Update an image, file or document (V3) action permits you to select the Path of the Customer’s picture record (Media field) and you can then pass the content to it.
Saving PDF documents
You can use the new Get an image, file or document (V3) action to save a PDF file of a document (for example a Sales Invoice record) to Onedrive in the following way:
I think they’re a very nice (and top requested) additions to the Dynamics 365 Business Central connector. Now it’s up to your fantasy to use them in your flows…
This looks very useful, as I have been struggling to add a pd attachment via Power Automate. My only issue is that I am trying to attach to a custom table. is this possible? Can I create a custom API that would be available here?
Thanks
LikeLike
Yes it can work with custom APIs too.
LikeLike
Dear Stefano, thanks for the post. However we struggle when accessing other attachments for sales invoice, like an additional uploaded PDF. The path to choose is not clearly explained. We try “attachments/attachmentContent” and SystemID of the attachment. Do you have an example for this?
LikeLike
Can you please explain with more details what you want to do? Do you want to add an attachment to a sales invoice?
LikeLike
Thank for for the post. I’m having a similar issue to Alex noted above. In my case, during Purchase Order Approval, the client wants the email to include any attachments that are attached to the Purchase Order. I’m trying purchaseOrders/attachments/attachmentContent and continue to get errors. I have the GUID for the Purchase Order and the GUID for the attachment record from Document Attachments (1173) but that doesn’t work. Any help is much appreciated. Thank you.
LikeLike
Hi. this function works for Attachments in terms of “Incoming Documents”, so the GUID you need is from Incoming Document (Table 130)
LikeLiked by 1 person
That table doesn’t hold documents that are attached to other records so it sounds like this function won’t work for my case. Am I understanding that correctly? Thanks!
LikeLike
Attachments are not natively exposed via APIs now. The standard action works for Incoming Documents.
I will post a sample here.
LikeLike
I’m trying to do the same thing. Have you figured it out? The article at this link indicates what we’re trying to do should be possible. https://learn.microsoft.com/en-us/dynamics365-release-plan/2022wave2/smb/dynamics365-business-central/power-apps-power-automate-support-document-attachments
LikeLike