Question

Best way to Path sort emails by quantity of order numbers

  • 10 November 2021
  • 6 replies
  • 59 views

Userlevel 1

Hi,

I am setting up a Zap for sorting order confirmations based on how many order numbers they contain.

Some emails received have 1 order number info, some have 2 order numbers info, and some have 3 order numbers info. I am trying to path sort them so a different sequence is run based on the number of order numbers present.

 

The way I tried was sorting by Raw Size Estimate, but that proved to not be consistent enough. Is there a way to achieve this? Maybe by counting how many times the string “Order Number” occurs?

Thanks


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

6 replies

Userlevel 6
Badge +6

Hi @mdcooks ,

 

Which app are you using? Also what is the business problem you are trying to solve?

Userlevel 1

Hi @mdcooks ,

 

Which app are you using? Also what is the business problem you are trying to solve?

Using Gmail and Formatter.

Trying to convert order numbers from emails into rows on a spreadsheet, but some order number emails have multiple that need to be added.

Userlevel 6
Badge +6

Hi @mdcooks , Is it possible to share screenshot of 1 Gmail e-mail?  Also, can you share screenshot of your Zap? I would like to view how have you setup your zap.

Userlevel 1

Hi,

 

The order emails are formatted as such:

The following complete order items have been shipped for:
Order number: 3751423

However some emails contain that twice in one email

The following complete order items have been shipped for:

Order number: 3751423

The following complete order items have been shipped for:
Order number: 1074601

My Zap is simply just Split Text formatting functions to isolate the order numbers.

Let me know if you have an idea for how to sort emails by the number of times the string ‘Order number:’ comes up (such as with RegEx)

 

Thanks

Userlevel 7
Badge +14

Hi @mdcooks 

You may want to try using an email parsing app such as Mailparser: https://zapier.com/apps/mailparser/integrations

 

You can try following the Formatter > Text > Split step with a Looping app to handle 1+ line items: https://zapier.com/apps/looping/integrations

 

Or you can try to use a custom Code step to do the parsing for a variable number of Order IDs in the body of an email: https://zapier.com/apps/code/help

Userlevel 1

Hi @mdcooks 

You may want to try using an email parsing app such as Mailparser: https://zapier.com/apps/mailparser/integrations

 

You can try following the Formatter > Text > Split step with a Looping app to handle 1+ line items: https://zapier.com/apps/looping/integrations

 

Or you can try to use a custom Code step to do the parsing for a variable number of Order IDs in the body of an email: https://zapier.com/apps/code/help

Hey Troy,

 

The Mailparser appears to accomplish the same as the Gmail app does.

 

Looping seems to be what will work best for this scenario, I am just having trouble configuring it to only run for the instances of “Order number:”


Thanks,

Zack