Not a self-promotion post, just to demonstrate my goal, Email Merge in the Classroom. Please check my post above for more detail on my end goal if I am not clear below.
For the past several years, I have used a CSV file, Microsoft Word, and Microsoft Outlook on my mac to do an email merge and send personalized emails to my students and their parents every week. A ridiculous time saver vs. doing this manually, and very beneficial for all the families I work with. However, I am posting here because I am trying to replicate this process with just Drafts or Drafts and Shortcuts.
I have found @RosemaryOrchard’s action group and video from an episode of Automators, which gives me hope; however, I would like to avoid having contacts entries for all of these people.
I made this shortcut, which works just like I want it to; it actually works better than the Microsoft office solution and is more convenient. But it is not repeating the process with each dictionary value, any advice on why?
Secondarily, is there an upper limit to how big a dictionary can be in shortcuts? If I flesh this all the way out, I will have about 90 entries, each with 4 or 5 values.
Dictionaries can be vast. There will be an upper memory constraint, but I sincerely doubt you will get anywhere near whatever it is.
I think the following example I put together should help you get your head around the first issue.
Thank you for such a prompt reply and for building the example shortcut, I see what I am missing and I am working on implementing it now!
Also, I am glad that dictionaries will be work at this size, this I opens up some very interesting possibilities!
@sylumer Your example shortcut works perfectly; however, my lack of experience with dictionaries is giving me trouble implementing your solution in my version. I am grateful for any additional help you can give.
I don’t know if my problem is related to our different levels of organization, but so to clarify.
Where you have classA and classB, I have individual students. And where you have the students as values, I have their individual data points (student first name, parent first name, student email, parent email). So I need to pull two different values to perform a search and replace on text from drafts and the other two values to use to address the email.
I believe the important part of your solution that I need to import into mine are the three identified here:
But I can not get those actions to work and report the values I need. I have sanitized the shortcut of sensitive information and posted it here:
I have also added the text of an example email as a comment to the top.
I am very grateful for your support thus far, and any further help you can provide!
The key is that you need to work with the repeat item as a dictionary. The dictionary you defined contains dictionaries. When you take an entry from the dictionary, you need to treat it (the repeat item) as a dictionary to access its properties.
To make it viable for me to work with I added a text entry at the start with the content of the comment and swapped out the shortcut input reference to be that text instead. I also swapped the mail action to be a quick look.
Here’s my modification to what you posted based on the above notes.
Hope that helps.
INCREDIBLE, thank you very much for completing the shortcut, and for explaining my error; I wasn’t conceptualizing that I was making nested dictionaries. That makes all the difference.
Thank you for “teaching me to fish” while helping at the same time. This opens up some exciting possibilities for future shortcuts.
Thank you again @sylumer!