cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RajuGolla
Frequent Visitor

Read XML document in the email message, parse xml and create list item in SharePoint List

Hi

When a new email message is received in the inbox it is required to
(1) read the email message which contains XML document (xml nodes with data) as-is,
(2) extract the data within xml nodes and
(3) create a new record with the extracted data (xml node name is similar to SharePoint list field). So it is required to insert xml node data into relevant field.

Help with relevant Flow examples in meeting the above requirements appreciated.

Thanks
1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @RajuGolla ,

 

If the XML data is included in the email body, then you may need to use WDL function to extract the data, preferably the email message has a fixed format.

Please refer to the similar thread below to extract the data specified in the email body:

https://powerusers.microsoft.com/t5/Building-Flows/Extracting-text-from-email/td-p/334919

https://powerusers.microsoft.com/t5/Building-Flows/Extract-text-from-body-of-an-email-and-create-new...

 

After extracting the XML data, you need to use the XPath() function to parse it. Please refer to the following threads and see if it helps:

https://powerusers.microsoft.com/t5/General-Flow-Discussion/Parse-XML-using-Microsoft-Flow/td-p/1149...

https://powerusers.microsoft.com/t5/Connecting-To-Data/xPath-parsing-noob/td-p/345459

 

Once parsed, you can insert data into the specified field based on the properties.

If your email body has a fixed format, you can provide us with sample data so that we could provide the appropriate workaround.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-bacao-msft
Community Support
Community Support

 

Hi @RajuGolla ,

 

If the XML data is included in the email body, then you may need to use WDL function to extract the data, preferably the email message has a fixed format.

Please refer to the similar thread below to extract the data specified in the email body:

https://powerusers.microsoft.com/t5/Building-Flows/Extracting-text-from-email/td-p/334919

https://powerusers.microsoft.com/t5/Building-Flows/Extract-text-from-body-of-an-email-and-create-new...

 

After extracting the XML data, you need to use the XPath() function to parse it. Please refer to the following threads and see if it helps:

https://powerusers.microsoft.com/t5/General-Flow-Discussion/Parse-XML-using-Microsoft-Flow/td-p/1149...

https://powerusers.microsoft.com/t5/Connecting-To-Data/xPath-parsing-noob/td-p/345459

 

Once parsed, you can insert data into the specified field based on the properties.

If your email body has a fixed format, you can provide us with sample data so that we could provide the appropriate workaround.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

Users online (1,557)