Backend workflow: Issue creating a thing from a JSON list

Hi All, big thanks in advance on this one.

Goal
Process a text field (which stores a JSON object) to create a list of events using a backend workflow.

Input Data

  • I have a text field called llm_response which contains a JSON object.

Primary Workflow

  • The workflow is started by a database trigger event
  • First step is an action to Schedule API Workflow on a list
    • Here is the setup:
    • Using a process discussed here, I “Get data from an external API” which is just my own API built with Bubble’s API Connector to format the llm_response text field into a JSON object that I can reference. The API is called Convert JSON.
    • Then, it calls the “Event Creation” workflow while passing just a single field (keeping it simple for debugging) called title.

Event Creation Workflow

  • Here is the setup:
  • Here is the first step:
  • It’s all quite simple. It takes the title value from the primary workflow
  • Then it creates a new event populating the title field with the title. Note that I’ve done a manual creation of an event only with title field, and it works fine.

Server Logs

  • It shows that I changed the drop down value on the front end
  • This updates a database value that triggers the whole primary backend workflow.
  • Convert JSON runs and properly returns data from the API
  • Then Event Creation runs on the Convert JSON event
  • Then it finishes
    …but no event gets created!

Question
What changes are required to make this work? Thank you!

Did you check privacy rules? (Or you can activate ignore privacy rules checkbox)

Also, be sure you didn’t pause scheduled workflow

There are no privacy restrictions right now on creating events. I’m not pausing the workflows either as it isn’t really scheduled. They are triggered to run immediately. Looking at server logs the workflows appear to have run completely.

Thanks for some suggestions though. Let me know if you think of anything else or if any other details would be helful.

Did you set scheduled date?
You can first, pause scheduled WF, and valdiate they are in scheduled correctly. If this is the case, unpause and check logs to see what happen with the create a new thing action.

No scheduled date which means it should run immeddiately

Mine is the “Empty interval”: Custom | Bubble Docs

The workflows do run as confirmed in the Server Logs.

1 Like

you need to set it. This is requested. Just set current date and time

But did you pause and inspect the payload sent to the backend WF in scheduler? (easier VS logs)
What logs say about create item step?

Wow…it was the “Scheduled date”. I misread the following section on Interval (seconds) as being related to the Scheduled date field now that I’m looking back at the docs.

Jici, I really appreciate the help! I spent a lot of time trying to nail this one. All the best!

1 Like