Applescript for verification emails

johnyn's picture

johnyn

Joined: Mar 27, 2015
No votes yet

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

Top
tyreun's picture

tyreun

Joined: Oct 2, 2014

Issue with this script

Your rating: None

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.

code

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

Top
johnyn's picture

johnyn

Joined: Sep 19, 2014

Hey, Just checking, are you

Your rating: None

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.

Top
tyreun's picture

tyreun

Joined: Oct 2, 2014

checked

Your rating: None
johnyn wrote:

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

Top
johnyn's picture

johnyn

Joined: Sep 19, 2014

Hey, sorry. So I'm a little

Your rating: None

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.

Top
tyreun's picture

tyreun

Joined: Oct 2, 2014

The tests :if messagecontent

Your rating: None

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

Top
johnyn's picture

johnyn

Joined: Sep 19, 2014

Try the other script

Your rating: None

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

Top

Who is online?

There are currently 0 admins, 1 user and 25 guests online. Connected users: dispfrasexdia92.

Recent Activity