Last updated:

Power Automate: Expressions with SafetyCulture inspection data

Take a look at some of the Power Automate expressions that you can use to export SafetyCulture inspection data.

Power Automate (previously Microsoft Flow) offers a rich set of actions that you can use to automate your workflows with SafetyCulture (formerly iAuditor), such as uploading inspection reports. However, you can take your integrations game to the next level by exporting data within inspections, specifically question responses, using Power Automate's Workflow Definition Language, called expressions.

If you want to take a look at how the expressions work in action, check out our guides on creating flows automatically export inspection data to SharePoint lists and Excel Online.

Take note

  • When it comes to exporting inspection data on Power Automate, the "Filter array" and "Compose" actions are used in combination to export inspection questions' responses.

  • Inspection data that is within the following types of questions cannot be exported:

    • Questions with repeat sections.

    • Multiple-choice questions that have "multiple selection" enabled.

  • All expressions contain references to the names of actions you create in a flow, such as the expression "body('Get_a_specific_inspection')['items']" referencing the "Get a specific inspection" action. To ensure that your expressions can be easily created without issue, please avoid using the following symbols in your action names should you rename them:

    • Left angle bracket: <

    • Right angle bracket: >

    • Percent: %

    • Ampersand or and: &

    • Backslash: \

    • Forward slash: /

    • Question mark: ?

Filter array

The "Data Operations" connector's "Filter" action is used to specify the question, of which its response data you wish to export.

The filter array action in Power Automate.

As you may be creating several filter arrays to specify different questions' responses you wish to export, we recommend that you click image on the upper-right of the action and "Rename" it to something you can refer back to as the question label, such as "Jobsite Hazard Check".

Array to filter

Click the "Array to filter" field, then copy and paste the following expressions accordingly, based on where the question is in the inspection:

  • Title page:


  • All other inspection pages:


Choose a value

Click the "Choose a value" field, then copy and paste the following expressions accordingly, based on how you wish to filter for the question:

  • Filter by the unique identifier (recommended) with the question item ID as the corresponding value: item()['item_id']

  • Filter by the label with the question label or name as the corresponding value: item()['label']


The "Data Operations" connector's "Compose" action is used to extract the response from the question item you specify in the "Filter array" action.

The compose action in Power Automate.

Please note that the 'Filter_array' in the samples below refers to the default name of the filter array action. If you followed our recommendation and renamed the action, you should match the expression with the new name. For example, if the filter array action was renamed to "Jobsite Hazard Check", the expression should replace 'Filter_array' with 'Jobsite_Hazard_Check', using underscores (_) to substitute spaces.


Click the "Inputs" field, then copy and paste the following expressions accordingly, based on the question's response type:

  • Multiple-choice (excluding multiple selection enabled questions):


  • Text answer (including Person, Document number, and Number responses):


  • Date & Time (including Inspection date response):


  • Location (including Inspection location):


  • Checkbox and Slider:


  • Signature (name):


Inputs - Sites

If your organization uses the Sites feature, the site of an inspection, as well as the levels the site is nested under, can also be exported. As an exception, you don't need to have a corresponding filter array action to extract site or level names.

Click the "Inputs" field, then copy and paste the following expressions accordingly:

  • Site name body('Get_a_specific_inspection')?['audit_data']?['site']?['name']

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

  • Region name body('Get_a_specific_inspection')?['audit_data']?['site']?['region']?['name']

  • State name body('Get_a_specific_inspection')?['audit_data']?['site']?['state']?['name']

  • Country name body('Get_a_specific_inspection')?['audit_data']?['site']?['country']?['name']

The expression to get each site or level's name remains the same even if your organization's site labels are customized.

Need more help?