---
title: "Use Quality Inspector with Power Automate"
app: "Quality Inspector"
section: "How-to guides"
last_updated: "2025-12-11"
url: "https://insight-works.com/kb/quality-inspector/use-quality-inspector-with-power-automate/"
---

# Use Quality Inspector with Power Automate

This article guides you through using Quality Inspector with Power Automate to create a PDF when a test has finished, place the PDF on OneDrive, and create a notification within teams.

### Use Power Automate

1. Navigate to make.powerautomate.com in your browser.
2. Select **+ Create** and create a new flow from one of the following sections:

   1. Start from blank
   2. Start from a template
   3. Start from a connector
3. Add the “When a business event occurs (V3)” Business Central event block (tells Power Automate to react to the Business Central event when a Quality Inspection Test has finished):

   1. Connect it to your environment and company.
   2. Select “Quality Inspection Test Finished (Insight Works)” in the _Event_ field.
   3. Select “Showing 1 of 1” in the _Advanced Parameters_field.
4. Add the “Get an image, file or document (V3)” Business Central action block and place it underneath the “When a business event occurs (V3)” block (connects back into Business Central to create a PDF of the general inspection report; at this point, the PDF is in memory.):

   1. Connect the environment and company.
   2. Select “insightworks/qualityinspection/v2.0” in _API category_ field.
   3. Select “iwxQualityTests/iwxQIPDFGeneral/iwxQIpdfDocumentContent” in the _Path_ field.
   4. Select “pguidTestID” in the _Id for ‘iwxQualityTests’_ field.
5. Add the OneDrive for Business “Create file” action block and place it beneath the “Get an image, file or document (V3)” block (puts the PDF into OneDrive):

   1. Set the _Folder Path_ to the desired folder for the PDF to be placed.
   2. Input an appropriate file name in the _File Name_ field.

1.

Note: To have the file name dynamic based on the quality inspection test, the following power automate code could be used:

```
concat(triggerBody()?['pcodTestNo'],
'-',
triggerBody()?['pcodSourceItemNo'],
'-',
triggerBody()?['pcodSourceLotNo'],
'.pdf')
```

This creates a PDF titled with the test name, then a dash, then the item name, then a dash, then the lot number, followed by “.pdf”.

1.

   1. Select the “Body” output from the “Get an image, file or document (V3)” block in the _File Content_ section.

1. Add the OneDrive for Business “Create share link” action block (This creates a shareable link for the new PDF file that will be created on OneDrive):

1.

   1. Select “Id” in the _File_ field from the preceding “Create file” block.
   2. Select “View” in the _Link type_ field.
   3. Select “Anonymous” in the _Link Scope_field.

1. Add the Teams “Post message in a chat or channel” block (creates the Teams message post):

1.

   1. Configure _Post as_, _Post In_, _Team_, and _Channels_ fields to choose where to post the message to.
   2. Input an appropriate message in the _Message_ field using the “Web URL” from the previous “Create share link” block .

### Test the configuration

1. Navigate to _Quality Inspector_ in Business Central.
2. Select a Quality Inspection Test and select **Finish**.

A PDF file is created in OneDrive, and a link to the file is posted in Teams.

### Video

[Video: Practical Examples of Power Automate with Business Central (C15)](https://www.youtube.com/watch?v=bju0iQlFgUU)
