How to custom set "Created By" field via API

I am trying to use backend workflows to create things in my Bubble application for the many advantages that working on the backend has over the frontend. I realized that when you use an API workflow in a workflow, you can’t get the response… which I need! I solved this by using the API Connector and calling my own Bubble Workflow API. Roundabout, but fine. (This thread was very helpful.)

Now I realize that when I use the API call (via API Connector) to create a Thing, the “Created By” field defaults to “Admin” or some randomly assigned user ID. I can’t specify via API Connector that I want the “Created By” to be the Current User that triggered the backend workflow in the first place. I use this field constantly so that I know which user a Thing belongs to.

Does anyone know if this is possible, or how I can approach this? Do I really have to make a separate field for “Owner” in addition to bubble’s native “Created By”? Or is there an easier way to do this…


If you want to have the “created by” field filled you need to tell bubble who is the current user. Have a look at how to authenticate with the Bubble Data API.
Of course you could add your own “owner” field and pass the id of an user to teh API workflow and fill the field with a search. But you need to keep in mind that if the API workflow runs without authentication anybody (from any place on the internet, not only your app) can create data in your database pretending that it was created by someone else.

Right - thanks for the quick reply. That makes sense… I guess I was just hoping this workaround would work for me… perhaps it won’t.

To be clear, I am only trying to use my own API through the API Connector because I need to get a response from the action when I have it in a frontend workflow. I want to be able to grab “Results of Adding a thing” so I can take a user directly to the given page. This is easy when creating a Thing on the frontend, but less secure.

If I use a backend workflow in the page’s workflow to create a thing, it’ll work but I can’t use “Results of” that step to grab the new thing and send user to a related page.

If I use API Connector to create the Thing, then I CAN get the response on the frontnend and use “Result of Step X” to access the results. The only problem, as mentioned, is that now the Thing isn’t created by the Current User… but rather it is created by (admin).

Any wisdom? Otherwise I think I just have to go in a different direction and keep Thing Creation happening on the frontend :frowning: