Evernote Variable Tag

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Evernote Variable Tag 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
heldersales
 
Posts: 3
Joined: Thu Mar 14, 2019 10:46 pm

Re: Evernote Variable Tag 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?
Mr_Noodle
Site Admin
 
Posts: 7810
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Evernote Variable Tag Fri Mar 15, 2019 8:33 pm • by heldersales
Thanks. Yes, I did specify the inputAttribute
heldersales
 
Posts: 3
Joined: Thu Mar 14, 2019 10:46 pm

Re: Evernote Variable Tag 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.
Mr_Noodle
Site Admin
 
Posts: 7810
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron