Question

Outlook API REQUEST ‘toRecipients’ filtering and transforming

  • 22 May 2023
  • 0 replies
  • 179 views

Hello! I’m currently building a zap crawling emails from my outlook account using outlook>API REQUEST and updating a google sheet out of those data. 
 

however, I’m having a problem using queries to filter the toReciepients fields, and I guess that’s bc it includes multiple data groups 

example JSON output) 

 

toRecipients:

  1:

     emailAddress: “something”

     name: “someone”

 

Like this, I have groups 1, 2, 3… under toRecipients fields if I have multiple recipients 

so the query below is not working: 


GET https://graph.microsoft.com/v1.0/me/mailfolders/inbox/messages?$filter=toRecipients/any(r: contains(r/emailAddress/name, ‘nameiwanttofilter'))&$orderby=receivedDateTime desc
 

Guys have any seasoned advice to deal with this problem? 
 

 

and further, since the output would be in the JSON format, anyone knows how to convert ‘toRecipients’ data into some lineitems so that I can save it in the Google sheet for each email? 
 

 

 

 

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.