I am extracting data from an email. The email stores different sales data. For example Gross Sale, Tips, and Tax to name a few. I am using split to extract the values and is working fine but I am doing to much repetitive work and I bet there should be a way to reduce my flow.
Let me explain what I am doing right now:
Step 3 and 4 are the same regardless of the specific word I am working at the moment so I would like to know if there is a way to capture the outputs for all the values I searched based on all the different words and then just using one steps 3 and one step 4 to process all the words instead of repeating steps 3 and 4 for all of the words. This will be clearer once you see the following image:
Step 2 (Unique process for every different word.)
Step 3 (Used on every different word like step 4 too)
Hope this all makes sense 😅 thanks!
Did you consider using 'HTML to text' action block to convert HTML email body into plain text?
Not sure this approach fits your requirements, since sometimes the HTML is needed also
Hope this helps
Hi @efialttes , thank you very much for your prompt response.
I did not know about the "HTML to Text" action but I do not think this is what I am looking for, but I will check on that tho. I believe my explanation was not clear, let me try to elaborate a little bit more.
The very first problem is that I am super new to Power Automate and I just jumped into developing a solution without having a clue on how to use Automate and without knowing the different tools/actions existing in the platform, but I believe that's sometimes the best way to learn.
Here, I just want to know what's the best way/action to use in order to apply the same process to different outputs coming from different actions. For example, if I were programming a solution to capitalize the first letter of a received word, I would create a method using a parameter to receive a word and then apply the generic steps to capitalize the first letter.
In my specific case, I used an action to capture the body of the email and then created 1 action to extract every specific part of the email I am interested with. Example: let's say I need to get the Sales amount and Tips amount from my email. This is what I did:
1) Used 1 action to extract the Sales part of the email and to store it in variable Sales
2) Used another action to extract the Tips part of the email and to store it in variable Tips, and so on.
So far that's fine with me, but the problem is that every part I extracted comes with extra characters which I want to remove. These characters are the ones I used to search throughout the body of the email. To better illustrate this; the words would come out like this:
Sales part: "$100.00</br>"
Tips part: "$20.00</br>"
So then, I used two more actions (step 3 and 4 below) in order to extract the right text I am interested in; 100.00 and 20.00.
3) 1 action for every part to remove the "$" sign
4) Another action for every part to remove the "<br/>" characters
As you may see, removing the "$" and the "<br/>" are 2 general steps that I have to repeat for every part I am interested in (Sales, Tips, etc), so my question is: how can I create something like a method or something that works here so I can remove the "$" and the "<br/>" without having to copy and paste the last two actions every time I need to get a different value?
See, on the left side (red) is what I have right now and on right side (green) is what I believe should be the process but just do not know what's the best way to achieve that in Power Automate.
Hope it all make more sense now 😛
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.