A few months ago someone asked if if it was possible, using Power Automate, to get documents from Business Central, for example in pdf format and them email them or save them somewhere.
At that time I did a few tests and discovered it was simply not possible, using the standard apis. However, with the recent update, it is now very easy todo…
Let’s start with an example.
In Power Automate I’ll create a new flow, an Automated Cloud Flow:
And use the trigger: When a record is created:
Then I’ll use the salesInvoices api as an example:
When a salesinvoice is created, I want to get that record:
Now that we have the record of the invoice that was created, let’s get its document:
Now we have the document, in Pdf format.
The next step is to save it somewhere, or send it, for example via email:
Then test the flow, by creating a sales order and posting it:
And voila, email sent:
And if you don’t want to save the invoice document, but save it in OneDrive somewhere, you can do that too:
How cool is that!
To get the Pdf document I used this api:
Currently you can use it on:
It’s a pity you can not use it on more document, like for example Purchase Orders, hopefully that might come in a next version…
Hey Steven, thanks for sharing. It’s very interesting. What if I want to send the pdf to a specific department of a customer ?
– invoice are sent to firstname.lastname@example.org
– shipment are sent to email@example.com
– salesquote are sent to firstname.lastname@example.org
Is that possible ?
Sure, why not.
You can enter the email send to addresses manually, or retrieve them from BC.