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 :
Small and medium business | Business Central, N...
Suggested answer

How do I use Purchase Order's document attachments from Business Central in Power Automate?

(6) ShareShare
ReportReport
Posted on by 156
Hello,

After examining Business Central's tables and file management I am trying to create a Power Automate flow to get the attachment (pdf/docx/xlsx/etc.) from a Business Central Purchase Order so that I can fill in a SharePoint "Create file" action that has a site address, folder path and file name field already satisfied in Power Automate.

The problem is that I am having difficulty obtaining the attachments on the Purchase Order, so I currently do not have possession of the file name and their body content to forward to my next planned SharePoint action (create file) at the moment.

Once I get the flow working successfully, the result would be a PDF appearing in SharePoint exactly as found from Business Central,


To better understand what Page and Table I am attempting to tap into, here are their values on Page Inspection:
Page: Document Attachment Details (1173, List)
Table: Document Attachment (1173)


For troubleshooting, I have exhausted the following actions and these values:

Get record (V3) action (Get Item Attachment Names)
Environment (satisfied with tested working values)
Company (satisfied with tested working values)
API category (satisfied with tested working values)
Table name: attachments (test failed with 404 NotFound error) | documentAttachments (test failed with 404 NotFound error)
Row ID: When a record is changed (V3) trigger 'body/Row ID' (dynamic content) (test failed with 404 NotFound error)

Get an image, file or document (V3) action (Get Item Attachment Data)
Environment (satisfied with tested working values)
Company (satisfied with tested working values)
API category (satisfied with tested working values)
Path: items/documentAttachments/attachmentContent (test failed with 404 NotFound error)
ID for 'items': the ID from the above Get Record (V3) action. (test failed with 404 NotFound error)
ID for 'documentAttachments': the Parent ID from the above Get Record (V3) action. (test failed with 404 NotFound error)



Each action above has been satisfied with values proven to be functionally working successfully on other Power Automate actions (for example, getting the Purchase Order's document number was able to actually create a new folder named after the document's number in a specified SharePoint subfolder of my desired site and alternatively skip the folder creation if the folder of the same name already exists in SharePoint inside the SharePoint Condition - Does folder exist control).


This is where my currently flow stops abruptly: Bear in mind that I am testing this with a Purchase Order that I can confirm actually has a document attachment on it.
I cannot add a runafter value to accept a failed value as it is imperative to identify an attachment's name and body content to begin producing the file into SharePoint.


If you can find out which combination or amalgamation of actions to point to the correct table and path, your help is much well appreciated as it will benefit many with a similar problem like this.
I have the same question (0)
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    19,137 Super User 2025 Season 2 on at
    How do I use Purchase Order's document attachments from Business Central in Power Automate?
    If you’re trying to get Purchase Order attachments (like PDFs uploaded manually), they are stored in the Document Attachment (Table 1173), and there is no default API endpoint that exposes this table. To solve this, you'll need to create a custom API page in AL that exposes the Document Attachment (Table 1173) for Purchase Orders. Once the custom API is created, you can call it from Power Automate to retrieve attachment details (like file name and content) and then use that data to upload the file to SharePoint. This will allow you to automate the process of managing attachments for Purchase Orders.
  • Suggested answer
    YUN ZHU Profile Picture
    92,443 Super User 2025 Season 2 on at
    How do I use Purchase Order's document attachments from Business Central in Power Automate?
    There is no Document Attachments feature in the BC standard API, only Incoming Document (table 130), so it cannot be done using Power Automate. . .
     
    Hope the following can give you some hints.
    How to automatically upload files from OneDrive to Business Central with Power Automate (No customization)
     
    Thanks.
    ZHU

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,132

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 3,615

#3
Sumit Singh Profile Picture

Sumit Singh 2,912

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans