top of page
Writer's pictureAlan Campbell

Power Automate: Business Central Document Attachments

Updated: Oct 30, 2023

Being able to attach documents to Microsoft Dynamics 365 Business Central records using Microsoft Power Automate provides you with more software design options. You can attach documents to Business Central records using workflows based upon triggers or embed your document workflow into a real-time Microsoft Power App. The possibilities are limitless.


Let's look at an example of how you can attach an order confirmation document to a Business Central sales order using Power Automate.


1. Go to My Flows under Power Automate and click on Instant cloud flow.

Microsoft Power Automate Workflow Creation
Create a Power Automate Workflow

2. Enter your flow name and click on Manually trigger a flow. Then press the Create button.


3. For this example I am using a document stored on Microsoft OneDrive. Insert a OneDrive for Business / Get File Content step. Select the file that will be attached.

Get file content in Power Automate using the Microsoft OneDrive
Microsoft OneDrive Get File Content

4. Next we need to select a Business Central sales order. Insert a Dynamics 365 Business Central / Get Record step. I used a GUID from an existing sales order as the Row id.

Get a Microsoft Dynamics 365 Business Central Sales Order
Get a Business Central Sales Order

5. Add a Business Central / Create Record step that will create a record in the documentAttachments table. Make sure to enter the Parent Type as Sales_x0020_Order and use the Id from the sales order for the Parent Id.

Create a Microsoft Business Central documentAttachments record using Power Automate
Create a Document Attachments Record

6. For our last step we will add a Business Central / Update an image, file or document step. This step will attach the document content to the documentAttachments record that we created in the last step. Enter the Id from the documentAttachments record and select the Body from the retrieved document in the Content field.

Attach file content to a Business Central documentAttachments table
Attach the Document Content

We are done. This workflow will now attach your file to the Business Central sales order.

1,496 views2 comments

© 2023 Bluedialog LLC. All rights reserved.

bottom of page