Error saving file names (URLs) under a LOOP

I am generating images using the Stability AI node within a LOOP and saving the results to a Google Sheet (ADD ROW).

The first image URL recorded on the Google Sheet is accurate, for example:
https://cloud.activepieces.com/api/v1/step-files/signed?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjEifQ.eyJmaWxlSWQiOiJROVpacDhCOVQyNHpnYlpZ

The subsequent images are being saved as:
file://step_8/image-17223065SS695.png
file://step_8/image-17223065ZZ794.png
file://step_8/image-17223065DD852.png
file://step_8/image-17223065DD983.png
file://step_8/image-17223065FF562.png

And so forth (I’ve slightly altered the file names, but you get the idea).

This situation has tested my patience and depleted my Stability AI credits.

Hi @Trying2MakeAPbetter

The reason is Activepieces doesn’t store the files after the execution is done, so these files are just temporary name during file execution but they are deleted after.

I would suggest to use Google Drive piece and upload them to your google drive instead

It’s not just about storing the files; it’s about registering the correct URL in a Google Sheet. As it stands, it makes no sense. The right way to do it is by adding the current URL value at each step of the loop.

Hi @Trying2MakeAPbetter

The idea that first link you seen cloud.activepieces.com is where stability AI doesn’t return links but just send the data once and activepieces store them as sample data and provide a link (only at sample data as it’s need to be used later)

But during an actual execution activepieces doesn’t store these data anymore as link and just store them temporary until it finish the processing.

to answer your question stability AI doesn’t provide links, so activepieces has to store them in sample data, but during execution it doesn’t and instead store them inside sandbox as you have seen file:/// and later delete the whole sandbox

It’s confusing user experience but we will make this clear in upcoming versions that activepieces can’t store the data.

I suggested to add step and upload the file to Google drive and then store the google drive link in google sheets

I understand your point, but the original purpose of this automation was to create a seamless process.

Each cycle was designed to generate an image, upload it to an S3 bucket, and register the URL in a Google Sheet.

The first run was successful, but subsequent cycles failed.

Frustrated, I abandoned the loop approach on Active Pieces and instead implemented a straightforward flow, using Pabbly to repeat the process multiple times on a loop there.

It’s not the cleanest solution, but it’s the only one that worked for me.

If I were to approach this differently, I would retain the image (or any received file) while the loop was active and ensure that the correct link is registered for that specific cycle.