Drafts has extensive Todoist support and has wrapper classes for their whole API. There are many examples in the directory of todoist scripting as well, that might be starting points.
As far as Obsidian, you can make an Obsidian vault in the /iCloud Drive/Drafts folder, and Drafts can write files directly to that directory, and they will appear in Obsidian, no problem. There’s been some discussion of this on the forums as well if you search Obsidian.