Can't Find IMAP

Hello all. I am new to AP and am trying to figure it out and make some flows. One thing I am trying to do and this may seems silly is to check my email and if it finds an email that says Tee Time Confirmation to put that into a google sheet so that I can keep track of how many tee times I book for my home golf membership. I have seen a tutorial on something similar but it used IMAP to check the email but I don’t see that in AP. Any help on that and any suggestions on how to accomplish this would be appreciated.

Email provider?

What have you done so far?

Details, brother!

Gmail is the provider. So far I created a schedule for 1 time a day, then a branch for true / false, and now I am trying to figure out how to get it to go into my email to read it.

Use the code piece. You need to drop some typescript in there. If you are anything like I am, ChatGPT will be your friend to modify and create the code you need.

In this example, I am getting an email into my service provider. I have a branch to check for a specific subject line.

If True, it flows into 3 code pieces (I found it easier for my skill set to break each search separately) stripping the text I need. The email comes in a fixed format. I take that data and then start my own automations.

export const code = async (inputs: { text: string }) => {
  // Define the regex for finding "Student Information" and capturing the next line up to the first space
  const regex = /Student Information.*\n([^\s]*)/;

  // Use the regex to search the inputs.text
  const matches = regex.exec(inputs.text);

  // Check if we found a match and return the result accordingly
  if (matches && matches[1]) {
    // If a match is found, return the part of the next line up to the first space
    return matches[1].trim(); // Trim to remove any leading/trailing whitespace
  } else {
    // If no match is found, return a relevant message
    return "Could Not Find First Name";
  }
};


I don’t know how to code, but I am great at trial and error.

Code piece is an absolute monster.

Comeback and let me know if this got you where you needed to go.

EDIT:

Here’s a sample email. The regex is looking for the text Student Information. It then goes to the next line. For First name, it looks for text up until the first space.

For my last name code piece it looks for the first space (after the first name) and then copies the text (in my case the last name).