This article is part of the In Microsoft Dynamics 365 Business Central (Power Automate Actions), how do I… series, a sub-series of the In Microsoft Dynamics 365 Business Central (Power Automate), how do I… series and of the wider In Microsoft Dynamics 365 Business Central, how do I… series which I am posting as I familiarise myself with Microsoft Dynamics 365 Business Central.
There are a number of actions available in Power Automate for Business Central which allow specific actions against the data of Business Central to be performed from within Power Automate.
The 11th action which is available is the Get an image, file or document (V3) one which allows you to extract an mage, file or document from Business Central. This could be useful for things like extracting PDFs of invoices to OneDrive or SharePoint.
Within a flow, click the add action button; search for Business Central and select the Business Central icon (make sure you select the SaaS one, which is a dark colour instead of the on-premises one which is mainly white):
Find and select the Get an image, file or document V3 action:
There are a few parameters for this action which need to be populated:
- Environment which is set to use the variable populated by the trigger.
- Company which is set to use the variable populated by the trigger.
- API category will default to
v2.0
which is the main API available, but there are others to select from, such as a workflow one, which have different tables available. - Path or the image, file or PDF to be extracted. If you’re following best practice of using the trigger or environment variables for the environment and company, then the path will not be selectable and will need to be manually entered. I would usually hard-code the environment and company while I get the path and change them to the variables afterwards.
- pathParameters which needs to be populated with JSON for the image, file or document to be extracted and is different for each type of file. In this example, I am getting the PDF of a sales invoice; if the JSON is malformed or incorrect (such as wrong fields name or value) the step will fail.
In Microsoft Dynamics 365 Business Central, how do I…
In Microsoft Dynamics 365 Business Central (Power Automate), how do I…
What should we write about next?
If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.