· Empire Safe & Vault

SmartDoc API update doesn't work for checklists, even following the documentation example.

Heya SmartSuite Devs,

I use the SmartSuite API through a PowerShell script that pushes CSV files to a solution, and it has been working great so far. I'd like to add a SmartDoc column to my solution and add it to the update script, but I'm having trouble with importing anything but paragraphs using the API - it seems like something is glitching out here when trying to use checkboxes or bullet point lists.

I've been following the instructions on the SmartSuite API docs that lists an example of a checklist import, but the sample code produces two blank checkboxes that disappear when you click into the cell. If I ignore the instructions and use a content[type=text] object instead of paragraph type I can get the text to show up, but it still disappears when clicking into the cell. The same issue happens when trying with a bulleted list, even though the JSON pretty much matches the PATCH request payload I can see happening in my browser when making manual edits in SmartSuite.

Here's a short video of the glitching / disappearing effect I'm seeing and below is the JSON object I'm passing to this field. Please let me know if there's something I'm doing wrong or if this can be fixed. I would love to use the SmartDoc field as a sort of advanced checklist for our order fulfillment process!

{
    "html": "",
    "preview": "",
    "data": {
        "content": [
            {
                "content": [
                    {
                        "attrs": {
                            "checked": false
                        },
                        "content": [
                            {
                                "content": [
                                    {
                                        "text": "Standard checklist import according to API. This text doesn\u0027t even show up.",
                                        "type": "text"
                                    }
                                ],
                                "type": "paragraph"
                            }
                        ],
                        "type": "check_list_item"
                    },
                    {
                        "attrs": {
                            "checked": true
                        },
                        "content": [
                            {
                                "text": "Text doesn\u0027t come through the normal way, but it shows up when I skip the paragraph and just use type=text. This text will show up for a split second when clicking into the cell in SmartSuite, but then immediately disappear.",
                                "type": "text"
                            }
                        ],
                        "type": "check_list_item"
                    }
                ],
                "type": "check_list"
            },
            {
                "attrs": {
                    "textAlign": "left"
                },
                "content": [
                    {
                        "marks": [
                            {
                                "attrs": "@{color = \"rgb(224,62,62)\"}",
                                "type": "color"
                            }
                        ],
                        "type": "text",
                        "text": "Sample text, come on baby WORK!"
                    }
                ],
                "type": "paragraph"
            },
            {
                "content": [
                    {
                        "content": [
                            {
                                "text": "Let\u0027s try a bullet list with both text items and no paragraphs.",
                                "type": "text"
                            }
                        ],
                        "type": "list_item"
                    },
                    {
                        "content": [
                            {
                                "text": "Maybe the first checklist isn\u0027t working because the paragraph tries to load and soft-of crashes?",
                                "type": "text"
                            }
                        ],
                        "type": "list_item"
                    }
                ],
                "type": "bullet_list"
            }
        ],
        "type": "doc"
    }
}