Respond to the webhook the list of files in Drive

I’m using an AppSmith client to control the ActivePieces triggers.

I am creating an API endpoint so when called it will return the list of files of a given Google Drive folder.

To do so, I create this flow:

  1. The Catch Webhook will tell me what URL to call from AppSmith. That works.

  2. The Drive / List files piece will list the files in a given folder. It works. We can see in the Output that we get an object containing the files array.

  3. I’d like the Return Response to return this list.

I do select the JSON Body, then the List files, then the files property, then click on “insert”…

and I get it in place. But the parser says there’s an error in the JSON and it can’t process it. 5) syntax error, 6) syntax error, 7) warning:

This forbids me to execute the flow or publish it.

Question

How do I do to return via HTTP response a JSON representing an object that I got in a previous step?

Hello @xmontero ,

We are working on improving the experience with the HTTP piece for better data mapping. As a workaround, you can pass the JSON data by clicking (x) (to the right side of the field) to map files from the Google Drive step. See the image below.