How to add a note to a sequence via python api

Hi @thebeardedberry,

Check out the shotgun methods page (http://developer.shotgunsoftware.com/python-api/reference.html#shotgun-methods) It’s always my first stop for using the Python API.

As for your question, I would use a create method to create a note and then add the Sequence into the Links field, here is an example;

data = {
    "project": {"type": "Project", "id": 87},
    "note_links": [{"type": "Sequence", "id": 45}],
    "subject": "This is the Subject",
    "content": "This is the Body Text",
    "user": {"type": "HumanUser", "id": 87},
    "addressings_to": [{"type": "HumanUser", "id": 92}]
}

sg.create("Note", data) 

Just replace the relevant id’s and its should work for you.

-David

3 Likes