M365 Dev Blog

File created or modified in SharePoint – broken trigger

file created or modified

file created or modified

You can find many problems when using Power Automate and Azure Logic Apps with complex SharePoint lists. This article will cover another one that cause triggers to break. If you use the “When a file is created or modified in SharePoint” trigger, keep reading.

Some time ago I wrote a blog post about a different issue caused by columns not indexed. You can read more here.

You may also encounter broken triggers when you try to use large SharePoint lists, that contain many complex columns (managed metadata, lookups, …). The “When a file is created or modified in SharePoint” trigger, may work for some time, and then suddenly stop.
If you use a Power Automate flow, you may not be able to see error details on the screen.
Using an Azure Logic App, you can see the error details for the failed trigger by checking the trigger history.

File created or modified trigger error

Click on the trigger execution you want to inspect and on the right panel click on Outputs link. The body of the response will contain error details and will look like this:

"body": {
        "status": 400,
        "message": "The given guid does not exist in the term store\r\nclientRequestId: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\r\nserviceRequestId: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
    }

Solution – limit columns by view

The solution is very simple and all you need to do is specify a view to limit the number of columns in the trigger.

Limit columns by view trigger

The best option to prevent this from happening may be to always ensure that you set a view on the trigger.
If your trigger is currently broken and suffering from this problem, you may see it working again straight after you hit the save button!

Update

If you still experience issues after specifying a view, this is likely because the view specified still has too many (complex) fields, like metadata. Create a new view using only basic columns (for example: name, created, created by) and try using that one.

Exit mobile version