Page is Closed Workflow

Is there a way to make a workflow that happens when the page is closed? I’d really like to use this in an app of mine, and I was wondering if there was a bubble feature or a plug in that allowed this. Thanks for your time!

This plugin comes to mind:

Hope that helps.


@fullerfarmssheep - as well, are there some specific things you’re looking to accomplish within the page is closed workflow?

Based on that, there may be a few other helpful suggestions the community has to share.

Yes. Essentially, I’m looking to toggle an “Online” yes/no feature in one of my apps, but I am unable to do this since not everyone will click a “Log Out” button to toggle it. The “Online” yes/no is a part of the User data.

For tracking online (active) status, you can have a workflow on the current page that works on a “Do every X seconds” condition. Essentially, that workflow could update a timestamp field of last active.

Then, where you want to display lists of active users, you can "Do a search for user’s who’s active status is greater than n seconds.

This helps solve the user walks away from their computer and doesn’t do anything for 15 minutes inactivity problem.

1 Like

That seems brilliant! Thank you

1 Like

Happy to help!

you just helped me out here, @dan1 - I wanted to say THANK YOU!

Really old thread but found it extremely useful, on the other hand I “enhanced it” by recording the scroll position. With the current solution, If the user leaves the tab open but continues to work on other tabs or apps, the app continues to run the workflow. So by recording the scroll position you can compare and only update the “lastActive” timestamp if the current scroll position is different from the last one recorded. This way if, the user leaves the tab open (but not focused) and nothing is being done in the app, then it’s shown as “idle” if more than 10 minutes have passed, and Offline if more than 30 minutes sin the last timestamp.

1 Like

I have situation where I want to trigger and call the API but just while leaving the page.

There are many toggle buttons on page. But until and unless user does make any changes in the page , then only i want to call the API.
So i have placed a custom state on page as “yes/no”. And bydeafult it is “no”.
I’m just changing custom state value to yes if user triggers any ionic toggle.
So here is another case is: user can make changes to 1 or more toggles but i want to call API only once at the end of all changes…

So how can i achieve this without plugin?