OpenAI Integration

Hi All
New here. I have watched the video on using the API plugin, but I think the bubble UI/process has changed. I have created my backend workflow where I have wired in the system prompt and user prompt (the data is saved to a table and I reference them here). BUT in the front end I am also being asked to provide the same data - system prompt and user prompt. I understand API and post, but I would have thought I only need to define the data sources once?
I have added screenshots

I do have a bigger issue - the API is not firing. The data in step 1 and step 2 is being created but step 3, the call to the API does not appear to trigger. In the video there is an option to schedule the API call now using current date/time. I do not see that as an option in the current UI?

Finally, (apologies for the long message!) How do I debug this - can i test just firing the backend workflow? Are there error logs available?

Thanks for your time
Kevin


Here is the API setup

The API call is made to be an action that takes dynamic values (system prompt and user prompt), so whenever you add this action you have to reference the related values no matter if it is in the frontend or the backend, and in your screenshots you added this action in both.

I think it is firing but I don’t see a following action that displays its result or saves it to the database, without displaying the results or storing it the call will be made and the response will thrown in the air!

It is to schedule an API workflow not to schedule an API call, I think you misunderstood the “API workflows”, they are not the API calls that can be made using the API connector, “API workflow” is just a synonym for “backend workflow”, it called API workflow because it can be exposed to be called via API. In your first screenshot, you made an API workflow named “openai-reflection flow”, inside it you added the action that makes the API call, so when this workflow is triggered (scheduled) the OpenAI API will be called.

This field is related to the API workflows, not the API calls.
You can schedule API workflow by selecting the “Schedule API Workflow” action under “Custom Events”, and there you will see the “Schedule date” field.

For the frontend workflows, there is the Debugger at the bottom of the preview page, but when there are API calls I prefer not to use it because it could cause errors, the console logs are better (there are plugins for this), but it will not work for the backend workflows (the API workflows).

1 Like

Hi @salemmo409

I appreciate your prompt and comprehensive response! This has really helped. I have not resolved the issues yet, but wanted to acknowledge your input, thank you.

1 Like