Written: 12 August 2026
From September 2026 Legacy notebook creation will be disabled and new Snowflake notebooks will need to be created via Workspaces.
Scheduling workspace notebook execution via Snowflake Task is slightly more complicated than with Legacy notebooks and this guide runs you through the steps for creating and debugging tasks that execute workspace notebooks.
To automate the execution of a workspace notebook you’ll need both the CREATE NOTEBOOK PROJECT and CREATE TASK privileges granted on your role.
A workspace is a private, file-based environment which each Snowflake user has access to.
Any files you create in Snowsight (SQL scripts, notebooks, etc) are part of your workspace.
A Notebook Project Object (NPO) links a workspace to a database and schema and is needed as Snowflake Tasks don’t execute notebooks directly (like they did with Legacy notebooks) but instead execute NPOs.
-- To see all the files in your Workspace:
LIST 'snow://workspace/USER$.PUBLIC.DEFAULT$/versions/head' ;When NPO is created, all files from the workspace are copied into the project in the specified database and schema (including the Snowflake notebooks we want to automate).
If you make a change to a file in your Workspace your NPO will need to be recreated to reflect this change.
-- Creating the notebook project:
CREATE OR REPLACE NOTEBOOK PROJECT YOUR_DATABASE.YOUR_SCHEMA.ben_test_project
FROM 'snow://workspace/USER$.PUBLIC.DEFAULT$/versions/head/'
;
-- Verify the notebook project exists:
SHOW notebook projects ;Now that you’ve created a NPO you can create a Snowflake Task that executes the project.
Importantly you’ll want to specify the notebook file you want executed via the MAIN_FILE parameter:
CREATE OR REPLACE TASK YOUR_DATABASE.YOUR_SCHEMA.BEN_NOTEBOOK_EXECUTION
WAREHOUSE=YOUR_WAREHOUSE
schedule='USING CRON 30 10 * * * Australia/Sydney'
AS
EXECUTE NOTEBOOK PROJECT YOUR_DATABASE.YOUR_SCHEMA.ben_test_project
MAIN_FILE = 'ben_notebook.ipynb'
COMPUTE_POOL = 'SYSTEM_COMPUTE_POOL_CPU'
QUERY_WAREHOUSE = 'YOUR_WAREHOUSE'
RUNTIME = 'v2.3-CPU-PY3.12'
-- Optional, depending on what your notebook does:
--EXTERNAL_ACCESS_INTEGRATIONS = SLACK_WEBOOK_INTEGRATION
;If your notebook uses an integration you’ll need to specify this too, via the EXTERNAL_ACCESS_INTEGRATIONS parameter.
For a full list of parameters see the official documentation.
If a task fails to run you can see more detail about what caused the failure by using Snowsight to view the task results.
Navigate to Catalog - Your Database - Your Schema - Notebook Projects - Your Notebook Project and click the Results hyperlink.
There’s also an error message field which tells you information about the nature of the error.
Usually the run history will tell you why the task failed but if not verify the following isn’t causing an issue:
- Have you specified the external access integration (EAI) needed in the Snowflake Task definition?
- Does your EAI use a secret that your role does not have access to?
- Is your Notebook Project updated with the latest changes to files in your workspace? E.g. if you fixed a typo in your notebook have you recreated the Notebook Project so the task is accessing the corrected version of the notebook?
- Have you fully qualified all object references in your notebook (e.g.
YOUR_DATABASE.YOUR_SCHEMA.YOUR_TABLEand/or specified session variables (USE SCHEMA YOUR_SCHEMA;)?