Hi there, I'm very new to power automate (and Office 365 to be fair) and not with a tech background, so please bear with me...
I'm trying to create a flow to auto tag files which are a .jpg file extension with the tag "Photos" in a custom metadata column. I had this up and running (once a day, get file properties, if modified less than 1 day ago, if files name ends with jpg, get metadata, update file properties). This was working well, until we added a subcategory of metadata under Photos to display different locations (London, Leicester etc). This appears to have broken the flow, and with my limited knowledge, I don't know how to fix it.
The error message I get is "The API 'sharepointonline' returned an invalid response for workflow operation 'Get_files_(properties_only)' of type 'OpenApiConnection'. Error details: 'The API operation 'GetFileItems' requires the property 'body/value/0/FileType1' to be of type 'Object' but is of type 'Array'.'"
Could anyone offer any assistance as to where I'm going wrong? Many thanks in advance, and apologies if this is a very basic query. I've searched online for a little while and haven't found anything to assist.
well if it was working then something must have changed...
The error message sounds like you may have selected the wrong type of Value/ID when you made recent changes.
The actions that return lists or multiple values need to be paired with an "apply to all values" loop generally, and generally powerautomate will create this item for you (its a grey "control" box into which you put the actions that are to be applied o each "loop" of the process for each item that the list returns, one after another).
It sounds like the GetFileItems action has been given a list of objects (in an array) rather than just one object from the array.
I cant be sure, but I'd open that action and then look at the dynamic values available, perhaps one called something like ID should be used instead?