DEV Community

Tea Reggi
Tea Reggi

Posted on • Updated on

How I Automated the Unemployment Call Hotline with JavaScript.

The goal is to get a hold of a representative from New York state's unemployment office. New York state has an unemployment claim help hotline is a series of prompts that drags then after about 5 minutes, you're spit out into a ditch on the side of the New Jersey Turnpike, and the call hangs up. Rinse, repeat, rinse, repeat.

These systems are automated, why should we have to repeat the same prompts over and over and over. Most automated call systems allow you to press 0 to speak to a representative, however not the NY unemployment hotline. It seems like they deliberately make the series of prompts very difficult to navigate.

Alas there is a simple way to automate this on our end. Most digital phone apps treat a comma (,) as a two second pause, so we can use and abuse this to our advantage.

I created a browser bookmarklet (piece of code that runs in on any page in the browser) for Google Voice. The script will start "recording" keypresses and append a comma every two seconds and log them to the console.

To add this bookmarklet to your bookmark bar, follow these steps:

  1. Copy the minified / formatted code below
  2. Right click on the bar, click "Add Page"
  3. Paste the code in the "URL" field.
  4. Click "Save"

Now, go to https://voice.google.com/, open "Developer tools" and then click on the bookmarklet you created.

Then all you need to do is copy the output from the browser's console, you may need to add some beginning commas for the initial prompt, as commas only start appending after the first keypress.

‪(888) 209-8124‬,,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9,,,,,,,,,,,,,,2,,,,,,,,,,,<SOCIAL-SECURITY-NUMBER>,,,,,,1,,<FOUR-DIGIT-PIN>,,,,,,2,,2,,2,,,,,,,,,,,5,,,,,,1
Enter fullscreen mode Exit fullscreen mode

From there you would need to replace <SOCIAL-SECURITY-NUMBER> and <FOUR-DIGIT-PIN> with your own personal information. Be careful when automating anything with your personal information, be cautious when finding phone numbers and make sure they come from the businesses website directly.

Caveats, if the hotline changes the prompts, the generated number will break, so keep tabs with updates to the hotline.

Top comments (0)