Creating nested bullet points with indentation using Google Docs API

I’m working with a Google Document that currently has a simple bullet list like this:

• Task

I want to use API requests to modify it so it becomes a nested list with proper indentation:

• Task
    ◦ Subtask

I’ve been trying to use CreateParagraphBulletRequest but there doesn’t seem to be any parameter for setting the indentation level. The docs mention that nesting levels should be determined by counting leading tabs before each paragraph, and these tabs get removed automatically to prevent extra spacing.

When I try adding tabs at the start using InsertTextRequest, it just adds visible tab characters instead of creating proper indentation:

• Task
•        Subtask

What’s the correct approach to achieve nested bullet formatting through the API? Am I missing something obvious here?

definitely use the nestingLevel prop in your CreateParagraphBulletRequest. set it to 1 for your subtasks, else it won’t indent right. tabs r not the way for nesting in google docs, they don’t work like u expect.

Yeah, this is super common with the Google Docs API. Using nestingLevel works for basic nesting, but you’ll get way cleaner results if you combine it with text style updates. After you create your paragraph with CreateParagraphBulletRequest and set nestingLevel to 1, throw in an UpdateTextStyleRequest to make the formatting look right. The API requires handling bullet structure and text formatting separately, unlike the UI that automates this. Also, double-check your range indices when applying these requests. If they’re off, you’ll mess up the formatting on other paragraphs.

Had this exact problem last month building a project management integration. You need UpdateParagraphStyleRequest right after creating your bullet points. Create the paragraph with CreateParagraphBulletRequest, then immediately hit it with UpdateParagraphStyleRequest to set indentStart and indentFirstLine. For nested bullets, I use indentStart around 36 points and indentFirstLine at 18 points for first-level nesting. The API automatically changes bullet styles based on indentation depth. Way better than messing with tabs or just using nesting levels.