Forum Academy Marketplace Showcase Pricing Features

How to delete after x amount of time

Hello guys,

So I want to be able to create a thing (a booking request) and leave it live for 12 hours only, until the landlord replies to the request, if that doesnt happen I want to delete that thing. How should I do it?

In my app I had a similar situation where I wanted a thing to be deleted after 48 hours. To overcome this, I created a workflow that triggered whenever a user loaded the page; the workflow deleted all the data (in your case, booking requests) that were out of date.

So for example:
Delete Thing: Search for Booking Requests WHEN Current Date/Time (-12 hours) < Created Date

It may not be ideal, but his method works. I hope this made sense :grinning:

Another suggestion would be to do this:

@dylanwares @J805 Where should I put those actions. Any advice? Any page, main page, because it is a workflow that is independent of any other action on the app I am not sure where to set it to be sure that is running at all times seeking for requestwhich are 12h old

If you do the Scheduled API workflow then you would add the workflows to the API Workflows once you enable them. It would be a server side workflow not a page workflow. :slight_smile:

Maybe I can do a future video about scheduled workflows like this for my YouTube Channel.

Want to learn more for free? πŸ‘¨πŸ»β€πŸ’»

Subscribe to my free tutorials at the
:clock4: NoCodeMinute on YouTube :grin:

Dancing%20Small

whats that server workflow? never heard sorry

No problem, have you taken a look at the forum post I sent you?

Capture

If you need me to do an example I can try to do that for you.

Hello @J805 sorry for the late reply. If you could that would be awesome

Here is the example for you:

Editor: https://bubble.io/page?type=page&name=index&id=805-12hour&tab=tabs-1
Viewer: https://805-12hour.bubbleapps.io/version-test?debug_mode=true

Your plan can’t be on a hobby plan to use the API scheduled workflows though. Just FYI.

Hope that helps! :slight_smile:

Want to learn more for free? πŸ‘¨πŸ»β€πŸ’»

Subscribe to my free tutorials at the
:clock4: NoCodeMinute on YouTube :grin:

Dancing%20Small