Page 1 of 1

Evernote Variable Tag

PostPosted: Thu Mar 14, 2019 10:55 pm
by heldersales
When adding a note to Evernote via Hazel, I would like to extract a date from the document and use the year of that date as an input for a tag in Evernote. I can't seem to get this to work.

The AppleScript is as follows:

tell application "Evernote"
if (not (notebook named "Paystubs" exists)) then
make notebook with properties {name:"Paystubs"}
end if
activate
set YearTag to item 1 of inputAttributes
create note from file theFile notebook "Paystubs" tags {"Paystubs", "Sandra McCrory", "Town of NA",YearTag}
end tell

Any thoughts? Thx

Re: Evernote Variable Tag

PostPosted: Fri Mar 15, 2019 11:45 am
by Mr_Noodle
I can't really help with the Evernote aspect. Did you try hardcoding a date and seeing if it works then? Did you specify the input attribute in the rule?

Re: Evernote Variable Tag

PostPosted: Fri Mar 15, 2019 8:33 pm
by heldersales
Thanks. Yes, I did specify the inputAttribute

Re: Evernote Variable Tag

PostPosted: Mon Mar 18, 2019 11:25 am
by Mr_Noodle
Note that if it's a date, it will be a date type. It normally should convert automatically to text (such as setting it as a tag) but maybe you should try converting it to a string yourself.