Is there a way to check if the device is connected to the internet?

I added a button in my app that sends data from a list to a Google Sheets spreadsheet. Obviously this needs an internet connection in order to do so. However, I have no way of knowing if this was successfully sent.

Is there a way to receive an alert if there is no internet connection?

This is what I have so far:

See here

You should check this:

Well, you could have an excellent Internet connection and still have a send/receive failure with Google Sheets.

Please show your relevant blocks for sending data to your google sheet.
Is your google sheet set to "anyone with the link can view" ?