web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unable to process temp...
Power Automate
Unanswered

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'.'.

(0) ShareShare
ReportReport
Posted on by

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?

Categories:
I have the same question (0)
  • v-duann-msft Profile Picture
    on at

    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.

    v-duann-msft_0-1617084960172.png

     

    v-duann-msft_1-1617084960174.png

     

    v-duann-msft_2-1617084960176.png

     

    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

  • Community Power Platform Member Profile Picture
    on at

    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!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard