cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gisael
Regular Visitor

Using one action to process outputs from multiple process

Hi,

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:

  1. Extract body of the email
  2. Search for key words like: Sales, Tax, Tips one at a time
  3. Split by "$" and get the last part
  4. Split by "</" and get the first part to get the value I need
  5. After extracting all the values I want, I am storing them in an Excel sheet

 

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:

 

Screen Shot 2020-09-14 at 7.53.07 PM.png

 

Step 2 (Unique process for every different word.)

Screen Shot 2020-09-14 at 7.58.23 PM.png

 

Step 3 (Used on every different word like step 4 too) 

Screen Shot 2020-09-14 at 7.59.13 PM.png

 

Hope this all makes sense 😅 thanks!

2 REPLIES 2
efialttes
Super User
Super User

Hi!

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



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



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.

 

img001.png

Hope it all make more sense now 😛

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,566)