As one of the most used online collaboration platforms, Microsoft SharePoint has established itself as a great place to share and manage content and knowledge to empower teamwork across the organization. Using integration tools such as Power Automate (previously MS Flow), you can automatically export your iAuditor data to SharePoint, so your team always stays up to date on the latest information captured by your frontline auditors.

This article outlines the steps to export and upload inspection reports using Power Automate automatically. It is also possible to update SharePoint list items with inspection data. Please see our support article here for more information.

IMPORTANT NOTE

The new PDF and Word formats are not yet supported by the iAuditor connectors on Power Automate, you can find alternate automation solutions here: iAuditor Exporter or Zapier.

Requirements

  1. iAuditor Premium subscription
  2. iAuditor API Token
  3. Microsoft Office 365 user account
  4. Access to the Premium version of Power Automate
IMPORTANT NOTE

If you run into any errors or have any questions regarding the setup process, please contact our customer support team for assistance.

Steps to set up your flow

There are several ways to trigger flows, either from a designated event, manually, or on a recurrence set by the user. All, however, once triggered, follows a series of actions that flow into an output, such as uploading an inspection report into a cloud drive.

In this flow, the trigger is scheduled to reoccur every 1 hour, where all completed inspections within each hour passed are exported and downloaded, then automatically uploaded to Microsoft SharePoint.

Step 1: Recurrence

  1. Navigate to Power Automate and login to your Office 365 account
  2. Click “Create” on the left-hand side and select “Scheduled flow”
  3. Name your flow to help identify the automation moving forward
  4. Configure the following:
    Starting: The date and time you want your first flow to start – set this accordingly
    Repeat every: The interval you want the flow to run on – set this to “1 Hour”
  5. Click “Create” to finalize step 1
  6. Proceed with “+ New step”

Step 2: Get past time

  1. Search and select the “Get past time - Date Time” action
  2. Configure the following:
    Interval: Set this field to “1”
    Time unit: Set this field to “Hour”
  3. Proceed with “+ New step”

Step 3: Search modified audits

  1. Search and select the “Search modified audits (preview) – iAuditor” action
  2. Click the “Modified After” field and select “Past time” from the dynamic content list
  3. (optional) If you wish to only export and email inspection reports from a particular template, click the “Filter by Template” field to select your template from the list or input the template_id.
    IMPORTANT NOTE

    A maximum of 1000 inspections can be processed during each interval. You will need to shorten the interval in step 1 and step 2 if your organization completes more than 1000 inspections per hour.

  4. Proceed with “+ New step”

Authentication:

  1. Authenticate the connector if this is your first time using iAuditor on Power Automate
  2. Configure the following on authentication:
    Connection Name: We recommend naming by the username from which the API token is generated, so you can refer back easily should you need to set up multiple iAuditor connections.
    API Key: Input your API token in the format of “Bearer [token]”. See our support article on how to generate an API token.
  3. Click “Create” to continue

Step 4: Apply to each

  1. Search and select the “Apply to each - Control” action
  2. Click on the “Select an output from previous steps” field and select “Audits” from the dynamic content list
  3. Proceed with “Add an action” within the “Apply to each” window

Step 5: Export an audit report

  1. Search and select the “Export an audit report (preview) - iAuditor” action
  2. Configure the following:
    Audit ID: Click on the field and select “Audits Audit ID” from the dynamic content list
    Format: Select from “pdf” and “docx” to determine the format of your report
    Timezone (optional): Select from the list if you wish to apply a timezone other than UTC to your reports
    Export Profile (optional): Select if you wish to apply an Export Profile
  3. Proceed with “Add an action” within the “Apply to each” window

Step 6: Do until

  1. Search and select the “Do until - Control” action
  2. Skip the fields for now
  3. Proceed with “Add an action” within the “Do until” window

Step 7: Check the status of the export request submitted earlier

  1. Search and select the “Check the status of the export request submitted earlier (preview) - iAuditor” action
  2. Configure the following:
    Audit ID: Click on the field and select “Audits Audit ID” from the dynamic content list
    Export Task ID: Click on the field and select “Export Task ID” from the dynamic content list
  3. Return to the fields in “Do until” and configure the following:
    Choose a value (left): Click on the field and select “Export Status” from the dynamic content list
    Choose a value (right): Click on the field and type in SUCCESS
  4. Proceed with “Add an action” within the “Apply to each” window, not within the “Do until” window

Step 8: Download an audit report

  1. Search and select the “Download an audit report (preview) - iAuditor” action
  2. Configure the following:
    Audit ID: Click on the field and select “Audits Audit ID” from the dynamic content list
    Export Task ID: Click on the field and select “Export Task ID” from the dynamic content list
    Audit Report Filename: Click on the field and select “Filename” from the dynamic content list
  3. Proceed with “Add an action” within the “Apply to each” window

Step 9: Get a specific audit

  1. Search and select the “Get a specific audit (preview) - iAuditor” action
  2. Click on the “Audit ID” field and select “Audits Audit ID” from the dynamic content list
  3. Proceed with “Add an action” within the “Apply to each” window

Step 10:

  1. Search and select the “Create file - SharePoint” action
  2. Authenticate the connector if this is your first time using Office 365 Outlook on Power Automate
  3. Configure the following:
    Site Address: Select your SharePoint site from the list
    Folder Path: Set your folder path to where you want the inspection to be uploaded
    File Name: Set the naming convention of your report attachment filename, followed by the .pdf or .docx accordingly
    File Content: Click and select “Audit Report” from the dynamic content list
    IMPORTANT NOTE

    As SharePoint lists, document libraries, and folders can only contain a maximum of 5000 items, dynamic content items can be useful to help avoid reaching the limit by distributing inspection report uploads evenly into different folders, such as sorting by inspections' template names. Please see the example below for reference.


  4. Click “Save” on the top right corner of the page to turn on your flow.
  5. (optional) Continue to the section below if you wish to test your flow.

Testing:

  1. Make sure you have at least one inspection completed within the past time interval set in step 2, if a template filter was set, make sure the inspection completed is from that template
  2. Click “Test” on the top right corner of the flow edit page
  3. Choose “I’ll perform the trigger action” and click “Test”
  4. Confirm the test by selecting “Run flow”
  5. The flow starts running, and inspection reports should begin to upload to your SharePoint site
Was this article helpful?

We love your feedback. Please tell us what you think.


Yes No
Care to share a bit more so we can continue to make improvements for you? Care to share a bit more so we can make this article even better for you? Thanks for your feedback!