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

How to read e-mails in PowerApps Application with Office365Outlook.GetEmailsV3

Hey. My question is simple. I'd like to display my e-mails from outlook in my PowerApps Application. To do this action i have created an canvas application with an gallery. I'am connected with Office365Outlook. In the "Items" from "TemplateGalleryList" I have typed "Office365Outlook.GetEmailsV3({fetchOnlyUnread:false})". But how i have to do for display Title and corp message (in "Title2" and "Subtitle2") ? No field name is offered to me in this fields except "Thisitem.sampletext". I don't understand... Thank you for your helps 🙂
Capture1.JPGCapture2.JPGCapture3.JPG

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @llechat ,

Do you mean that you could use  "Getemails" function, but couldn't use  "GetemailsV3" function?
Firstly, let me explain why you met this problem.

The key point is the results that these two functions return are different.

"Getemails" function will return a table named ClientReceiveMessage. Its structure is like this:
32033.PNG

So you could directly use this in the gallery's Items. Its result is a table with fields: from, subject,....

Office365Outlook.GetEmails({fetchOnlyUnread:false})

 

While "GetemailsV3" function will return a table named BatchResponse[GraphClientReceiveMessage].

Its structure is like this:

32044.PNG

 It is a table with a field named value and its data is array of ClientReceiveMessage.

So If you want the table like "Getemails" function turns, you need to use this formula in your gallery's Items:

Office365Outlook.GetEmailsV3({fetchOnlyUnread:false}).value

Notice you need to add ".value".

 

 

Here's a doc about this connector, you could check the result that all the functions return:

https://docs.microsoft.com/en-us/connectors/office365/

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

5 REPLIES 5
llechat
Frequent Visitor

In fact i've seen that's the method "GetemailsV3" does not work. With the method "Getemails" PowerApps propose to me all the fields and it does work. Very strange ! 🤔

 

Capture.JPG

Hi @llechat ,

Do you mean that you could use  "Getemails" function, but couldn't use  "GetemailsV3" function?
Firstly, let me explain why you met this problem.

The key point is the results that these two functions return are different.

"Getemails" function will return a table named ClientReceiveMessage. Its structure is like this:
32033.PNG

So you could directly use this in the gallery's Items. Its result is a table with fields: from, subject,....

Office365Outlook.GetEmails({fetchOnlyUnread:false})

 

While "GetemailsV3" function will return a table named BatchResponse[GraphClientReceiveMessage].

Its structure is like this:

32044.PNG

 It is a table with a field named value and its data is array of ClientReceiveMessage.

So If you want the table like "Getemails" function turns, you need to use this formula in your gallery's Items:

Office365Outlook.GetEmailsV3({fetchOnlyUnread:false}).value

Notice you need to add ".value".

 

 

Here's a doc about this connector, you could check the result that all the functions return:

https://docs.microsoft.com/en-us/connectors/office365/

 

 

Best regards,

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

Thanks you for this explanations. It's very clear 🙂

I've two last question.

 

1/ How is possible to obtain value of a specific field with 

"Office365Outlook.GetEmailsV3({fetchOnlyUnread:false}).value"

I mean. If i want to access to "body" or "from" etc. How is possible to display the value of specific field ? 

 

2/ How is possible to refresh "Items" with new mails ?

 

Thanks a lot

Insert a button "B1"

B1-> OnSelect -> ClearCollect(Mail01, Office365Outlook.GetEmailsV3({fetchOnlyUnread:false}).value)

Next add a blank Gallery

Next add a label "L1", "L2","L3"....etc

L1 ->Text -> ThisItem.from

L2->Text -> ThisItem.subject

L3->Text -> ThisItem.bodyPreview

…….…..hope this helps 🙂

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,473)