Automating App-Builder Data Source Refresh via API Call?

Hello everyone,

I’m wondering if there’s a way to automatically refresh an App-Builder data source using an API call. I tested the dispatch_builder_page_workflow_action endpoint in Redoc, but it only works with createRow, updateRow, and deleteRow events. When I attempt to dispatch a refreshDataSource event, I receive the error “ERROR_WORKFLOW_ACTION_CANNOT_BE_DISPATCHED”.

My goal is to allow a user to trigger an external script from within an App-Builder page, which is initiated by modifying a row (triggering a webhook). This script then modifies data, followed by a request to refresh the data source.

Currently, the user has to manually hit the refreshDataSource button multiple times until the updated data appears in the page.

Is there any way to automatically trigger a data source refresh event without the user having to manually click the button repeatedly until the script is finished?

Thank you for your help!

There is no way to trigger the refresh of a client from an endpoint for now.

However that’s an interesting and powerful feature, I’ve created a ticket Allow to wait for long processes in an action workflow (#3208) · Issues · Baserow / baserow · GitLab to keep track on it.

1 Like

Thank you for getting back to me and for opening a ticket for this feature request, I genuinely appreciate it. Allowing a script to refresh the client from an endpoint would greatly enhance Baserow’s App-builder capabilities and would let us weave in complex scripting. Opening up so many possibilities for more dynamic and automated workflows in Baserow-built apps.

I’m grateful for the time you’ve taken to understand the idea behind my request and to consider its potential. Looking forward to see how it progresses :crossed_fingers:t2:

1 Like

I spent some time thinking about, what the most elegant solution would be for the app builder and how to implement it. I guess the adding of a ‘waitUntilConditionIsMet’ event would be the best solution and most easily to implement.

Think about it. You basically only need an additional eventType where you can define a boolean field of a record that should be listened to. Maybe add a timeout value… Since the external process can and will simply set the defined boolean to true when the modified data is posted via api call.

I think both implementation makes sense for different uses.

  • The waitUntilContitionIsMet is more versatil but needs to poll regularly the endpoint.
  • The waitUntilSomeoneCallsMe is more performant but needs more work on the caller side.

It would be great to have both features :smiley: We’ll do it!

1 Like

Thanks, jrmi, for planning to embrace these ideas! It’s impressive how quickly you guys and the community have turned the app builder into such a powerful platform (in combination with baserow as a database).

The hollistic approach of baserow has made a big difference for me, and this update will be the key piece we’ve been waiting for to secure integration and automation. I appreciate all the effort your team is putting in, and we can’t wait to see Baserow in its final form! cheers ✌🏻😃

3 Likes