Last updated:

Power Automate: Start and prefill inspections with SharePoint items

Learn how to create a Power Automate flow to start and prefill inspections whenever an item is added on a SharePoint list.

Microsoft SharePoint is a powerful tool that facilitates content sharing and empowers data access within organizations. In particular, its list feature can help you and your team add and store information with ease. Using integration tools such as Power Automate (previously Microsoft Flow), you can automatically start inspections on SafetyCulture with every new item created on a SharePoint list, and even prefill the inspection with information from the item. This not only saves your team from having to start inspections manually but also minimizes human error by prefilling potentially critical details, such as serial numbers.

If your organization uses Zapier as the integration tool, you can create a Zap that delivers an equivalent solution!

Take note

  • As this flow utilizes Microsoft SharePoint list items as the trigger to start and prefill inspections on SafetyCulture, make sure you have a SharePoint list created in advance for the information you want to pre-fill inspections with.

  • If you have the inspection title format set up for the template you want to use, questions that are prefilled and used to populate the inspection title won't take effect until the inspection is modified on the web app or the mobile app.

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

Start inspection request JSON

This flow utilizes the start inspection request in JSON format. We recommend that you prepare the request body in a text editor such as Visual Studio Code, then copy and paste it into the flow accordingly.

If you're unsure of how to build your request, check out this  as a reference. You can also review our API documentation for more information.

The easiest way to construct a request is by retrieving the information of an existing inspection that has answered the question items you want to prefill. Then copy the question items of interest and clear their responses to prepare for the SharePoint items in the Power Automate flow.

If the questions you want to prefill are in the title page, then the request array should be "header_items". For all other inspection pages, the array should be "items".

1. When an item is created

  1. Sign in to Power Automate.

  2. Click Create from the menu on the left-hand side and select Automated cloud flow.

  3. Configure the following fields:

    • Flow name: Add a name for your flow so you can refer back to it easily.

    • Choose your flow's trigger: Search and select the When an item is created trigger.

  4. Click Create to create the flow and its first step.

2. Initialize variable

  1. Click Plus iconNew step.

  2. Search for "Variable" and select the Initialize variable action.

  3. Configure the following fields:

    • Name: Click the field and enter "Item Data".

    • Type: Click the field and select Object.

    • Value: Copy and paste in your start inspection request JSON. Remember to click the response field and select the item you wish to prefill with from the dynamic content list.

  4. You should see something that resembles the following example: Power Automate start inspection payload.

3. HTTP

  1. Click Plus iconNew step.

  2. Search for "HTTP" and select the HTTP action.

  3. Configure the following fields:

    • Method: Click the field and select POST.

    • URI: Click the field and enter "https://api.safetyculture.io/audits".

    • Headers (Enter key): Click the field and enter "Authorization".

    • Headers (Enter value): Click the field and enter your API token in the format of "Bearer [token]". Make sure there is a space between "Bearer" and the API token.

    • Body: Click the field and select Item Data from the dynamic content list.

  4. Click Save on the bottom or upper-right of the page to save the flow.

Test the flow (optional)

  1. Make sure the flow is turned on.

  2. Create a new item on the SharePoint list you're using for the flow.

  3. If successful, a new inspection should be started using the template you selected and prefilled with information from the item you created.

Need more help?