title: Passing a filepath through a loop in a Azure Logic App
body: <p>I'm using the 'list folder' connector to list all the files in a SharePoint folder. 
  I then use a for each row to loop through all the individual files in the SharePoint folder. The point is I want to extract a table in the file to a CSV table and then save this to blob storage. </p>
  
  <p>Please find a picture of the current setup:</p>
  
  <p><a href="https://i.stack.imgur.com/Os6bw.png" rel="nofollow noreferrer">Image of setup</a></p>
  
  <p><a href="https://i.stack.imgur.com/Os6bw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Os6bw.png" alt="enter image description here"></a></p>
  
  <p>When I run the app I get the following error:</p>
  
  <blockquote>
    <p>BadRequest. Http request failed: the content was not a valid JSON.</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/RRu7y.png" rel="nofollow noreferrer">Error Output</a></p>
  
  <p><a href="https://i.stack.imgur.com/RRu7y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RRu7y.png" alt="enter image description here"></a></p>
  
  <p>Display of the code:</p>
  
  <p><a href="https://i.stack.imgur.com/KB1Pp.png" rel="nofollow noreferrer">View of the code</a></p>
  
  <p><a href="https://i.stack.imgur.com/KB1Pp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KB1Pp.png" alt="enter image description here"></a></p>
  
  <p>I have tried various methods, including converting to string, JSON and encoding to URI. </p>
  
  <p>How can I solve this issue?</p>
  
  <p>Error code output:</p>
  
  <pre><code>{
      "statusCode": 400,
      "headers": {
          "Date": "Tue, 02 Apr 2019 07:46:24 GMT",
          "Content-Length": "117",
          "Content-Type": "application/json"
      },
      "body": {
          "status": 400,
          "message": "The parameter 'file' has an invalid value 
      '/!FILEPATH/CSV_TEST/test_data.xlsx'."
      }
  }
  </code></pre>