Overview
Automatically refreshing galleries is a great way to keep users up to date without requiring user’s to manually press refresh buttons.
With the use of a timer, it’s easy to implement automatic refreshes on your data sets.
YouTube
Add Timer
Add a timer to your screen. It can be temporarily visible while you’re building out the auto refresh functionality.

Update Timer Properties
There are several properties that will need to be refreshed on the timer:
Duration
Set this to the amount of time that will be between refreshes. For testing purposes, you can use 15 seconds but I would recommend either 1 or 2 minutes.

Repeat
Set the Repeat property to true

OnTimerEnd
The OnTimerEnd property will be used to refresh your dataset. Include the tables that need to be refreshed here

Screen – OnVisible
This is not part of the timer, but we want to add a global variable called automaticRefresh to the OnVisible property of our screen. This will trigger to timer to automatically start when visible. The other benefit of using this variable, it will allow us to reset the timer when the user manually triggers a refresh.

AutoStart
Update the AutoStart property to the global variable

Once this has been completed, you will notice that when pressing play in the Power Apps editor the timer does not start. When this happens, it’s best to save the app, and then close and reopen the app. The timer will be properly registered with the global variable and start when the screen becomes visible.
Update Manual Refresh Icon
If you’re using a manual refresh button/icon, it is ideal to reset the timer whenever it is pressed to avoid too many refreshes in a short period of time. To do this, you will have to turn off the auto refresh, reset the timer, and turn the auto refresh on.
//turn off automatic refresh
Set(automticRefresh, false);
//reset timer
Reset(timer_GalleryRefresh);
//turn off automatic refresh
Set(automticRefresh, true);

Test It Out!
At this point, you will be able to add data behind the scenes outside of your app, and you will notice your dataset automatically refresh within the app.
