# Page is Closed Workflow

**URL:** <https://forum.bubble.io/t/page-is-closed-workflow/39707>\
**Category:** Questions\
**Created:** [October 10, 2018, 5:00pm UTC](https://forum.bubble.io/t/page-is-closed-workflow/39707 "2018-10-10T17:00:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![fullerfarmssheep](https://avatars.discourse-cdn.com/v4/letter/f/bb73d2/32.png) [@fullerfarmssheep](https://forum.bubble.io/u/fullerfarmssheep)\
**Post date:** [October 10, 2018, 5:00pm UTC](https://forum.bubble.io/t/page-is-closed-workflow/39707/1 "2018-10-10T17:00:26Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![luke2](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/luke2/32/256674_2.png) [@luke2](https://forum.bubble.io/u/luke2)\
**Post date:** [October 10, 2018, 5:50pm UTC](https://forum.bubble.io/t/page-is-closed-workflow/39707/2 "2018-10-10T17:50:58Z")

</div>

This plugin comes to mind:

> **[Exit Intent Plugin for Bubble](https://bubble.io/plugin/exit-intent-1511633892621x172898325333540860)**
>
> Exit Intent Plugin page on Bubble. Add Exit Intent in one click to your app. Bubble lets you build web apps without any code.

Hope that helps.

Luke

---

<div class="post-metadata">

**Author:** ![dan1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dan1/32/23411_2.png) [@dan1](https://forum.bubble.io/u/dan1)\
**Post date:** [October 10, 2018, 6:10pm UTC](https://forum.bubble.io/t/page-is-closed-workflow/39707/3 "2018-10-10T18:10:51Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![fullerfarmssheep](https://avatars.discourse-cdn.com/v4/letter/f/bb73d2/32.png) [@fullerfarmssheep](https://forum.bubble.io/u/fullerfarmssheep)\
**Post date:** [October 11, 2018, 3:02pm UTC](https://forum.bubble.io/t/page-is-closed-workflow/39707/4 "2018-10-11T15:02:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dan1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dan1/32/23411_2.png) [@dan1](https://forum.bubble.io/u/dan1)\
**Post date:** [October 11, 2018, 3:12pm UTC](https://forum.bubble.io/t/page-is-closed-workflow/39707/5 "2018-10-11T15:12:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fullerfarmssheep](https://avatars.discourse-cdn.com/v4/letter/f/bb73d2/32.png) [@fullerfarmssheep](https://forum.bubble.io/u/fullerfarmssheep)\
**Post date:** [October 11, 2018, 4:50pm UTC](https://forum.bubble.io/t/page-is-closed-workflow/39707/6 "2018-10-11T16:50:59Z")

</div>

That seems brilliant! Thank you

---

<div class="post-metadata">

**Author:** ![dan1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dan1/32/23411_2.png) [@dan1](https://forum.bubble.io/u/dan1)\
**Post date:** [October 11, 2018, 5:00pm UTC](https://forum.bubble.io/t/page-is-closed-workflow/39707/7 "2018-10-11T17:00:18Z")

</div>

Happy to help!

---

<div class="post-metadata">

**Author:** ![ChefThomas](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/chefthomas/32/88144_2.png) [@ChefThomas](https://forum.bubble.io/u/ChefThomas)\
**Post date:** [April 19, 2021, 2:01pm UTC](https://forum.bubble.io/t/page-is-closed-workflow/39707/8 "2021-04-19T14:01:46Z")

</div>

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

> [@Show which users are on (viewing) a page!?](http://forum.bubble.io/t/show-which-users-are-on-viewing-a-page/146750):
>
> Hope you’re all doing very well! Has anyone figured out how to show which members are currently logged in AND viewing a page in your app? In the circled red section, I want to do a Repeating Group of all users (images) who are actively logged in and viewing this event. Thoughts?

---

<div class="post-metadata">

**Author:** ![aestela](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/aestela/32/140161_2.png) [@aestela](https://forum.bubble.io/u/aestela)\
**Post date:** [August 11, 2021, 1:46am UTC](https://forum.bubble.io/t/page-is-closed-workflow/39707/9 "2021-08-11T01:46:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pratima.dudhewar](https://avatars.discourse-cdn.com/v4/letter/p/a8b319/32.png) [@pratima.dudhewar](https://forum.bubble.io/u/pratima.dudhewar)\
**Post date:** [November 16, 2022, 10:20am UTC](https://forum.bubble.io/t/page-is-closed-workflow/39707/10 "2022-11-16T10:20:02Z")

</div>

@dan1  
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?
