Power Automate (previously Microsoft Flow) has a rich set of actions, however to fully unlock its potential with iAuditor users sometime need to pull all item types out of the completed or incomplete inspection. Today, that’s possible with inline flow action.

Power Automate leverages the same Workflow Definition Language used by Azure Logic apps. For new users who are unfamiliar with the expression language, there is an inline help experience that shows how to use each expression as they build out their flow. To use an expression in your flow, first open the "Add dynamic content" menu.

This guide will assist users with the more advanced functionalities and expression building within Power Automate.

SafetyCulture Microsoft API Configuration/Authentication

Name: Recommend naming based on user name
API Token (include): bearer {API TOKEN}

Data Operations - Filter Array

Use "Data Operations - Filter array" (filter array) to reduce the number of objects in an array to a subset that matches the criteria you provide.

For the "From" field in the Power Automate Action, use one of the following:

  • For Items found on the Title Page:
    • body('Get_a_specific_audit')['header_items']
  • For Items found on all other Pages/Sections:
    • body('Get_a_specific_audit')['items']

For "Chose Value" use the following:

  • From a Label:
    • item()['label']
  • From a specific Item ID in an template:
    • item()['item_id']

Data Operations - Compose

Use the "Data Operations - Compose" (compose) action to save yourself from manually entering data, when it's pulling data from specific items within your inspections. This will assist users in outputting results into a format that is consistent each time, reducing the chance for errors.

Note: For all items within the Data Operations - Compose, rename the 'NAME_OF_OPERATIONS' to the flow based upon the previous Power Automate Action. Typically this is named for the question you're asking within the iAuditor inspection. Spaces are represented by an underscores (_).

Sites Feature - for the below Site expressions, there is no need to have a "Data Operations - Filter Array" function before these "Data Operations - Compose" function. These expressions will be written exactly as they are listed below:

  • Site name:
    • body('Get_a_specific_audit')?['audit_data']?['site']?['name']
  • Site Region:
    • body('Get_a_specific_audit')?['audit_data']?['site']?['region']?['name']
  • Site Area:

    • body('Get_a_specific_audit')?['audit_data']?['site']?['area']?['name']

Question types:

  • Response Set/Multiple Choice (Single Select)
    • body('NAME_OF_OPERATIONS')?[0]?['responses']?['selected']?[0]?['label']
  • Text Answer (Paragraph and Short answer)
    • body('NAME_OF_OPERATIONS')?[0]?['responses']?['text']
  • Location
    • body('NAME_OF_OPERATIONS')?[0]?['responses']?['location_text']
  • Checkbox
    • body('NAME_OF_OPERATIONS')?[0]?['responses']?['value']
  • Signature
    • body(’NAME_OF_OPERATIONS’)?[0]?[‘responses']?['name']
  • Date and Time
    • body('NAME_OF_OPERATIONS')?[0]?['responses']?['datetime']
  • Slider
    • body('NAME_OF_OPERATIONS')?[0]?['responses']?['value']

Don’t use these symbols when naming your Flow Actions:

<, > %, &, \, ?, /

Known Limitations:

  • Multiple Select Multiple Choice fields - need to be pushed into a separate table
  • Dynamic field (Repeat section) - need to be pushed into a separate table
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!