Select multiple notes and bulk email?

I’ve got a container with several notes with the Person prototype, with the email attribute populated.

Can I select several notes and trigger the email process for each selected note?

If you select a number of note(s) and then apply a stamp, the stamps code is applied discretely to each stamp. However, I don’t believe there is an action code trigger for the equivalent of pressing the email icon for $Email a note’s Displayed Attributes table. Even so, that event simply opens a new email, you still have to send it by manual input.

runCommand() can be used to generate an email via the command line.

It might help if you were to expand on your meaning for your term “email process”, IOW what are you expecting to happen..

The stamp could also invoke an AppleScript to create the email, of course.

Thanks for the quick reply!

To elaborate: I’m organizing a discussion group with about 20 members and I’m of course using Tinderbox to organize all the information.

Each member has a note with the Person attribute, and I’ve written action code to cycle through the container of members notes and create an outgoing welcome email to each. I’m creating notes for each outgoing email, and plan to drag responses as they come in and make them child notes of the outgoing emails. All to try and keep things tidy.

My forum post was to ask if there is a way using Tinderbox to group-email the Person records. However, since the number is small (<24), I will instead create the emails (my action code stamp is below) and individually click on the email icon. I don’t expect to send a lot of emails, but using Tinderbox to track all of the communications and content is truly helpful.

//generate individual email messages to members of the group that provided email addresses
ClearLog();
LogDate();

var:string vType="Welcome & Schedule email";
var:list vMemberFullNames;
var:list vMemberFirstNames;
var:list vMemberEmails;
var:string vPath="/Prayer group communications";
var:string vEmail;
var:string vNew;
var:number vCount=0;

Log("Path: "+vPath);
vMemberFullNames=collect_if(children,$Email!="",$Name);
vMemberFirstNames=collect_if(children,$Email!="",$firstName);
vMemberEmails=collect_if(children,$Email!="",$Email);
Log("vMembers: "+vMemberFullNames);

vMemberFullNames.each(x){
   vEmail=vPath+"/"+vType+"/"+x;
   vNew=create(vEmail);
   $Prototype(vNew)="pEmail";
   $EmailTemplate(vNew)="/Templates/tEmail";
   $EmailSubject(vNew)="Welcome to Praying with the Pope";
   $Email(vNew)=vMemberEmails[vCount];
   $Text(vNew)="Greetings "+vMemberFirstNames[vCount]+",\n\n"+$Text("/Prayer group communications/Initial welcome email");
   vCount=vCount+1;

};


3 Likes

You could automate sending emails using a combination of runCommand() and Apple’s Shortcuts—I don’t think you can send styled text emails through Shortcuts, though.

I developed a similar workflow for sending text messages through Tinderbox. I’m happy to demo this work during a future meetup or post an example TBX + Shortcut.

3 Likes

Non-automated approach:

  1. populate $Email, $EmailTemplate, $Email subject fields
  2. Create a bunch of email, including mail merge like features using ^value()^ in tempatles
  3. click the email icon in displayed attributes and just manually cycle through the emails.

It takes a bit but it reduces the chances of automation breakage.

I’ve also been playing with sending email from Tinderbox to platforms like SendGrid. You may also try a keyboard maestro automation.

I wonder if the—admittedly arcane—AppleScript for driving the UI still works. But, AppleScript tools are falling out of service. UIBrowser’s maker retired and AppleScript Debugger is no longer developed. I think Apple wants us to use iOS-inflected Shortcuts, etc. but I don’t think they were designed for Mac UI [sic] use. Happy to be wrong … and hoping this might pull is a lurking reader with deeper AppleScript expertise.

If additional AppleScript verbs are needed, the barrier to adding them is lower than in has been in the past.

There may also be useful Claude Cowork/MCP Tinderbox approaches…

I don’t think there is a need to resort to GUI-scripting. Existing external scripting support in Tinderbox is robust. The basic approach is to have the script retrieve the attribute values from selected notes in Tinderbox and then tell the email client to create a new email or emails using them.

Is the goal to select notes in Tinderbox and send a “group” email (with the same subject and content) to multiple recipients? Or to send individualized emails?

Either way, not hard with a short script. With more details can suggest one.