1

I often (twice an year :) - create a lot of shared notebooks with help of this script:

for stud in students:
    #Создаём блокнот для студента и шарим его
    newNotebook = Types.Notebook()
    newNotebook.name = stud
    newNotebook.stack = "Университет:Студенты и группы"
    notebook = note_store.createNotebook(auth_token,newNotebook)
    #Шарим с правом записи
    shared = Types.SharedNotebook()
    shared.email = students[stud]
    shared.notebookGuid = notebook.guid
    shared.allowPreview = True
    shared.privilege =     Types.SharedNotebookPrivilegeLevel().MODIFY_NOTEBOOK_PLUS_ACTIVITY
    note_store.createSharedNotebook(auth_token, shared)
    print("Created notebook: ",stud," and shared with ",students[stud])

But, before they can use it, I have to manualy send invitation link from web or Evernote application. Is there any clues how to automate this? Can I sent email invitations from my script?

UPD: I can send email by myself, but I can't understand of invitation link format.

When I send it manualy, my recipients (students) get something like this:

https www.evernote.com/shard/s48/share/15c80-s48-14cf3395c61eada9b‌​bfd1d1645ba4430-2/?n‌​bn=NotebookName&un=z‌​ztalker&source=share‌​dNotebookInvite&shou‌​ldWelcome=true&gid=1‌​5c80-s48 

Without this link they can't use shared notebook at all.

  • 1
    Possible duplicate of [How can I send email using Python?](https://stackoverflow.com/questions/9272257/how-can-i-send-email-using-python) – RagingRoosevelt Sep 15 '17 at 16:53
  • There is one problem in send invitation to Evernote Shared notebook. I can't find description of link format. When I send it manualy, my recipients (students) get something like this: https www.evernote.com/shard/s48/share/15c80-s48-14cf3395c61eada9bbfd1d1645ba4430-2/?nbn=NotebookName&un=zztalker&source=sharedNotebookInvite&shouldWelcome=true&gid=15c80-s48 Without this link they can't use shared notebook at all. – Pavel Zaikin Sep 15 '17 at 17:41
  • Could you clarify what you're looking for? I *think* you're not having trouble with sending emails. The issue is in trying to determine the URL that you need to include in the email? – RagingRoosevelt Sep 15 '17 at 19:48
  • According to [this documentation](https://dev.evernote.com/doc/reference/Types.html#Struct_Notebook), it looks like you should probably look at the `publishing` attribute (`Types.Notebook.publishing`, I think) which should contain the URI, description, etc. – RagingRoosevelt Sep 15 '17 at 19:50
  • The `publishing` attribute is for published Notes or Notebooks - which have a public address to gain access across the Internet to the resource. I wish to share the notebook with my student only and give him or her access only via Evernote App. After googling and asking support - there is no way to send invitation email or get invitation link through API. That's all. Unfortunately, I have to spend some time to make an alternative system to work with my students or have a click-pointing quest every year. – Pavel Zaikin Nov 13 '17 at 11:19

0 Answers0