We have more information on using it in Zapier (the main use case at the moment) here: https://zapier.com/zapbook/updates/308/introducing-zapier-em...
We have more information on using it in Zapier (the main use case at the moment) here: https://zapier.com/zapbook/updates/308/introducing-zapier-em...
How much boilerplate text do you need on either side of a token in order to identify it? Put another way, how much can the template emails vary? If the template format changes is there any sort of notification? Did you use the simplest implementation that could work or is this much more complicate than it looks?
First, download yourself a copy of Google's diff-match-patch.
Second, make a template for the email you have (think "Your shipment will be delivered {{date}}. Thank you!" vs. the original raw email "Your shipment will be delivered 2014-04-04. Thank you!").
Third, run it through diff-match-patch.
Forth, walk over the change tree and record the insertion (1), a deletion (-1) or equality (0) transformations (one as keys the other as values).
(There are a lot of edge cases to handle between the forth and fifth step, but test cases make those pretty obvious (if not very frustrating.)
Fifth, collate the keys/values into a dictionary and do some last minute cleanups.
We will be documenting a REST API so you can use parser.zapier.com directly, and it is pretty easy to forward emails automatically to our robot (so you can conceivably avoid writing anything at all and just use the app).
How would you prefer we contact you? There's no contact info on the site.