Applescript for verification emails
I created an AppleScript to automate clicking the verification link and signing in. The script is messy...I just wrote it and used it today and haven't cleaned it up or commented at all.
The workflow I'm using it with is like this:
Use the Apple ID creator script, using the same password for all of the accounts.
Setup an Outlook rule to move verification emails to a folder named "AppleVerify".
Create another folder named "AppleVerifyDone".
Then I run this script.
The script will scan through AppleVerify to grab the verification link and the apple id, opens safari to that link, input the Apple ID, and inputs the password. Then it closes the safari window and moves the email to AppleVerifyDone.
Again, it's really messy and it will probably break for you since I wrote it specifically for my workflow. But I figure it might help someone out.
Rename .txt to .scpt
Edit the idpassword and emaildomain variables
Who is online?
There are currently 0 admins, 0 users and 164 guests online. Connected users: .Recent Activity
-
Mobile Management Provider changed by Frank Klotz 2 years ago
-
Mobile Management Provider changed by bugfrisch 2 years ago
-
Mobile Management Provider changed by taylor 2 years ago
-
Mobile Management Provider changed by dmlarry 2 years ago
-
Mobile Management Provider changed by codeproof 2 years ago
-
Story added by Aaron Freimark 3 years ago
-
Mobile Management Provider changed by SteJohGbg 3 years ago
-
Story added by Aaron Freimark 3 years ago
-
Story added by Aaron Freimark 3 years ago
-
Mobile Management Provider changed by ZuluDesk 3 years ago
-
Wiki Page added by digitalmarketin... 3 years ago
-
Mobile Management Provider changed by Mahesh 3 years ago
-
Story added by Aaron Freimark 3 years ago
-
Mobile Management Provider changed by Neeraj 3 years ago
-
Story added by DaddyOfThr33 3 years ago
-
Story added by Aaron Freimark 3 years ago
-
Mobile Management Provider changed by sb-miradore 3 years ago
-
Story comment by Aaron Freimark 3 years ago
-
Story added by Aaron Freimark 3 years ago
-
Story added by Aaron Freimark 3 years ago
tyreun
Issue with this script
Hi,
Thank you for this script. It seems to be the good way to verify apple ids but I have an issue :
the values "parsedverifyurl" and "appleid" are wrong.
the command
do shell script "echo " & (quoted form of messagecontent) & " | grep 'https://id.apple.com/cgi-bin/verify.cgi'"
seems not to work.
OSX : 10.9.5
Applescript editor : 2.6.1
johnyn
Hey, Just checking, are you
Hey,
Just checking, are you using Outlook 2011? The script might not be finding the correct email or that your verification link doesn't look like mine. So I guess check to see if the link they send you starts off looking like "https://id.apple.com/cgi-bin/verify.cgi".
Also, are you familiar with AppleScript? I left some code commented out right after "tell application Microsoft Outlook" that I used to initially figure out what to do.
tyreun
checked
Hey,
Just checking, are you using Outlook 2011? The script might not be finding the correct email or that your verification link doesn't look like mine. So I guess check to see if the link they send you starts off looking like "https://id.apple.com/cgi-bin/verify.cgi".
Also, are you familiar with AppleScript? I left some code commented out right after "tell application Microsoft Outlook" that I used to initially figure out what to do.
Hi,
I use Outlook 2011. The script finds le folder "AppleVerify", finds all the mails in this folder. Foreach mail in this folder, it finds the link "https://id.apple.com/cgi-bin/verify.cgi" and the emaildomain. That's the reason why I think that the command
do shell script "echo " & (quoted form of messagecontent) & " | grep 'https://id.apple.com/cgi-bin/verify.cgi'"
doesn't work for me.
You can see the command and the return here
johnyn
Hey, sorry. So I'm a little
Hey, sorry. So I'm a little confused then. Are you saying that the variables parsedverifyurl and appleid are being populated correctly? If they are, the part that's failing you is the part after "tell application Safari".
Can you try to pastebin again? The link you have isn't working.
tyreun
The tests :if messagecontent
The tests :
if messagecontent contains "https://id.apple.com/cgi-bin/verify.cgi" then display dialog ("yes", "OK")
-> return yes
if messagecontent contains emaildomain then display dialog ("yes", "OK")
-> return yes
Pastbin : http://pastebin.com/rhVXyAqn
johnyn
Try the other script
Hey sorry it's not working for you. I started to look through to see if I could figure this out but I saw that someone had created another script that uses Mail and Safari to do the job. I looked at the code and it's much cleaner than mine, so I suggest giving that one a try.
http://www.enterpriseios.com/forum/topic/Apple_ID_verification_script