This is documentation for the next version of Grafana documentation. For the latest stable release, go to the latest version.
Notebooks
Note
Notebooks is currently in public preview. Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
To use this feature, enable the
dashboard.notebooksfeature toggle in your Grafana configuration file or contact Support.
Notebooks combine notes, queries, and visualizations in a single document in Grafana. They provide a way to investigate a problem, explain what you found, and share the supporting data with your team. You can start a notebook yourself or create one with Grafana Assistant.
Text blocks capture notes and context, and you can add panels and queries manually or from Dashboards, Explore, and Logs Drilldown. Every block is directly editable, including the queries and visualizations, and you can reorder or remove blocks as your investigation develops.
Notebooks facilitate troubleshooting, investigation handoffs, and post-incident reviews.

Manage notebooks
The Notebooks page lists all of the notebooks in your organization, along with the following details for each notebook:
- Title
- Author username
- Tags
- Creation date
- Date of last update

You can search the page by notebook title, and filter by tags or by notebooks you authored.
Each notebook row includes an Edit button and a menu where you can access the following actions:
- Copy a shareable link
- Export by copying the raw Markdown
- Export by downloading a .md file
- Export as a PDF, when a compatible image renderer is available
- Delete
You can also access all of these options inside a notebook in the toolbar:

Note
Sharing a notebook link doesn’t grant access to the notebook or its data sources. Recipients need permission to view the notebook and query the data sources used by its panels.
When you export a notebook as raw Markdown or in an .md file, panels render as JSON code blocks rather than as visualizations, like this:
[
{
"refId": "A",
"datasource": "grafanacloud-usage",
"type": "prometheus",
"query": {
"expr": "grafanacloud_org_metrics_billable_series"
}
}
]PDF exports retain the rendered visualizations.
Add notebooks
By default, Viewers can read notebooks. Editors and Admins can create, edit, and delete them.
To create a notebook from the Notebooks page, follow these steps:
Click + New notebook.
You can also create a notebook by clicking New notebook in the drop-down menu at the top of every page in Grafana or by searching for New notebook in the command palette.
(Optional) Update the title of the notebook to something descriptive and searchable.
(Optional) Add tags to further define the subject of your notebook.
Start typing to create a text block or click one of the following buttons below the block:
- Heading: Adds an H1 heading.
- Paragraph: Adds a text block that you can format with Markdown.
- Code: Adds a code block. Select a language, like Go, SQL, or plain text.
- Visualization: Adds an empty visualization with its query editor below it. For more details on configuring visualizations in notebooks, refer to the Visualization blocks section of this page. To start from a saved query instead, refer to Add a visualization from a saved query.
You can also type a forward slash (
/) to open a list of block types from which to select.Add as many blocks as you need.
Each new block is automatically added after the previous one. To add a block above a previous one, click the plus icon at the top-left corner of the block:
![Adding a notebook block above the current block]()
Do the following as needed:
- Use the drag-and-drop handles on the left side of each block to reorder them.
- Click the Block actions menu at the top-right corner to access duplicate or delete options.
![Notebook block with actions menu open]()
In the notebook toolbar, take the following actions, as needed:
- Click the undo and redo icons at the top of the notebook to revert or reinstate changes.
- Change the time range of the notebook.
- Change the refresh rate of the notebook.
![Notebook toolbar]()
When you’ve finished making changes, click View in the toolbar to leave edit mode.
Notebooks automatically save your changes. For more information, refer to the Save status section of this page.
Save status
Notebooks save your edits automatically, including changes made with undo and redo. The save status displays at the top of the notebook next to the undo and redo icons. Possible saved statuses are:
- Unsaved changes
- Saving…
- Saved
- Save failed
If a save fails, check the error and use Retry when it’s available before leaving the page.
Edit notebooks
To edit a notebook, follow these steps:
- Navigate to Notebooks.
- Click Edit on the row of the notebook you want to update.
- Make any needed changes.
- When you’ve finished updating the notebook, click View to leave edit mode.
Notebooks automatically save your changes.
Add checklists
Use checklists in text blocks to track steps or follow-up tasks.
While editing a notebook, type [] followed by Space at the start of a line to create a checkbox.
You can also select existing text and click Checklist in the formatting toolbar.
Click a checkbox to mark an item complete or incomplete. Press Enter to add an unchecked item in the same checklist. Press Enter on an empty item to leave the checklist.
Checklists also support Markdown task syntax, such as - [ ] Review the logs and - [x] Confirm the time range.
Checked states are saved automatically and preserved in Markdown exports.
Checkboxes are read-only in view mode.
Undo and redo changes
You can also edit notebooks by undoing or redoing changes. The undo and redo icons are in the toolbar at the top of a notebook. When you hover your cursor over either of the buttons, a tooltip displays the change being reverted or reinstated.
You can’t restore a deleted notebook using undo or redo.
Visualization blocks
Visualization blocks display query results within your notebook. You can edit the block’s title and queries, choose a suggested visualization, or give the panel its own time range.
In edit mode, hover your cursor over a visualization to display its controls:

Visualization blocks have the following controls:
Title, query, and visualization editing aren’t available for linked library panels in a notebook.
Add a visualization from a saved query
You can create a visualization block from a saved query instead of writing the query yourself. Grafana adds the query to the block and suggests a visualization type based on the query results.
Note
Saved queries is only available on Grafana Enterprise and Grafana Cloud. The New from Saved Queries option only displays when you have permission to read saved queries.
To add a visualization from a saved query, follow these steps:
Navigate to Notebooks.
Open the notebook to which you want to add the visualization.
Click Editing in the mode selector drop-down.
Do one of the following:
- To replace an empty text block, type
/, hover over Visualization, and select New from Saved Queries. - To add the visualization above another block, click the plus icon at the block’s top-left corner, hover over Visualization, and select New from Saved Queries.
- To add it at the end of the notebook, click the Visualization drop-down and select New from Saved Queries.
- To replace an empty text block, type
In the Saved queries dialog box, select the query you want to use.
If you close the Saved queries dialog box without selecting a query, Grafana doesn’t add a block.
Click Select query.
(Optional) Update the panel title.
The block uses the saved query title as its panel title, but you can update this.
(Optional) To choose a different visualization type, hover over the panel header and click Change visualization.
Grafana selects a visualization type based on the query results for the notebook’s time range.
Panel time range
Panels use the notebook’s time range unless you set a separate range for a panel. Use a panel time lock to keep its range independent when you change the notebook’s time range. The locked range displays above the panel and remains visible in view mode.
A relative range, such as Last 30 minutes, remains relative to the current time. To preserve a specific investigation window, use an absolute start and end time. Locking a time range doesn’t save a snapshot of the query results.
To change the panel time range, return to edit mode and click the locked range. Click Remove time lock to make the panel follow the notebook’s time range again:

Add panels from Dashboards, Explore, and Logs Drilldown
You can bring a dashboard panel, an Explore query, or a Grafana Logs Drilldown panel into a notebook without recreating it. This lets you collect evidence from different sources as you investigate, and then add your notes around it in the notebook.
Updating the added panel in the notebook doesn’t change the panel in the source dashboard, the query in Explore, or the panel in Logs Drilldown. Changes to the source dashboard panel also don’t update the notebook. If the panel is a library panel, the copy is a regular panel that isn’t linked to the library panel, so later changes to the library panel don’t update the notebook.
To add a panel to a notebook, you need permission to edit or create notebooks. However, you don’t need to be in edit mode or have permission to edit the dashboard.
Add a panel from a dashboard
To add a panel from a dashboard to a notebook, follow these steps:
- Navigate to the dashboard that contains the panel you want to add.
- Hover your cursor over the panel to display the actions tooltip, and click the More actions menu icon.
- Select Add to notebook.
- In the Add panel to notebook dialog box, configure the options described in Add panel to notebook options.
- Click Add to notebook.
The notebook receives a copy of the panel, including its queries, visualization, and title. Grafana adds the panel at the end of the notebook.
Add a query from Explore
To add a query and its visualization from Explore to a notebook, follow these steps:
- In Explore, build and run your query.
- In the Explore toolbar, click Add and select Add to notebook.
- In the Add panel to notebook dialog box, configure the options described in Add panel to notebook options.
- Click Add to notebook.
The notebook receives a panel with the queries from the Explore pane and a visualization based on the query results. Grafana adds the panel at the end of the notebook.
Add a panel from Logs Drilldown
You can add panels from Grafana Logs Drilldown, such as the log volume, logs, table, and label or field breakdown panels.
To add a panel from Logs Drilldown to a notebook, follow these steps:
- In Logs Drilldown, navigate to the panel you want to add.
- Hover your cursor over the panel and click the panel menu icon that appears in the top-right corner.
- Select Add to Notebook.
- In the Add to Notebook dialog box, configure the options described in Add panel to notebook options.
- Click Add to notebook.
The notebook receives a panel with the panel’s LogQL query, visualization, and title. Grafana adds the panel at the end of the notebook.
Add panel to notebook options
The Add panel to notebook dialog box, called Add to Notebook in Logs Drilldown, has the following options:
Create notebooks from Grafana Assistant Workspace
In Grafana Assistant Workspace, you can turn investigation findings into a notebook to continue editing and share with your team.
While you investigate in Workspace, the canvas brings together the work as a collection of questions, panels, and findings. The Assistant builds the canvas autonomously in Investigation mode or through your chat.
As you work, you can add the content of a message, such as text or a visualization, from your Assistant conversation to a notebook by clicking the Add to notebook icon. To create a notebook from the entire canvas, ask Assistant to create one or click Create notebook:

Notebooks and incidents
Notebooks can provide context for incident response, even if you started investigating before declaring an incident. With Grafana IRM, you can attach a notebook to an existing incident or declare an incident based on your notebook.
Both actions add a link to the notebook as incident context, not a copy of its contents or a snapshot of its data. Users opening the link need permission to view the notebook and query its data sources.
Note
To connect notebooks and incidents, you need to have Grafana IRM enabled for your instance with its notebook integration available, as well as the appropriate permissions for both features. If the integration isn’t available, the notebook menu doesn’t include the IRM option.
Attach notebooks to incidents
To attach a notebook to an existing incident, follow these steps:
- Navigate to Notebooks.
- Open the notebook you want to attach.
- Click the More actions menu in the toolbar.
- Select IRM > Attach to incident.
- In the dialog box that opens, select the incident to which you want to attach the notebook.
- (Optional) Update a caption to provide context. By default, the caption is the notebook title.
- Click Attach.
The notebook link is added to the incident’s context.
Declare incidents from notebooks
To declare an incident from a notebook, follow these steps:
Navigate to Notebooks.
Open the notebook you want to use.
Click the More actions menu in the toolbar.
Select IRM > Declare incident.
In the dialog box that opens, review the incident title and update it if needed. By default, it’s the notebook title.
Complete the fields required by your organization.
Click Declare incident.
This opens the incident you’ve just created in IRM > Incidents.
Add any other needed context to the incident.
The notebook link is added to the incident’s context.
Declaring an incident can trigger your configured incident response actions, such as notifying responders. For details about incident fields and response workflows, refer to Declare an incident in Grafana IRM.





