Skip to main content

Mastering Email Automation via Login Passcodes

Written by Sophie
Updated over a week ago

Many websites require a 6-digit code sent to your email. Instead of stopping your task to check your phone or inbox, we can make Octoparse AI do it for you. This is the perfect way to learn how our Email Automation works.

The Workflow: How to Build It

To handle a verification email, your workflow needs to follow these 4 practical steps:

  • Step 1: Connect Your Mailbox (The Setup) Use the [Login to email] command at the beginning.

    • What it does: It creates a secure bridge between Octoparse AI and your email (Gmail, Outlook, etc.).

  • Step 2: Trigger and Wait (The Buffer) After your bot clicks "Send Code" on the website, add a [Wait] command for 10 seconds.

    • Why? You need to give the email a few seconds to travel across the internet to your inbox.

    Step 3: Fetch the Code (The Core) Use the [Get Email Content] command.

    • Key Action: Tell the bot to look for the Subject or Sender of your specific verification email so it doesn't pick up a random newsletter.

  • Step 4: Clean the Data (The Regex) The email body is full of text, but you only need the numbers.

    • The Tool: Use Regex (Regular Expressions).

    • Important: You must customize your Regex based on your email's content. If the email says "Your code is 123456", a simple \d{6} pattern tells the bot: "Just grab the 6 digits and ignore the rest."

  • Step 5: Fill it in Use the extracted variable to fill the input box on the website.

Common Commands You'll Use

  • Log in to email: Your gateway to email data.

  • Get email content: To read text without opening a browser.

  • Match with Regex: To extract specific info (like codes, links, or dates).

Beyond Login: What Else Can You Do?

Once you master the logic above, you can apply it to:

  • Data Delivery: Automatically email your scraped CSV results to your team.

  • Task Alerts: Get an email notification if a website layout changes or a task finishes.


Example Layout (Visual Reference)

[Coming soon]

Did this answer your question?