SharePoint lists can be a powerful method of collectively storing data in a central location, and can cater for a range of different data types across a number of different use cases such as asset management, contact lists, issue tracking and many more. Using the iAuditor integration with Power Automate (previously MS Flow), you can automatically start and pre-populate an inspection with information from new list items.

In this support article, we will be using the "Asset Management" example where data will already be stored/entered within a list. Each time a new asset/piece of equipment is added to your asset list, we'll want to automatically start and pre-populate an Inspection with key pieces of information (e.g. Serial Number, Model etc.). Once your SharePoint Item is added, you'll be able to open iAuditor and commence the Inspection!

Getting Started

This setup assumes some knowledge about how SharePoint lists work and an understanding of the JSON data model, as well as the iAuditor API. You will also need to have your iAuditor Template ready to go, for information on building a template, please see our template creation guide.

Start by creating and setting up your SharePoint list with the relevant custom Columns/fields - these will likely be the same as your template fields/questions. For this example, we will use "Text answer" from the inspection template's "Title Page".

Requirements

  1. Premium iAuditor User Account
  2. iAuditor API Token
  3. Office 365 User Account
  4. Access to the Premium version of Power Automate (previously MS Flow)
  5. Microsoft SharePoint lists

Steps for setup in Power Automate

Step 1:

  1. Create a new blank "Automated Flow" and name it
  2. Search and select the "When an item is created" trigger - hit "Create"
  3. (optional) Rename the step by click the 3 dots top right corner of this action and "Rename"
  4. Populate the "Site Address" and "List Name" from which you will be using to automatically start inspections
  5. Proceed with "+ New step"

Step 2:

  1. Search and select the "Initialize variable" action
  2. Set the "Name" as "Item Data" and "Type" as "Object"
  3. (optional) It is recommended to "rename" the entire action to "Item Data"
  4. Populate the "Value" by referring to the JSON structure for inspections
  5. You will need the {template_id} as well as the item details under {header_items}
    Example below shows the structure for pulling the response to a text answer question labeled: Site name
    {
      "template_id": "template_16912b48119747308fd44da783080191",
      "header_items": [
        {
          "parent_id": "108E20C2-C850-46CB-842D-E1E9989773CE",
          "item_id": "f3245d41-ea77-11e1-aff1-0800200c9a66",
          "label": "Site name",
          "type": "text",
          "responses": {
            "text": Item Data Variable
          }
        }
      ]
    }
  6. (optional) The same steps will have to be repeated for each field you want to pre-populate within the inspection
  7. Proceed with "+ New step"
IMPORTANT NOTE

Only fields in the Title Page/header_items can be used for pre-populating responses.

Step 3:

  1. Search and select the "HTTP" action
  2. Configure the following:
    "Method" = POST
    "URL" = https://api.safetyculture.io/audits (as outlined in the API documentation)
    "Headers: Enter key" = Authorization
    "Headers: Enter value" = Bearer [iAuditor API Token]
    "Body" = Click to select the variable: Item Data you defined in the previous step
  3. "Save" and turn on your flow

Testing:

  1. Make sure the Flow is turned on, then go to your selected SharePoint List and add a new item
  2. This should trigger the start of an inspection
  3. Check by navigating to the iAuditor WebApp - "Inspections" page
  4. See the incomplete/in-progress inspection recently started with the relevant fields pre-populated with SharePoint List items
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!