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
- Navigate to make.powerautomate.com in your browser.
- Select + Create and create a new flow from one of the following sections:
- Start from blank
- Start from a template
- Start from a connector
- 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):
- Connect it to your environment and company.
- Select “Quality Inspection Test Finished (Insight Works)” in the Event field.
- Select “Showing 1 of 1” in the Advanced Parameters field.
- 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.):
- Connect the environment and company.
- Select “insightworks/qualityinspection/v2.0” in API category field.
- Select “iwxQualityTests/iwxQIPDFGeneral/iwxQIpdfDocumentContent” in the Path field.
- Select “pguidTestID” in the Id for ‘iwxQualityTests’ field.
- 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):
- Set the Folder Path to the desired folder for the PDF to be placed.
- Input an appropriate file name in the File Name field.
-
- Select the “Body” output from the “Get an image, file or document (V3)” block in the File Content section.
- 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):
-
- Select “Id” in the File field from the preceding “Create file” block.
- Select “View” in the Link type field.
- Select “Anonymous” in the Link Scope field.
- Add the Teams “Post message in a chat or channel” block (creates the Teams message post):
-
- Configure Post as, Post In, Team, and Channels fields to choose where to post the message to.
- Input an appropriate message in the Message field using the “Web URL” from the previous “Create share link” block .
Test the configuration
- Navigate to Quality Inspector in Business Central.
- 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
Still need help?
Ask other Business Central users in the Insight Works community, or send the details to the support team. Include the steps you took and any error message you saw.