Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
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?

  • Community Power Platform Member Profile Picture
    on at
    Re: 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'.'.

    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!

  • v-duann-msft Profile Picture
    on at
    Re: 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'.'.

    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,596 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow