Hi, I have been using a flow successfully for many months but in the last month it has begun to only work intermittently. The flow detects any new files added to a SharePoint library and, based on the name of the file, adds information in four columns and sends emails based on conditions. The flow goes through multiple conditions and arrays, sends the emails and updates the file properties for some files but not others. The flow is failing at the very last condition which is a simple: file name with extension contains 2021.03 so the final column is populated with the month value based on what is included in the file name. The strange thing is that this works for some files and not others, for example in the last run, ten files were uploaded, the flow succeeded for four of them but failed for the other six. The error message I am getting is: Unable to process template language expressions for action 'Condition' at line '1' and column '3059': 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Null'.'. But if there was something wrong with the format, surely it shouldn't have worked for any of the runs? Please can someone offer a suggestion as to why this is happening?
Hi Anna,
Many thanks for your reply. I can see a difference immediately - you have the date as a string whereas I have entered it as text. I'll give this a try first and see what happens - I'll come back with answers to the other questions if this doesn't work!
Hi @Anonymous
Thank you for posting.
According to your description, you got error while running flow to check new created file in SharePoint. The issue happens intermittently. If any misunderstanding, please kindly let me know.
Since you mentioned the flow works for some of the files, I believe the flow should be configured correctly.
May I ask is there any common point for these files which caused error? Based on the error message, issue is casued by ‘The provided value is of type 'Null'’. Please pay attention to the file name format.
Meanwhile, please help to check whether flow only fails for files which have file property updated. Because you didn’t apply all property update to all files. What kind of property have you updated? Is that possible the update action make the final condition invalid?
I tried to create a test flow to reproduce your scenario, but mine works fine.
If possible, please kindly share me your file name template and flow overview. It’s difficult to tell the root cause based on the fuzzy scenario you described.
Hope the content above may help you.
Best regards,
Anna
WarrenBelz
146,596
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,928
Most Valuable Professional