cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Jimmy1
Level: Powered On

Format Odata Feed Returned

Hi Community,

 

I am new to Flow and Odata, I hope the community and support can provide me some help and guidance:

 

I have this Flow that checks an Azure table and returns the OData feed if there is a new record added to the table.

 

flow-email-text-1.png

 

And the Flow will trigger an email notification sent to users in the following Odata format. What we actually need is only the "CustomerInfo" column which seems to combine all customer info and store in just one field:  

flow-email-text-2.png

 

 

Is there a function or a way in Flow to turn this email message with OData format to a more readable format, eg:

 

flow-email-text-3.png

 

Thank you in advance,

Jimmy

 

7 REPLIES 7
Community Support Team
Community Support Team

Re: Format Odata Feed Returned

Hi @Jimmy1 ,

 

Could you please share a screenshot of the configuration of your flow?

Could you please share the full content in the Body field of the "Send an email" action?

 

Please share more details so we would try to provide a proper workaround for you.

 

Best regards,

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

Jimmy1
Level: Powered On

Re: Format Odata Feed Returned

Hi Alice,

 

You may please refer to my other post which should have all the steps in my flow. The flow itself is working as expected.

 

What I want is to improve the content returned from the Odata feed. It's not that user-friendly so I would like to have some hints on if it's possible to use Flow to make it more readable:

 

Below is the details in the "Send an email" action.

flow-email-text-4.png

 

For example, the message below is generated and sent in the email action. It returns right information but in a messy format. The customer information, such as  First name, Last name, email, phone, etc. is all merged in one "CustomerInfo" tag in this Odata feed. Can Flow help break it down using some delimiter function?

 

[{"odata.etag":"W/\"datetime'2019-02-11T22%3A18%3A27.5818986Z'\"","CustomerInfo":"{\"FirstName\":\"Jimmy\",\"LastName\":\"L\",\"Email\":\"jimmy.l@bss.com\",\"Phone\":\"1234567890\",\"Country\":\"Canada\",\"Company\":\"BSS\",\"Title\":\"AS\"}"}]

 

 

Thanks,

Jimmy

 

 

  

 

Super User
Super User

Re: Format Odata Feed Returned

Hi @Jimmy1 ,

 

After Get entities add a flow step Apply each. Then add a compose within the loop. You should be getting the current item members here.

 

Try this and let me know.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Jimmy1
Level: Powered On

Re: Format Odata Feed Returned

Thanks @abm for the hint. I will definitely give a try and let you know.

Jimmy1
Level: Powered On

Re: Format Odata Feed Returned

Hi @abm and @v-yuazh-msft ,

 

Thanks for the hint. I modified the Flow and added an "Apply to each" action and a "Compose" action within the "Apply to each" function.

 

 

In my test, there are three records returned in Odata format in the "Get entities" step. Output as following: 

 

[

  {
"odata.etag": "W/\"datetime'2019-02-20T19%3A55%3A23.9483784Z'\"",
    "CustomerInfo": "{\"FirstName\":\"Daniel\",\"LastName\":\"M\",\"Email\":\"daniel.m@xxx.com\",\"Phone\":\"1-xxx-xxx-xxxx\",\"Country\":\"Canada\",\"Company\":\"xxx\",\"Title\":\"\"}"
  },
  {
    "odata.etag": "W/\"datetime'2019-02-21T20%3A25%3A52.561583Z'\"",
    "CustomerInfo": "{\"FirstName\":\"Dane\",\"LastName\":\"K\",\"Email\":\"dane.k@yyy.com\",\"Phone\":\"1-xxx-xxx-xxxx\",\"Country\":\"US\",\"Company\":\"yyy\",\"Title\":\"Sales\"}"
  },
  {
    "odata.etag": "W/\"datetime'2019-02-22T07%3A20%3A18.8986299Z'\"",
    "CustomerInfo": "{\"FirstName\":\"Adatum\",\"LastName\":\"Corp\",\"Email\":\"we@www.com\",\"Phone\":\"1-xxx-xxx-xxxx\",\"Country\":\"Canada\",\"Company\":\"www\",\"Title\":\"eg\"}"
  }
]
 
The "Apply to each" seems doing what's expected. It breaks the above Odata into three pages. And I can run and see from the Output section.
 

flow-email-text-6.png

 

May I ask for some further hint on what functions I should use in order to get the format I want? Technically, I just want to take the following "CustomerInfo" portion from each record:

 

\"FirstName\":\"Daniel\",\"LastName\":\"M\",\"Email\":\"daniel.m@xxx.com\",\"Phone\":\"1-xxx-xxx-xxxx\",\"Country\":\"Canada\",\"Company\":\"xxx\",\"Title\":\"\"

\"FirstName\":\"Dane\",\"LastName\":\"K\",\"Email\":\"dane.k@yyy.com\",\"Phone\":\"1-xxx-xxx-xxxx\",\"Country\":\"US\",\"Company\":\"yyy\",\"Title\":\"Sales\"

\"FirstName\":\"Adatum\",\"LastName\":\"Corp\",\"Email\":\"we@www.com\",\"Phone\":\"1-xxx-xxx-xxxx\",\"Country\":\"Canada\",\"Company\":\"www\",\"Title\":\"eg\

 

And turn it into a more readable format like:

 

FirstName: Daniel, LastName: M, Email:daniel.m@xxx.com, Phone: 1-xxx-xxx-xxxx, Country: Canada, Company:xxx, Title:;

FirstName: Dane, LastName: K, Email:ane.k@yyy.com, Phone: 1-xxx-xxx-xxxx, Country: US, Company:yyy, Title: Sales;

FirstName: Adatum, LastName: Corp, Email: we@www.com, Phone: 1-xxx-xxx-xxxx, Country: Canada, Company:www, Title: eg;

 

Or a table format:

 

FirstName LastName Email Phone Country Company Title

Daniel,         M,              daniel.m@xxx.com,  1-xxx-xxx-xxxx,  Canada,  xxx 

Dane,           K,              dane.k@yyy.com,     1-xxx-xxx-xxxx,   US,         yyy            Sales;

Adatum,       Corp,         we@www.com,         1-xxx-xxx-xxxx,  Canada,  www,         eg;

 

Thank you in advance,

Jimmy

Super User
Super User

Re: Format Odata Feed Returned

Hi @Jimmy1 ,

 

Hope you managed to resolve this. Do you need any help in this?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Jimmy1
Level: Powered On

Re: Format Odata Feed Returned

Hi @abm,

 

I am only half way to what I expect to achieve.

 

Eventually, I would like to retrieve a portion of the Odata feed and reformat it.

 

Thanks,

Jimmy 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,172)