564 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
An introduction to calling Microsoft Graph within Power Automate
Part four of a four-part series of blogs
Microsoft Graph is the (strange and misleading) name for the gateway provided by Microsoft to get at all of the things stored in your 365 cloud (emails, files, users, groups, teams and much more). This tutorial explains what Graph is in more detail, and shows how you can call Graph from within Power Automate flows.
At first sight it seems that it will be easy to get the output from an HTTP request in Power Automate:
The displayName property gives the name of each team we're part of, so we just need to pick up on this. What could go wrong?
My natural inclination would be to pick up on each team's display name, get an HTML table showing these names and then email this table to myself:
This will create an HTML table, then email it to me (my name is Delegate64 for the purposes of this blog).
The expression I've used for the HTML column is as follows:
Take the value of the displayName property for each current row.
However, when you run this you get this error:
The error message reads: The 'from' property value in the 'table' action inputs is of type 'Object'. The value must be of type 'Array'.
The reason for this error is that the body section of the web page returned is a JSON object - you need to turn this into an array:
Start by selecting the From parameter for the Create HTML table action, copying it and pasting it into the expression builder.
Initially you get this:
This is just taking the body section returned from the previous action.
Amend this to read like this (and remember to save your changes for the expression):
You're now getting the contents of the value array returned from the HTTP request.
Important full disclosure: not only did the new flow designer refuse to save my flow at this point, but it also then discarded the change I'd made. I therefore reverted to the classic flow designer to complete this example.
My flow now runs perfectly:
What every flow designer wants to see.
And sent me this email:
I'm a member of these two teams.
A final thought: I didn't have to use Microsoft Graph or HTTP requests to achieve this - I could have just used the standard Power Automate List teams action - but that's not the point of this blog!
|Parts of this blog
Some other pages relevant to the above blogs include:
25 Aytoun Street