Integration Drafts with Microsoft ToDo-App ( previously Wunderlist)

Hi — Another To Do fan here. By no means will the following do everything you want, but maybe it’ll give you or someone else a start. This script takes the first line of the current draft and posts it to a To Do task list, given an API key and a To Do folder ID, and then puts the API response in a new draft.

let api = "Bearer YOUR_API_KEY",
// Show folder list by querying https://graph.microsoft.com/v1.0/me/todo/lists
   folder = "YOUR_FOLDER_ID"; 

let current = draft.processTemplate("[[line|1]]"),
	req = new HTTP(),
	result = req.request({
	    encoding: 'json',
		method: 'POST',
		data: ({
			title: current,
		}),
		headers: {
			'Content-type': 'application/json; charset=UTF-8',
			'Authorization': api
		},
		url: "https://graph.microsoft.com/v1.0/me/todo/lists/" + folder + "/tasks",
	}),
d = new Draft();
d.content = result.responseText;
d.update();

This works as far as I can tell, but of course please use caution in trying it out. Good luck!