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 add an attachment to a Purchase Invoice Line via Power Automate / Flow?

(1) ShareShare
ReportReport
Posted on by 321
Hello -- hoping somebody can help with this flow.

I'm creating a Purchase Invoice with corresponding Purchase Invoice Lines, and I want to attach an image of a receipt to the Purchase Invoice Line. 

I can get the content into flow and BC, but I'm missing a step when it comes to adding the attachment.
 
My flow uses this step:
 
//
I can find the path for PurchaseInvoiceLines/item/documentAttachments/attachmentContent, and I'm passing the ID of the purchaseInvoiceLine and the content, but I have no idea what to use for the documentAttachments ID.
 
I tried creating a documentAttachment record, but purchaseInvoiceLine isn't one of the valid Parent Types, so I can't create a documentAttachment to get the ID.
 
Any ideas how this is intended to work? 

Any ideas / suggestions are appreciated.
 
Thanks!

Garrett
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    89,830 Super User 2025 Season 2 on at
    How do I add an attachment to a Purchase Invoice Line via Power Automate / Flow?
    Hi, unfortunately, as far as I know so far, the standard attachment API is Incoming Document (table 130), not Document Attachment (table 1173).
    More details:
     
    If you need to add attachments, you need to customize a new API. Here is a simple example for web service.
     
     
    Hope this helps.
    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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,899 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,444

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,304

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans