Hi @Alex_Napoles Thanks for reaching out! You can trigger a query from your custom component to run the insert query. You'll also want to update your custom component's model with the newly added event & then you can refer to the custom component's model, as described here ({{customComponentName.model}}
)
Here's a similar example that may help! Instead of triggering a JS query that updates temporary state, it sounds like you will be writing to Retool Database.