Extract data from email

Hi!

I want to use the new emails feature.
Ill be sending an email to the system email, i want to extract certain data from the email body.

Please assist.

Hi @ruaan,

To use the New Email trigger, follow these steps:

  1. Search for the Email app from the trigger menu.
  2. Select the New Email trigger.
  3. Connect your Email account.
  4. Follow the instructions on the trigger configuration screen. You may need to generate a test event from Email to get real data to test your workflow.

Once you have the email data in your workflow, you can extract the desired information from the email body using a code step. Here’s an example:

export default defineComponent({
  async run({ steps }) {
    const emailBody = steps.trigger.event.body;
    // Extract the desired data from the emailBody using regex or string manipulation
  },
});

Replace the comment with the appropriate code to extract the data you need from the email body.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double check my answers and code! Learn how to build your own.

Thanks, do you perhaps have a sample on how to extract the html data of email.