A trigger on an audit runs automatically when something happens to an audit, for example when it’s finished. This article explains how to create a trigger for audits and how to export the finished audit report automatically.
Create a trigger for audits
- Click Settings under Management.
- Click Triggers under Integrations.
- Click the yellow plus button.
- On the Scope dropdown menu, select Selected audit work instructions under Audits.
- Under Audit work instructions, select the audit work instructions that this trigger applies to.
- On the What dropdown menu, select the trigger type.
- On the When dropdown menu, select the occurrence that will activate this trigger.
- Fill out the options that appear under Attributes. They only appear once you’ve filled in What and When.
- If needed, you can write additional notes for this trigger.
- When you’re done, click Add.
The occurrences you can use
- When an audit is created
- When an audit is started
- When an audit is finished
- When an audit is put into rework mode
The trigger types you can use
- Send an email: see Send an email from a trigger.
- Call a webhook: see Calling a webhook from a trigger.
- Create an issue with selected flow: creates an issue with the flow that you select.
- Export a report: exports the finished audit report as a PDF. See the next section.
Export the audit report as a PDF
With the Export a report trigger type, Azumuta saves the report of an audit to an SFTP server or a SharePoint location without anyone having to export it. This lets you archive the official record of your audits automatically.
Before you start, make sure that you’ve already integrated an SFTP or SharePoint location into your Azumuta workspace. Please contact us through support@azumuta.com to learn more.
- Create a trigger for audits as described above, and select Export a report on the What dropdown menu.
- On the When dropdown menu, select When an audit is finished or When an audit is put into rework mode. The report is only available on these two occurrences, because an audit that was only just created or started is still empty. Azumuta won’t save a trigger that combines the export with those occurrences.
- Under Attributes, Default recording report is selected as the report. An audit has no other report to choose from, and the report is always exported as a PDF.
- In Destination, select the SFTP or SharePoint location to send the report to.
- In Directory, type the folder the report should be sent to.
- In Filename, type the filename of the report on the destination. The default is shown under the field: the name of the work instruction followed by today’s date.
- When you’re done, click Add.
You can insert these values in Directory and Filename:
| Value | Result |
|---|---|
${=workinstructionName} |
The name of the audit work instruction |
${=auditNumber} |
The number of the audit |
${=treePath} |
The folders that contain the audit work instruction in the tree |
To cut folders off the tree path, use ${=treePath(1)} to drop the first folder, or ${=treePath(-1)} to keep only the last one. See Parameters and tags reference for more ways to insert live values.
Note: The report is created in the background after the audit is finished, so the file can take a few minutes to show up on the destination. To check whether a file was sent, and where to, open the trigger’s usage history. See See the list of triggers in your workspace and each trigger’s usage history.
The same trigger type also works for work instructions on product orders. See Exporting a report.