Getting started with notebooks for ArcGIS Online
A quick guide for non-programmers.
Notebooks for ArcGIS Online are a powerful tool. It can be intimidating for people with no programming skills. Luckily, ArcGIS Online provides some sample notebooks you can use to automate some of your workflows. This article will walk you through this process. You’re going to create a notebook that checks for insecure items in our organization. You will also configure the notebook to run at regular intervals. All of that with no programming skills.
Prerequisites
You will need to have access to Notebook for ArcGIS Online in your organization. This access is granted by default to administrators. If you have another type of account, you need to ask your ArcGIS Online administrator to grant you access.
Start with a sample notebook
The best way to get started is to start with a sample. Once connected to ArcGIS Online, go to the Notebook tab. There, you have access to a set of sample notebooks provided by Esri. Some of those notebooks can be very useful as is. We’re going to use an administration notebook: “Content Management: Identify insecure items”. You can use the search bar to find it.
Once the notebook is open, you can go through the explanations. They are usually very well written. Some notebooks will expect that you set a few configuration parameters. For that notebook, none of that is needed. We can execute it as is by running all cells. You can see that the notebook is running by checking the content of the notebook.
Once the notebook is executed, the list of insecure items is printed for you.
Save the notebook
Once you know the notebook does what you want, you need to save your own copy of the sample notebook. Click the Save As button on the top-right of the notebook. This is a mandatory step to be able to run the notebook using a task scheduler. You need to own the notebook to be able to schedule its execution or save any modification.
Execute automatically via the task scheduler
Saving a copy of the sample notebook in your content gives you access to additional capabilities. You now have access to a task scheduler. We’re going to configure this notebook to run every day, at 12:00 AM. In the menu, click on the icon Tasks and then the create task button.
You will first be prompted to define a title for your notebook. You can also define extra parameters to be passed via HTTP calls, but you won’t need that now. If you want to know more, you can check some use cases here.
The second configuration window is the most interesting. This is where you define the frequency of execution for this notebook. In our case, we’re setting the notebook to run every day, at midnight. This will be executed for as long as the notebook exists and this user is valid.
If you can code in Python, you have much more options to customize the sample notebook or start from scratch. Even if you’re a seasoned developer, sample notebooks can save you a lot of time. Regardless of what you want to do, always check if there isn’t a sample notebook to do it.