This is the body of my incoming email:
"
VERARB-ENDE: 09.10.2023 12:27:06
ABLAUF-ID : 111565014 AP-FUNKTION: APEPWOSO Wochensoll
|----|-------|-------------|--------|----|---------|
| WK | MJ | MODELLGRUPPE| WOCHE | VS.| ANZAHL |
|----|-------|-------------|--------|----|---------|
| 46 | 2024 | Product Type A | 202345 | | 24 |
|----|-------|-------------|--------|----|---------|
INTERNAL
"
I want to fetch "24" in the column named Order Quantity and "Product Type A" in the column named Product.
Please recommend the expression to get this info in my Excel sheet. Earlier workflow such as Email trigger, HTML to text, Adding a row, and defining the table has already been done. I have attached my flow here, please let me know if any change is required.
I would appreciate your help if someone could help me to find out correct expression for order quantity and Product type.
Thank you in advance!
Solved! Go to Solution.
@VK19
I've modified the WDL expressions in order not to depend on the HTML table structure
For first 'Initialize variable' action block in the image I am using now the following...
split(outputs('Html_to_text')?['body'],'|----|-------|-------------|--------|----|---------|')
...and for 'Filter array' action block I am using now this one:
@contains(item(), '|')
The rest remains the same
Hope this helps
==========
Hi @efialttes , thank you for the response.
Here is the HTML format of the body:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><div dir="ltr"><div style="font-family:Calibri; font-size:14.6667px">VERARB-ENDE: 09.10.2023 12:27:06</div><div style="font-family:Calibri; font-size:14.6667px">ABLAUF-ID : 111565014 AP-FUNKTION: APEPWOSO Wochensoll</div><div style="font-family:Calibri; font-size:14.6667px"> </div><div style="font-family:Calibri; font-size:14.6667px">|----|-------|-------------|--------|----|---------|</div><div style="font-family:Calibri; font-size:14.6667px">| WK | MJ | MODELLGRUPPE| WOCHE | VS.| ANZAHL |</div><div style="font-family:Calibri; font-size:14.6667px">|----|-------|-------------|--------|----|---------|</div><div style="font-family:Calibri; font-size:14.6667px">| 46 | 2024 | Product Type A | 202345 | | 24 |</div><div style="font-family:Calibri; font-size:14.6667px">|----|-------|-------------|--------|----|---------|</div></div></body></html>
Thank you in advance!
Hi!
I am using an 'Initialize variable' action block to store the HTML example, but this step is not strictly needed:
Now, my flow design is as follows:
Please note in order to assing a value to 'Compose NewLine' action block I hit 'enter' button
The WDL expressions I am using:
split(outputs('Html_to_text')?['body'],outputs('Compose_NewLine'))
and
(contains(item(), '|'),not(contains(item(),'|----|-------|-------------|--------|----|---------|')))
This way I managed to extract both table rows from the email body into an array, see the partial result:
I am assuming the structure from the body example is always the same, in such case you will get an array with two elements.
Now, you can extract column values from the last element of the array. We will use again an Initialize Variable action block and the split() WDL based expression:
split(body('Filter_array')[1],'|')
If we reexecute the flow, we get the following:
Close to a happy ending! In order to read value for Column MODELLGRUPPE, you just need to use the following WDL expression:
trim(variables('columnValuesArray')[3])
In order to read value for Column ANZAHL, you just need to use the following WDL expression:
trim(variables('columnValuesArray')[6])
I have used two auxiliary 'compose' action blocks to declare both WDL expressions, and store its values, the result is the following:
Hope this helps!
=============
@efialttes First of all, thank you for your work. I really appreciate it! 🙂
I have a follow up question if this logic or flow is also valid if in the next email "Product Type A" is replaced by "Product Type B" and if Order quantity is "1000" instead of "24". I am actually for a dynamic solution here so the place of Product Type and Order Quantity will not change just value would be different every time.
Also, would you please share the screenshot of overall intial flow before you run it. I think all the expression are already mentioned by you here so I would be able to replicate it.
Thank you once again!
@VK19
As soon as the HTML structure remains the same, this flow should be able to extract the desired data no matter it is 1000 or 49, Product Type A or Product Type B.
Please note once I split the text by the newline character into rows, I am making some assumtions:
-The only rows with character | are the ones related to the target table
-The target table hosts 6 columns separated by the character |
-The rows used as separator has exactly this structure:
|----|-------|-------------|--------|----|---------|
Finally, this is an high level screnshot from my flow design. Please note I am not using the trigger you need, but declared the HTML example in a variable in order to speed my testing
Hope this helps
============
Hi @efialttes , i tried to replicate this workflow but on test run, it is showing an error in "Initialize variable columnValuesArray" Step also when I insert the expression in "Fiter Array" before that it is showing too complex and also after test run there is no output visible in "Filter Array" like in your screenshot.
Would you please help me here to correct this error? I have attached the error and workflow screenshot for the reference.
Than you! 🙂
Since this is a cloud flow question, I'm moving the topic to the appropriate forums. You posted it in the forums for Desktop flows.
Hi again @VK19 !
THe execution error is simple to solve. Plase have a look to your Initialize Variable design:
you did had the same error when adding another WDL expression to your flow design:
It happens to me a lot of times also.
I mean, you typed the WDL expression directly, so the editor considers it is a text string. I've seen in other test steps you managed to add WDL expressions, so I guess you are familiar with the way to add them via 'Dynamic content' menu, right? They should be displayed with a purple box on the left
On the other topic, when you add a complex rule on a 'Filter array' I can confirm you the Editor does not allow you to switch from 'Advanced mode' back into the 'Basic mode'. It is an old limitation, I am afraid
Hope this helps!
==========
Hi @efialttes thanks for the reply,
but I am confused to understand what and where exactly i did mistake, do you need any particular from my workflow to explain me?
Thank you in advance!
Hi @efialttes , I am seeing this error message in Intialize Variable when I tried to put WDL expression correctly. Please have a look here!
Thank you in advance!
@VK19
I see you are getting used to add WDL expressions. Great!!!
FRom the image you shared, I found a typo on the expression I shared, my mistake, the comma is in the wrong place:
The expression shall be as follows:
split(body('Filter_array')[1],'|')
I've alredy corrected it in my initial response. Close to a happy ending!
=====================================
Hi @efialttes , i have corrected the WDL and the flow did ran but after kind of similar error is visible. Is anything wrong my PC setting?
I am trying to replicate the similar you as you did but its not working, Can you please look at this error snip?
Thank you so much in advance!
Hi @VK19
I am afraid I mentioned several times the HTML table structure should be the same for each email to be processed correctly, and unfortunatelly this one is not an exact replica of the first example:
It does not seem to have 6 columns
...and we expected the following rows inside ints own <div></div> HTML tags, something probably is not happening in this email body
|----|-------|-------------|--------|----|---------|
Since the HTML from your email bodys does not follow the same structure, but have little differences, the flow will fail from time to time. You can improve your flow design to be tolerant to each HTML structure received, assuming you monitor your flow execution and everytime it fails you analyse and adapt it accordingly
Hope this helps
===========
Hi @efialttes but the email body has not changed must except "Product Type" and "Order Quantity" in this case. Would it not work if even the just two things changed and entire body format is the same.
Here is the body where I tried to run this test and it is same like the earlier email body which i posted:
Test run on:
VERARB-ENDE: 11.10.2023 15:11:21
ABLAUF-ID : 111784200 AP-FUNKTION: APEPWOSO Wochensoll
|----|-------|-------------|--------|----|---------|
| WK | MJ | MODELLGRUPPE| WOCHE | VS.| ANZAHL |
|----|-------|-------------|--------|----|---------|
| 46 | 2024 | Product Type B | 202345 | | 390 |
|----|-------|-------------|--------|----|---------|
Thank you in advance!
@VK19
I've modified the WDL expressions in order not to depend on the HTML table structure
For first 'Initialize variable' action block in the image I am using now the following...
split(outputs('Html_to_text')?['body'],'|----|-------|-------------|--------|----|---------|')
...and for 'Filter array' action block I am using now this one:
@contains(item(), '|')
The rest remains the same
Hope this helps
==========
Hi @efialttes , thank you once again for the help!😊
Workflow worked perfectly, thank you for your continuos support with this problem. I really appreciate it! 👌
Have a Good Day!
Hi @efialttes ,
At first, I did the test by trigger -> on receiving emails on my email address but this workflow is supposed to receive email in Shared Mailbox and not personal that is why today I changed the trigger to mailbox.
But it keeps showing me a failure in the "Initialize Variable myInputBody Array" step.
I have attached the error snip. Would you please help me out,
Thank you in advance!
Dear Community Members, We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd. During this period, members will not be able to Kudo, Comment, or Reply to any posts. On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities. What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!
We are excited to announce the Summer of Solutions Challenge! This challenge is kicking off on Monday, June 17th and will run for (4) weeks. The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities. Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”) - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024 Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods. You must enter into each weekly Entry Period separately. How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different. Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers. At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing. Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner. A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random. Individuals will be contacted before the announcement with the opportunity to claim or deny the prize. Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners. Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event. ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE** Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24 17 @Anil_g 7 @ManishSolanki 13 @eetuRobo 5 @David_MA 10 @VishnuReddy1997 5 @SpongYe 9JhonatanOB19932 (tie) @Nived_Nambiar 8 @maltie 2 (tie) @PA-Noob 2 (tie) @LukeMcG 2 (tie) @tgut03 2 (tie) Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate @Deenuji 12@ManishSolanki 19 @Anil_g 10 @NathanAlvares24 17 @VishnuReddy1997 6 @Expiscornovus 10 @Tjan 5 @Nived_Nambiar 10 @eetuRobo 3 @SudeepGhatakNZ 8 Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22 Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2 Anil_g2 SharonS2
On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners. The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights. Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.
We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for. We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer. Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together. Here's to new beginnings and endless possibilities! If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport. To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages