I confess I am a Bubble novice, so I apologize in advance if I ask basic things, but I’ve tried to do my research before coming here.
I am building a workflow so that when a form is filled and the ‘submit’ button is pressed:
A new record is created in my data
The form fields go to ChatGPT through API
The response from ChatGPT is stored in my data
The response is sent to an image generation API (TNL POST in the screenshot below)
The ID of the response is stored in my data
The ID of the response is used in a GET call to the image generation API (TNL GET in the screenshot below)
The generated URL is stored in my data
Given that it takes time for the APIs to process the requests, I tried to put some ‘only then’ conditions, but what I think it’s happening is that step 6 fires up too soon and I get a 404 error.
Even in the debgger, with steps enabled, I get the error from step 6 (GET call) already when I am in step 4, which is odd.
The APIs work in postman and even in Bubble plugin editor I am able to initialize them and get results correctly.
Can you point me in the direction of where the issue might be?
Do you know how to use the debugger to run a step by step? This would be the best way to check your workflow.
For example, it’s hard to know if the conditions are going to be true for this one: ChatGPT Prompt number of characters is not empty. But maybe it brings back 0 which would not be empty. Things like that, you could figure out using the debugger.
Thank J! I tried using the debugger, and the error pops up at step 3 in the workflow (error message below).
I understand the error, and it should come up if the messageID parameter is not passed in the URL for the GET call (however I am passing the parameter). Also what I find puzzling is that the error I get is related to step 6 in the workflow, which should have not been triggered yet at that stage.
When it gets to that step, what does the blue text in the debugger show? Is it empty? It might be because of that. Does the TNL API have a webhook that you can use to get the image instead of guessing when it will be ready? Where is the TNL developer documentation so I can take a look?