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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to append string v...
Power Automate
Unanswered

How to append string variables using output from "When an item is Created"(SharePoint)

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am automating the process of uploading a OneDrive file to a SharePoint list in the form of an attachment. However, I am unable to append the empty string variables using the output from the "When an item is created"(SharePoint) trigger. The intent is to upload a specific file as an attachment based on the file's name which would match with specific fields of an item on the SharePoint list. I tried creating a blank array and it did save the output from the SharePoint trigger I am unable to make specific conditional comparisons. The specific error I get is the following:

 
ExpressionEvaluationFailed. The execution of template action 'Apply_to_each_8' failed: the result of the evaluation of 'foreach' expression '@body('When_an_item_is_created')?['value']' is of type 'Null'. The result must be a valid array.
 
Any help with this issue would be greatly appreciated. Thanks.
Automate Trouble.PNG
Categories:
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @TorresA ,

     

    I see an issue with your trigger.

    You have a recurrence trigger which starts the flow on a schedule. What that means is that you do not get the context of the item when it is created.

    Remove the recurrence trigger, make "When an item is created" as your first trigger, you should be good

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I am still having the same issue unfortunately.

    Automate Trouble_2.PNG

  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @TorresA 

    Can you post a screen shot of your loop in edit/design view please?

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I managed to fix that error. But I am still struggling with comparing multiple variables in a conditional statement like in the following:

    Automate Trouble_3.PNG

    All_Var is an array that holds all the variables. Is there a way to call a specific variable an array? Also, the reason I go the error from the previous comment was because I attempted to initialize the variable within two Apply for each loops. Using an array like in the picture was similar to the method I previously used, where I attempted to use a blank array.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 331 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard