Request Body / JSON Error with FTP API Flow

Hi there! I hope you are all doing well :slight_smile:

I am trying to use the FTP API (FTP API) to send files to an SFTP server.

But, I am stuck on the request body part. According to the documentation, the request body is supposed to be structured like below. But, when I tried with both those sample entries and my actual values, I got a settings error - your JSON is not valid! Try using a JSON linter to make sure you have the right syntax.

I know there is a FTP integration available now, but I would prefer to use this API as I am trying to upload media files to the SFTP server.

{
 fileName: "sample.txt",
 path: "/sample",
 body: "sample"
}

Hey @Ben :wave:

To properly format your JSON, you’ll need to add quotes around your keys as seen here:

{
	"fileName": "sample.txt",
	"path": "/sample",
	"body": "sample"
}

You’ll also notice that their docs say that the body field must be base64 encoded. To encode this value, I recommend using a tool like www.base64encode.org. This will likely make it more difficult to set this flow on a recurring schedule (if that was your intention), since you’ll need to continually encode the text in your body.

Hope this helps – best of luck configuring this API!

:newspaper_roll: Sharing along the good news in case others come across this thread. Parabola released a new JSON error handling functionality. Feel free to check out this post for the full announcement!

Ayana