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 :
Finance | Project Operations, Human Resources, ...
Suggested answer

Automatically generate an invoice pdf to a sharepoint folder

(4) ShareShare
ReportReport
Posted on by 24
I am trying to set up power automate flow that will generate an invoice pdf to a sharepoint folder when an invoice gets created from a sales order in D365 finance and operations. Is this possible and does anyone know the step by step instructions for doing this. I know there is a sales order business event trigger when an invoice gets created under the finance and operations connector, but I am having difficultly finding instructions, an example, or a demo video on the web related to doing this.
Categories:
I have the same question (0)
  • Suggested answer
    Olufemi 7 Profile Picture
    4 on at
    Automatically generate an invoice pdf to a sharepoint folder

     

    Hello @JD-12031334-0,

    Yes, this is possible using Power Automate, Dynamics 365 Finance and Operations, and SharePoint Online.

    Below is a step-by-step guide based entirely on Microsoft Learn documentation, along with a breakdown of compatible technologies and how you can demo each step.

     Step-by-Step Instructions

    1. Enable Business Events in D365 F&O

    • Go to System administration > Setup > Business events > Business events catalog

    • Enable the Sales order invoice created event 

      Microsoft Docs: Business Events Overview

      •  

      2. Create a Power Automate Flow

    • Use the “When a Business Event occurs” trigger from the D365 F&O connector
    • Select your environment and legal entity
    • Choose the Sales order invoice created event
            Microsoft Docs: How to use business events with Power Automate Flow
     
     
    3. Add a Parse JSON action to extract invoice details
    • Use a sample payload from the business event catalog to generate the schema
    • 4. Populate a Word Template
    • Create a Word invoice template with placeholders like {{InvoiceNumber}}, {{CustomerName}}
    • Use the “Populate a Microsoft Word template” action
           Microsoft Docs: Word Online (Business) Connector       

    5. Convert Word to PDF

    • Add the “Convert Word Document to PDF” action

    6. Save PDF to SharePoint

    Use the “Create file” action from the SharePoint connector
    Save the PDF to your target SharePoint folder
     
    • Compatible Microsoft Technologies
     

    Component

     

    Role

     

    Dynamics 365 Finance and Operations (D365 F&O)

     

    Source of the invoice and business event trigger

     

    Power Automate

     

    Workflow engine to automate the process

     

    SharePoint Online

     

    Destination for storing the generated PDF

     

    Microsoft Word (Online)

     

    Used for the invoice template

     

    AI Builder (optional)

     

    For extracting invoice data from scanned documents

     

    Not Compatible With

    This setup won’t work with:  
    • Non-Microsoft ERP systems (e.g., SAP, Oracle) unless heavily customized
    • Offline or desktop-only versions of Word or SharePoint
    • Third-party automation tools (e.g., Zapier, Make) without custom connectors
    • On-premises versions of Dynamics AX or SharePoint without cloud integration





















     



















     
       
       
       
       
       
       
     

     

     

     

     
  • Sohaib Cheema Profile Picture
    48,656 User Group Leader on at
    Automatically generate an invoice pdf to a sharepoint folder
     
    There is a business event in Dynamics 365 called SalesInvoicePostedBusinessEvent, which triggers when a sales invoice is posted. This event notifies you that the invoice has been posted — but at this point, you may also want the PDF version of that invoice.
    However, generating and retrieving the PDF isn't straightforward in Dynamics 365. Here’s why:
     
    1) Invoices can be posted without generating or saving a PDF in the Dynamics system.

    2) Dynamics 365 supports saving reports directly to SharePoint, but this requires SharePoint to be configured in the system. and thereafter, users must manually save the invoice PDF to a location like the Archive or directly to SharePoint.

    3) Print management can be configured in the Dynamics system to automatically save posted invoices to SharePoint or another destination. This setup is managed in the Print Management Settings.
     
    4) Invoices can be posted in batch jobs in the Dynamics system, meaning there's no user interaction involved in saving or printing the document.

    Due to the flexible and sometimes complex invoicing process in Dynamics, multiple solutions are possible. Here is one example:
    When an invoice is posted and the SalesInvoicePostedBusinessEvent is triggered, you can extend the payload to generate the invoice PDF, convert it into a Base64-encoded stream, and include it in the event payload. This way, the same event that notifies you of the invoice posting also delivers the PDF content with the payload.
     
     
  • Adis Profile Picture
    5,687 Super User 2025 Season 2 on at
    Automatically generate an invoice pdf to a sharepoint folder
    Hi,
     
    which framework are you using to create the invoices? Is it electronic reporting (ER), SSRS or a third party software?
     
    ER and also third party software have the ability to store invoices on a sharepoint once its created.
     
    Besides that have you started or tried using Power automate (PA), if so, can you show us what you have so far and where are stuck at?
     

    Kind regards, Adis

     

    If this helped, please mark it as "Verified" for others facing the same issue

    Keep in mind that it is possible to mark more than one answer as verified

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,239

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 903 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 604 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans