PENDING: Need help to remove html from an action

Hi, have 0 experience with html, so maybe someone could remove html format from this action ?
All I need just send draft to Apple Notes without changes.

I am not sure why this HTML (formatting) is not for you. But it should be mostly in the template:

let html = draft.processTemplate(`<html>
body { font-size: 15pt; }

Should be reduced to:

let html = draft.processTemplate(`[[draft]]`);

Maybe you have to call another method to put it to Notes

this is here:
make new note at folder “Testing” with properties {body:bodyHTML}

Try to give it the reduced template content and see if it works. Do not bother with the html and bodyHtml names in the script. They are variables and the name only hints to it former content.

1 Like

Made it work with 2 steps action. First step copies draft to clipboard. Last step creates note with properties {name:(the clipboard)}. Bellow is AppleScript if maybe someone will find it useful.

tell application “Notes”
tell account “iCloud”
make new note at folder “Testing” with properties {name:(the clipboard)}
end tell
end tell

Maybe not so elegant, but simply does what I need :slightly_smiling_face:

1 Like

cool. that shows that apple notes also takes plain text on this call.

do you want me to put a one step action together?

Could be nice :blush: Scripting is fun, but my understanding is very minimal to make advanced scripts on my own.