I have a list view (listViewMetadataLessons) that contains text area and button to upload a lesson cover image. Each lesson has explanation and cover image.
Where are you calling this uploadLessonCoverImageS3 action from? If possible, based on how Retool seem to want you to do things, can you move the upload action to be tied to a component/button in the List View objects?
Then, you should be able to use the Run Script event handler to trigger your upload query using an additional scope element for the fields in the uploadLessonCoverImageS3 query.