Getting started with notebooks for ArcGIS Online

Fabien Ancelin
Geography Automated
4 min readNov 18, 2021

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.

Notebooks are accessed from the notebook tab. If you do not see that tab. ask your administrator to give you access via a custom role.

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.

Saving a sample notebook saves a copy of the sample notebook in your collection of notebooks.
Saving a copy of the sample notebook will let you save your configuration and access the task scheduler.

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 can automate the execution of any notebook you own using the task scheduler.

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.

Defining a name of optional URL parameters for our notebook task.

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.

Setting the daily execution of the notebook

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.

--

--

Geography Automated
Geography Automated

Published in Geography Automated

There is a gap between using geography to solve problems and automating problem solving processes. The world of automation has been led by programmers with few geographers found within it. This publication acts as a bridge between geography and automation.

Fabien Ancelin
Fabien Ancelin

Written by Fabien Ancelin

A GIS programmer interested in spatial problems, programming, and simplicity.