Export multiple drafts as individual text files

Hello

Sorry to revive this topic but I tried to do the same thing (export multiple drafts) in Dropbox.
I cannot see why it doesn’t work. I’m new to scripting and I would really appreciate some help if it’s possible.
Here is my code:

let db = Dropbox.create();
let path = “/myPath/”;
let draftsGroup = Draft.query("", “all”, [“myTag”]);
draftsGroup.forEach(function(myDraft) {
db.write(path, myDraft.processTemplate("[[safe_title]].txt"), myDraft.content, “add”, false);
});

Thé code runs but it does nothing in my dropbox !
To try to understand, I read this thread and ran this code which worked fine.

Thanks for your help