
JustinH.18850 (Children\\\\'s Hosptial Los Angeles) asked a question.
I'm very noob to the workflows and starting to pick things up slowly but am looking for some guidance as I want to figure this one out without just having someone do it for me.
I would like to start a flow that reads through an email received with certain subject line, then grab pieces of the body of the email (dates and hostname). It will then put that information into a table. Then have the table results emailed out or put into an excel that gets emailed out.
The actual problem I'm trying to solve here is this:
We receive about 50-75 notifications from our certificate authority for certs coming up for expiration. These come through in an email with the same format just different hostname and different dates for expiration. If we could just grab all the hostnames and expiration dates from those emails and store them somewhere to then easily export or notify all of them in one email would be so amazing.

This is essentially text parsing / manipulation which is the "Hard part" of your inquiry.
Without seeing what the "raw data" looks like there is not much I can do to assist here. Typically when you are attempting to parse text you need to look for points in the text that are logical separators of data.
Example:
User details.
User: Tim LaBorn
Email: tim_laborn@mydomain.com
Phone: 555-345-6789
-- SOmething SOmething
Each of the above are "carriage return" separated for each data point. In addition to that the data points are separated by the ":" character.
If the email is static in format (always the exact same values on the exact same lines) you could do something like:
Split on the return carriage.
Now lets say User, Email, Phone are "AT" places 3,4,5 in the new list.
You could then make 3 AT cards to pull places 3,4,5 since we know the structure of the notification is always the same these places should stay the same.
Then split each of those on ": " which is going to make the values at place 1 on their new results. Those new results could then be passed through maybe a "Trim" to get rid of whitespace on the end's and maybe a "To Lower" to normalize the data and get rid of Case related issues like "ThIsIsMyNaMe" before being mapped to your table filling in your columns.
Depending on the structure of the data you may even need to leverage replace cards and regex to clean up the data prior to performing actions against it (or even during the process of manipulating the data). But that is going to be completely dependent on the data and what portions of it you need to use.
I think I can understand the concept you are putting together here, but I also stumble up next on the "what exactly or how exactly do I put this together"? What kind of card should I be using and how to properly configure that card?
Here is the Subject line of the email that comes over, the only thing that changes is the hostname which I put just XX in here
Subject: Your SSL certificate for XXXX.DOMAIN.COM **** WARNING: Expiration Notice.
Body of message:
Your InCommon SSL certificate HOSTNAME.DOMAIN will expire soon. Date and time of expiration: 11/08/2022 23:59 GMT.
Certificate Details:
Common Name : HOSTNAME.DOMAIN
Subject Alternative Names : HOSTNAME.DOMAIN, HOSTNAME.DOMAIN,
SSL Certificate Profile : InCommon Multi Domain SSL (SHA-2)
Term : 365 Days
Requested : 11/08/2021 22:55 GMT
Approved : 11/08/2021 22:55 GMT
Expires : 11/08/2022 23:59 GMT
Order Number : 000000
Self-Enrollment Certificate ID : 000000
Comments :
Certificate Manager Certificate : YES
I'm looking to try and grab the hostname of the notification and the date it expires, put that into a table to store so we can review the table entries much easier than going through a hundred of these emails.
I get the card for the "New Email", with that I'm taking the Text Body and passing that to a Text find card then putting "look for" Your SSL certificate for and then thinking the output on that card of "position" would give me something. But I know this can't be right?
I'm really stumbling on what cards I should use and options for those cards?
Data parsing is pretty complex and there are a ton of factors to take into account. Workflows provides pretty common text parsing methods that you will find available in any scripting/programming language.
I've provided "A" method to meet the described use case above using the body you provided. There are plenty of other ways you could go about this to achieve similar/same results.
Import the attached flow and run it. Review what each card does and grok why.
dataparse