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.