Schedule API on a list

I have a windows based form that posts a list to a backend API workflow. What I want to do is add each item on the list that is sent to the database. I can get this working with a single line of text but I am failing miserably with lists. The vb code is below and, from the single text example, seems to work fine so I must be setting up the workflows in Bubble incorrectly:

Dim filePaths As New List(Of String)
For Each item As FileItem In ListBox1.Items
filePaths.Add(item.FilePath)
Next

’ Adjust the JSON object to match the expected parameter name in Bubble
Dim json As String = JsonConvert.SerializeObject(New With {Key .source_list = filePaths})
Dim content As New StringContent(json, Encoding.UTF8, “application/json”)

Using client As New HttpClient()
’ Replace with your actual Bubble endpoint URL
Dim response As HttpResponseMessage = Await client.PostAsync(myPath, content)
If response.IsSuccessStatusCode Then
MessageBox.Show(“Data sent successfully!”)
Else
’ Capture and display error details
Dim responseBody As String = Await response.Content.ReadAsStringAsync()
MessageBox.Show("Error sending data: " & response.StatusCode.ToString() & " - " & responseBody)
End If
End Using

I have set up the following:




Nothing is hitting the database when the code from the windows app is run and at this point im just ticking and unticking things in the hope it will work, which it doesnt. I dont seem to have the option to set the schedule to run immediately, I only get an option for arbitrary time (Ive typed in Current date/time and it wont accept it) - Im not sure if this parameter is the issue or if it is something else.

Any help greatly appreciated

Got it working…thanks for anyone who looked

How did you do it?

Same problem here.