OK, thanks for that! 🙂
Assuming that's all you get, then, yes, you could reverse engineer it.
I'm unclear where you'd get their email address from, is that split that you use there taking that information from somewhere else in the email?
I only ask because if that email is Rich Text (HTML) then there's a high liklihood that the name(s) have a hidden piece of code that differentiates it/them from the rest of the email.
If you use Body (the capital 'B' is important, but small 'b' could be even *more* useful), instead of Body Preview, it provides the email's HTML, too. (if you like you can PM that to me)
Using that you might have more usable information to work with, otherwise, yes, just use this to get the first name:
trim(
first(
split(
first(
skip(
split(
triggerOutputs()?['body/bodyPreview'],
'A note on '
),
1
)
),
' '
)
)
)
That will basically do what you need it to do.
I've plotted that out so you can see it all in action, but it can all be one line, too.
It will:
- split() ... split on "A note on " in the plain text of Body Preview,
- skip() ... skip the first entry in the resultant array,
- first() ... extract the string of the first entry in the new array,
- split() ... split that text on spaces,
- first() ... extract the string of the first entry in the resultant array,
- trim() ... then take any extra spaces from the start or end of that text.
If you put notes in the actions, and/or comments in the flow, then you will be able to come back to this in the future and understand what's going on more easily, too.
---
EDIT
I would say, though, that you would be wise to set up some more around this, otherwise it will create flow runs on every email that you get. Things like:
- Limit the flow to only check emails from the sender that sends it.
- Set a rule in outlook to mark these emails with a particular 'Importance' level.
- If it does run, perform certain actions dependent on its categories (based on Outlook Rules).
- Set trigger conditions to further restrict whether it even triggers.
#1 will likely be the most important to use here, because it will drastically reduce the amount of flow runs that this causes. However, #2 will also really assist on lessening the amount of flow runs this produces, as will #4 but that is more advanced stuff.
Looking at #3, this will likely become important if the service or app that you are using produces alerts to you for more than just these reminders. For example, the reminders might be one notification, but you also receive notifications from the app/service when an event is moved.
Using that example, I'd then make two Outlook categories 'thisApp-reminderNotification' and 'thisApp-eventMoved', to differentiate between the two. But you also apply the category 'thisApp', and re-use 'reminder' and 'eventMoved' categories for various emails.
Anyway, in my example flow below I've got a category 'thisApp-reminderNotification' applying to all alerts from 'notifications@thisapp.com'.
Main Flow Detail
Apply to each category on the email