**#AppSheet | Inicio de sesión con clave de teclado aleatorio en AppSheet — Transcript & Summary | SozAI**
Source: https://sozai.app/transcript/appsheet-random-keyboard-login/

Learn how to create a secure login with a randomized keyboard in AppSheet using Google Apps Script for enhanced user authentication.

## Key Takeaways

- Randomized keyboards can enhance login security in AppSheet apps without paid enterprise licenses.
- Google Apps Script enables automation and dynamic updates of keyboard layouts in Google Sheets.
- Using enum columns linked to dynamic tables allows for flexible UI elements in AppSheet user settings.
- Stepwise conditional display of input fields improves user experience during login.
- This approach is a practical workaround for adding security but does not replace full enterprise authentication.

## What the video covers

- The video explains implementing a login system in AppSheet using user settings with email and password inputs.
- It introduces a randomized numeric keyboard for password entry, improving security by changing number positions every minute.
- Google Apps Script is used to shuffle the keyboard numbers automatically on a timed trigger.
- The script requires permissions and runs every minute to update the keyboard layout dynamically.
- Four separate keyboard tables are created in Google Sheets, each containing numbers 0-9 in randomized order.
- AppSheet user settings are configured with enum-type columns linked to these keyboard tables to display randomized digits.
- The keyboard digits are displayed as buttons in the app for a better user experience.
- Conditional display logic is applied so that each keyboard digit field appears only when the previous digit is filled, creating a step-by-step input flow.
- The video highlights that this method adds a layer of security but is not as secure as enterprise Google login options available with paid licenses.
- The presenter provides the script code in the video description for viewers to implement the solution themselves.

Answers

## Questions about this video

How does the randomized keyboard improve security in AppSheet?

The randomized keyboard changes the position of numbers every minute using a Google Apps Script, making it harder for unauthorized users to guess passwords based on key positions.

Is this login method as secure as Google enterprise login?

No, this method adds a layer of security but does not match the security level of Google enterprise logins available with paid AppSheet licenses.

How often does the keyboard layout change?

The keyboard layout changes every minute automatically through a timed trigger in the Google Apps Script.

## Full Transcript — Download SRT & Markdown

00:00

Speaker A

Hello everyone, welcome to another video on my channel. I want to thank everyone who has subscribed, and everyone who has commented and reacted positively to my videos. Thank you very, very much. Sometimes we have to use the user settings so that users can log in to the app. This can be achieved through the user settings tables, where we can enter a user email and our password. 1, 2, 3, and here we save. We see that the password, the keyboard disappears for greater security, and we are going to click save. This login allows us to give a little more security when the user is entering their email and password, but it is not the same security that the Google suite offers when you pay for a license per user. When you are paying, let's say, $ or $10, which are the Appsheet licenses for business plans, there are others with other values. When you pay for these licenses, Appsheet gives you a layer of security to log in with Google, Microsoft, and other platforms, and it does so in a very secure way. On the other hand, when the applications are public, you have to certify that it is a public application and that anyone with that link can access the information. What we do with this login is give it a layer of security, so to speak, but it is not the same security that a Google login has, so that they take it into account. What we are doing here is giving it a little more dynamism and making our login system a little more secure. Here we can see that when the user has entered the data, it lets them save the information and they can continue. To begin, we have seen that in our database we have created the tables keyboard one, keyboard two, keyboard three, and keyboard four. These sheets will contain the numbers 0 to 9, and the idea is that in this column, a script that we are going to create and activate will change the order of the sequence so that the keyboard has a different position for its numbers every minute. For that, we are going to use Google Apps Script today. We are going to do a brief introduction to how Google Apps Script works. Google Apps Script allows us to extend the functionalities of Excel and automate processes or tasks, and it works for the entire Google suite. So, what it allows us to do is automate tasks and extend functions. In the case of Google Sheets, it allows us to create custom formulas like the one we are going to do. In this case, I used artificial intelligence to create a code that I will leave in the description of the video. We are going to give it Appscript extensions. Here in Appscript, we are going to delete what the code generates for us and paste the code that I will leave in the description of the video. What this code does is that on keyboard one, from keyboard one to four, it will change the order of the data in column A, that is, these. It will change the order and in a random order. When will it do this? Every minute, yes, every minute the time activator comes and executes this script. Let's save it and run it at least once to see how it works. Here we see that the numbers on the keyboard have not been organized and we are going to execute our script. We execute it. It will ask us for permissions here. We tell it to review permissions. We say that with the account in which it is the creator, we give it advanced configuration and we click on go to the project and click on allow. At that moment it already has the permissions, the execution starts and ends and shows us that it has changed the data on the keyboard. So, we will see that this data is changing every minute. For example, here it starts with 6, 2, 3. Let's wait a minute and it should change and now it's on 6, 2, 8. The three changed position and the same must have happened on the other keyboards. Let's look at this one for example and there we see that they change. Yes, it does this every minute. Once we have this, then we are going to create the keyboards and add them to our Appsheet database. Here we have them. Keyboard one, keyboard two, keyboard three, and keyboard four. Once we have added them, we are going to format them. So, the keyboard, each of the keyboards will have the ID column in number and the number column will be of type number. So for the other keyboards, the user table will have it here in the email, the name, and the password number. This password number will be a text. Now what we are going to do is from the application, from the Appsheet editor, we are going to go to the user settings and here we can see that our columns are disabled. All these columns are disabled by default, but we are going to enable them. So, I named the first one image, it will be an image that will appear there in the login, a welcome image. The second one will be email, with the name email and the type email. We are going to show these two. And these are going to be the digits from one to four. Each one of these, each one of these digits is going to be of the enum type. We are going to show it and we are going to tell it that the values of this enum are going to be the list of each one of these keyboards. In the case of keyboard one, of digit one, which refers to keyboard one, it is going to be a call to the table keyboard one, column number and that's it. I could say select, keyboard one, where all, but here I simply call the table, the column, and it automatically brings me that list. Since I am telling it to put it in an enumeration because the number column is of the number type. We are going to save it. Here we can see that the number keyboard column is of the number type. And let's see how that keyboard is generated for us. When I enable a field in the user settings, I enable it to be displayed in the show section. That field will immediately enable the settings table, which is a table that is a view, it will enable the settings view, which is what we see here. We can already see that we have the email and the digit with the numbers from 0 to 9 organized randomly, but I want this to look like a keyboard. So let's click edit here and tell it to display it as buttons. Boom. Here it is and it already looks like a keyboard. I can press and that's it. Let's save. Now I'm going to do the same for the other digits. So let's go back to the user settings. Digit two would also be of the enum type. We're going to show it. We're going to tell it to be a base number. We're going to tell it to be of the base number type and in the autocompute the suggested value is the keyboard two column number. There you have it. The same for three and four, I already have them here. I'm just going to show you. Let's say it's a number type. First, keyboard four. Keyboard three. We're showing it on keyboard three. So far, we have our keyboards. I need it to clear every time I press one of these keyboards and show the other keyboard blank so I can continue editing and not have to scroll down to enter the password. So, what we're going to do is play with the shows. When, for example, digit one is going to be shown, it's always going to be shown, but it's going to stop showing when there's data in the same field. So, we're going to tell it no, to show it when it's blank. Yes, when the data is blank, which data? Digit one. I can put digit one here or I can put DIS on the floor DIS. I'm referring to digit one because that's where I'm standing at that moment. DIS is blank, DIS is shown. We're going to do it for the others. Two, three. So, we can see that every time I click on one, the next keyboard appears. I click, I click, and they all disappear. Okay, but now I only want to see one keyboard at the moment I'm going to click on the data. So, we tell it to display digit one and stop displaying when it's no longer blank, but to display digit two, not to display when it no longer has data, but to display when digit one has data so that it then goes in a chain. So digit two will be displayed when digit one is not blank. Digit one is not blank. It's not blank. So, what is it going to do? It's going to evaluate the follow.

00:17

Speaker A

in to the app. This can be achieved through the user settings tables, where we can enter a user email and our password. 1 2 3 and here we save. We see that the password, the keyboard disappears for greater security and we

00:38

Speaker A

are going to click save. This login allows us to give a little more security when the user is entering their email and password, but it is not the same security that the Google suite offers when you pay for a license per

00:53

Speaker A

user. When you are paying, let's say, $ or $ 10, which are the Appchet licenses for business plans, there are others with other values. When you pay for these licenses, Appset gives you a layer of security to log in with Google

01:07

Speaker A

, Microsoft, and other platforms, and it does so in a very secure way. On the other hand, when the applications are public, you have to certify that it is a public application and that anyone with that link can access the

01:20

Speaker A

information. What we do with this login is give it a layer of security, so to speak, but it is not the same security that a Google login has so that they take it into account. What we are doing

01:34

Speaker A

here is giving it a little more dynamism and making our login system a little more secure. Here we can see that when the user has entered the data , it lets them save the information and they can continue. To begin, we have

01:49

Speaker A

seen that in our database we have created the tables keyboard one, keyboard two, keyboard three, and keyboard four. These sheets will contain the numbers 0 to 9, and the idea is that in this column, a script that we are going to create and

02:04

Speaker A

activate will change the order of the sequence so that the keyboard has a different position for its numbers every minute. For that, we are going to use Google Appscript today. We are going to do a brief introduction to how

02:16

Speaker A

Google Appscript works. Google Appscript allows us to extend the functionalities of Excel and automate processes or tasks, and it works for the entire Google suite. So, what it allows us to do is automate tasks and extend functions. In the case of Google

02:33

Speaker A

Sheet, it allows us to create custom formulas like the one we are going to do. In this case, I used artificial intelligence to create a code that I will leave in the description of the video. We are going to give it

02:44

Speaker A

Appscript extensions. Here in Appscript , we are going to delete what the code generates for us and paste the code that I will leave in the description of the video. What this code does is that on keyboard one, from keyboard one to

02:58

Speaker A

four, it will change the order of the data in column A, that is, these. It will change the order and in a random order. When will it do this? Every minute, yes, every minute the time activator comes and executes this

03:15

Speaker A

script. Let's save it and run it at least once to see how it works. Here we see that the numbers on the keyboard have not been organized and we are going to execute our script. We execute it. It will ask us for permissions here

03:29

Speaker A

. We tell it to review permissions. We say that with the account in which it is the creator, we give it advanced configuration and we click on go to the project and click on allow. At that moment it already has the permissions,

03:47

Speaker A

the execution starts and ends and shows us that it has changed the data on the keyboard. So, we will see that this data is changing every minute. For example, here it starts with 6 2 3.

04:01

Speaker A

Let's wait a minute and it should change and now it's on 628. The three changed position and the same must have happened on the other keyboards. Let's look at this one for example and there we see that they change. Yes, it does

04:18

Speaker A

this every minute. Once we have this, then we are going to create the keyboards and add them to our APCHI database. Here we have them. Keyboard one, keyboard 2, keyboard 3 and keyboard four. Once we have added them,

04:32

Speaker A

we are going to format them. So, the keyboard, each of the keyboards will have the ID column in number and the number column will be of type number.

04:42

Speaker A

So for the other keyboards, the user table will have it here in the email, the name and the password number. This password number will be a text. Now what we are going to do is from the application, from the Appsit editor, we

04:57

Speaker A

are going to go to the user settings and here we can see that our columns are disabled. All these columns are disabled by default, but we are going to enable them. So, I named the first one image, it will be an image that

05:10

Speaker A

will appear there in the login, a welcome image. The second one will be email, with the name email and the type email. We are going to show these two.

05:18

Speaker A

And these are going to be the digits from one to four. Each one of these, each one of these digits is going to be of the enum type. We are going to show it and we are going to tell it that the

05:32

Speaker A

values of this enum are going to be the list of each one of these keyboards. In the case of keyboard one, of digit one, which refers to keyboard one, it is going to be a call to the table

05:45

Speaker A

keyboard one, column number and that's it. I could say select, keyboard one, where all, but here I simply call the table, the column and it automatically brings me that list. Since I am telling it to put it in an enumeration because

06:09

Speaker A

the number column is of the number type . We are going to save it. Here we can see that the number keyboard column is of the number type. And let's see how that keyboard is generated for us. When

06:21

Speaker A

I enable a field in the user settings, I enable it to be displayed in the show section. That field will immediately enable the settings table, which is a table that is a view, it will enable the settings view, which is what we see

06:36

Speaker A

here. We can already see that we have the email and the digit with the numbers from 0 to 9 organized randomly, but I want this to look like a keyboard . So let's click edit here and tell it

06:49

Speaker A

to display it as buttons. Boom. Here it is and it already looks like a keyboard . I can press and that's it. Let's save . Now I'm going to do the same for the other digits. So let's go back to the

07:06

Speaker A

user settings. Digit two would also be of the enum type. We're going to show it. We're going to tell it to be a base number. We're going to tell it to be e of the base number type and in the autocompute the suggested

07:25

Speaker A

value is the keyboard two column number . There you have it. The same for tr and cu, I already have them here. I'm just going to show you. Let's say it's a number type. Burs. Keyboard four.

07:35

Speaker A

Keyboard three. We're showing it on keyboard three. So far, we have our keyboards. I need it to clear every time I press one of these keyboards and show the other keyboard blank so I can continue editing and not have to scroll

07:52

Speaker A

down to enter the password. So, what we're going to do is play with the shows. When, for example, digit one is going to be shown, it's always going to be shown, but it's going to stop showing when there's data in the same

08:06

Speaker A

field. So, we're going to tell it no, to show it when it's blank. Yes, when the data is blank, which data? Digit one. I can put digit one here or I can put dis on the floor dis. I'm referring

08:25

Speaker A

to digit one because that's where I'm standing at that moment. DIS. is blank dis is shown. We're going to do it for the others.

08:35

Speaker A

Two, three. So, we can see that every time I click on one, the next keyboard appears. I click, I click, and they all disappear.

08:50

Speaker A

Okay, but now I only want to see one keyboard at the moment I'm going to click on the data. So, we tell it to display digit one and stop displaying when it's no longer blank, but to display digit two, not to display when

09:05

Speaker A

it no longer has data, but to display when digit one has data so that it then goes in a chain. So digit two will be displayed when digit one is not blank.

09:20

Speaker A

Digit one is not blank. It's not blank. So, what is it going to do? It's going to evaluate the following function.

09:30

Speaker A

This one is blank, that is, digit two. Digit one is not blank and digit two is blank. So, at that moment it will be displayed because we are telling the condition to be met by means of an an,

09:42

Speaker A

that is, that both have to be met. Now, the same for digit 3. Digit 3, when will it be displayed? When it's blank, digit three, but also when it's not blank, digit two. And we insert it. We click here and we can insert the column

10:01

Speaker A

there directly. We separate it with a comma and we need a parenthesis. Save. And now the same for digit four, so that it's displayed when it's blank and when it's not blank. Digit three, comma . Done. So now we can see that a

10:28

Speaker A

keyboard will appear on the keyboard right away. Yes, when I press it, the keyboard for digit two will appear.

10:35

Speaker A

We'll see that the numbers are out of order. Digit three, digit four and we press and they disappear. Now I want to do something similar to when I'm logging into Google, so that when I press a key it turns into an asterisk

10:50

Speaker A

or, in this case, a period. We're going to do something similar and that is that we're going to give names in the display name to each of these digits.

11:00

Speaker A

For example, digit one will be called enter your password. Digit two will be called a number. Digit three would be two numbers, and digit four would be three numbers. Let's save. This is simply to give it the appearance that

11:36

Speaker A

the data is being saved in Google Drive and that it is stored in an asterisk or a number. So, for example, here it says , "Enter your password." So, I start, if my password is 1, 2, 3, 4, I enter

11:49

Speaker A

one. So, this one looks like this number that was placed here. If I enter two, it will become another number. If I enter three, and if I enter four, it should show me a message that you have successfully logged in or that the

12:04

Speaker A

password is incorrect. How are we going to make this message? We go here to the next option and we are going to select it as type, we are going to select that we are going to activate it and that it

12:15

Speaker A

is going to be called login. It's going to be called login. It's going to be of type and or note. And we're going to set a condition. What is the condition for the password of the user we're entering in the email? We're going to

12:33

Speaker A

do a lookup search. We're going to do a search for the email we're putting up there. We're going to look for this email in the users table that we created earlier, user, in the email column and return the password. Done.

12:57

Speaker A

This must be equal to what? Well, to the digits that I've entered, to the concatenation of the digits. We can do it like this. Digit one, digit two, digit three, digit four. We concatenate it by putting an ampersand here. And to

13:12

Speaker A

avoid getting tangled up with this, because these are numbers, we're going to set it to convert this into a string , into text. So, at that moment, it's going to validate that the password of the user of the email they're putting

13:24

Speaker A

there is equal to the concatenation of the digits we've entered. And if there is an error telling us that the password or data is incorrect. Done.

13:38

Speaker A

When will the login be displayed? It will be displayed when the validation condition is not met. So, for that we are going to go to the show and set it to display when this is not equal, to validate when it is equal, but to

13:53

Speaker A

display when it is not equal, that is, when the password is incorrect, because if it is correct, it should not display it. Rather, we should display a welcome message. So, it is being displayed here because since there is no user in the

14:08

Speaker A

email or a password entered, it is comparing a blank space with another blank space. So, in that case it is being told to display it. Now, this has a formula. The formula is going to be the same validation. Let's say here in

14:26

Speaker A

the autocompute, in the formula app, that if this is equal, it should give me true. It means that the user is logged in and it should be displayed.

14:35

Speaker A

There it was showing because it was blank, but I want it to show when data has been entered in the email, that is, it is not blank when the email is not blank. If the email is not blank, if

14:50

Speaker A

the email is blank, this will not be shown. And now the login should not be shown either if the password has not been entered, as in the case we saw now that it is being shown, regardless of whether the password was not entered.

15:06

Speaker A

So, we are going to tell it no, it is not blank either. Is not blank. Each of the digits. We do the same for this is not blank. Digit two, digit three, digit cu.

15:30

Speaker A

Done. So, if the digits are not blank, if the email is not blank, if the passwords are not the same, then the login will be shown and it will tell the user, "You have an error in your password." Let's save and test how it

15:46

Speaker A

goes. At that moment, the login does not appear. I am going to put any email here. Ready@gmail.com and I'm going to enter any password. It tells me that the data is incorrect. From there it won't let me save. What do I have to do

16:07

Speaker A

? Cancel and re-enter the access data. So, this email pepito@gmail with the password 1 2 3 does work or the one, the two is over here 3 cu 1 2 3 4.

16:19

Speaker A

There it doesn't show me the login because I'm telling it to only show when the password is incorrect so it doesn't let me save. But here we're going to show a show column that tells it that the user logged in successfully

16:32

Speaker A

. So here we're going to put a welcome message. We're going to put the message as a show type. We're going to say that it shows that it's a section here type and here we're going to put a message.

16:49

Speaker A

Welcome to the system, colon and we're going to put the name of the user who is logging in. So, for that we do a lookup. Look up of the user. In the user table it's the email. It's the

17:23

Speaker A

email in the user table, in the email column it returns the name. and return the name. So, this will throw a message to the user saying, "Welcome to the so-and-so system." Let's save it and show it when there is an effective

17:53

Speaker A

login. And when there is a login, well, we already set the condition there. So, here we are simply going to tell it that it is a login, because since login is of the true or false type, the moment login is true, then the show

18:07

Speaker A

will be activated and will show the message. If it is false, then no. Let's save and let's see how it looks there so far. Here we can see that we have the email. Let's put Pepito's email.

18:21

Speaker A

Let's put Pepito's email. Here we enter the key 1 2 3 cu and it tells me, " Welcome to the Pepito system." But here it comes out in lowercase. I want everything to come out in uppercase. So we go to the show column and we are

18:37

Speaker A

going to give the name, that is, the search that is being done, the formula upper. And what this does is convert the name to uppercase. We've already seen what happens when you enter the password incorrectly. We've already seen what happens when you enter it

18:53

Speaker A

correctly. So, we're entering the password. 1, 2, 3, and cu. We save and it lets us log in. Now we're going to give this message a space here because the name is already pasted. And that's it. Up to here we have our login

19:15

Speaker A

practically ready. We can put a welcome image here. It can be the same logo image that we've been using or we can look for a login image. So, what we're going to do now is look for an image to

19:27

Speaker A

put there as a welcome image. For example, we're going to upload this user login image to our Drive. And once we upload it to Drive, we're going to copy this URL that I'm leaving in the comments of the video and we're going

19:41

Speaker A

to see something very interesting. When we're in the drive, we're going to go to our newly added image, we're going to open it, we can open it in a new window and you'll see that it gives us a code here. We're going to paste this

20:00

Speaker A

code into our URL that I'm leaving in the description of the video. Every time I press enter on this image, it will open the image for us. So, this same URL that I just copied there, we are going to copy it here to display in

20:17

Speaker A

the welcome message. We are going to enter the image type here, everything in quotes, we are going to upload our link to the image that we just created.

20:30

Speaker A

So, when I enter the settings, it will create our welcome image for us and there we will give our login a little more style. So, here we can enter a username, enter a password and it will let us. If the password is incorrect,

20:47

Speaker A

it will not let us either, it tells us that the data is incorrect and we will not be able to save until we enter the correct data. Now, what happens is that when the user logs in and we go back to

20:59

Speaker A

the settings view, their email appears and it says, "Welcome to the Pepito system." But for some reason I need to make the user log out of there and if any information was being displayed with that email, it will no longer be

21:14

Speaker A

displayed. So we're going to make it so that when this data is entered here it's deleted and I can't save here, but I can log out. To do that, we're going to go back to settings. We're going to

21:27

Speaker A

go to user settings and we're going to tell the email field to reset every time it starts. Okay. Same thing for the digits. Done. So, let's see what happens here. The digits are reset every time I log in. So, we're going to

21:59

Speaker A

enter the password again, the email, the password. Save. And if I go back to user settings, it's going to show us the blank fields, I could save and, so to speak, log out, that is, let the user no longer be logged in. So, what

22:20

Speaker A

should we do? First, make this keyboard show up when there's data above it. If there's no data above it, then it doesn't show up. So, we're going to put a notation, is not blank. email and if this, that is, the first link is blank,

22:42

Speaker A

then show that column. So, until I enter an email, the password to enter will not be displayed to me, just like it is here. Now, we are not going to tell our login to reset every time it starts. Why? So that we can format this

23:02

Speaker A

button so that when someone logs in, it says log out and when they have not logged in, it says log in. How do we make that change? Let's go to localization and go to the save button.

23:16

Speaker A

Here it is, it says save. Here we are going to give it a condition. We are going to tell it if pun login is true.

23:27

Speaker A

Then it will show log out, because the session is started. If disuser punto login is not true, then it will show log in. Now if he is in the view, then if contex view, if the view he is in at

23:53

Speaker A

that moment, the context of the view is called settings. If we are in the settings view, which is when we are logging in, make this evaluation so that it says log out or log in. But since that button also needs to be

24:09

Speaker A

called save in other views, if it's not in that view, it's going to be called save normally as usual. And we're going to click save and see what happens.

24:23

Speaker A

Let's enter Pepito's email again. Here it's evaluating an error. We're missing a comma. It says that there's no login.

24:45

Speaker A

Login. We saved a message, it would be login. And settings is misspelled. So, here we can see that it already shows us login. If I correct an email, for example, Pepito's, I enter it, the keyboard will appear and I click login.

25:30

Speaker A

If I enter that menu again, it will tell us to log out, it won't ask for a password or anything and I simply log out. Why? So that when I try to enter again, it will tell us to log in and

25:45

Speaker A

that way we make this button change its name constantly. We can already see that the keyboards are also changing their random position constantly. We can now see how to log in, how to use it, and how to make it more secure for

26:00

Speaker A

the user, so that the user believes that they are actually there. Because many times in blogging, what we did was leave the text field open and enter the data there and then save, but that is not a very secure style. You can still

26:17

Speaker A

use this for many other functions. The idea of today's video is to learn the concepts and learn how to solve errors.

26:25

Speaker A

For example, we got an error there that a comma was missing. So, learn how to detect that. How do we do it? Because it is very important for the maintenance of our applications. We also learn how to manage Google Apps,

26:37

Speaker A

how to create a Google App, and how to program it to run on its own. And now we can see that our login is working.

26:47

Speaker A

Later we can make other improvements, but the main idea was to have today's result. I hope this video is useful to you, guys. Thank you very much. See you in a new video.

Topics: AppSheet Google Apps Script randomized keyboard secure login user authentication AppSheet user settings Google Sheets automation enum type input dynamic UI password security


---
This is the markdown twin of https://sozai.app/transcript/appsheet-random-keyboard-login/ — the same content, without the markup.
Published by SozAI (https://sozai.app). Reuse and quotation are allowed with attribution and a link back.
Machine-readable index: https://sozai.app/llms.txt · data API: https://sozai.app/api/
