Working with APIs in Power Platform for beginners

Working with APIs in Power Platform for beginners

This article is contributed. See the original author and article here.


I recently learned how to work with APIs and the different methods to call them. I started with a straight forward example that’s not too complex. I used an open API (that means I don’t need authentication for my request) to get the number of the day from a website called MathTOOLS. I want this number of the day to be posted as a chat message in Microsoft Teams.



Let’s start with some theory first



Whats an API?



API is an acronym for Application Programming Interface and they allow applications to communicate with each other and exchange data. An API lists operations that it can perform and which you can use, if you know how to trigger them. Usually the operations are…



GET (read)

POST (write)

PUT (update)

PATCH (update, but only partially)

DELETE (remove)



How to address APIs?



An API is an interface that you can call and communicate with. You can perform different operations, like getting data, writing things, and so on. But you need to know the correct language, that the API will understand, you need to know the correct direct dial and You need to know what to tell the API to make it do what you want it to do. The language you need is HTTP, which is an acronym for Hypertext Transfer Protocol.

If the browser on your computer wants to communicate with a server somewhere on the world, it sends an HTTP request (it asks politely) and when we did everything in the right way, we will get a polite answer, an HTTP response.



An HTTP request gives us the ability to communicate with an API. So much for the theory, now let’s get our hands dirty :clapping_hands: and let’s see how it looks in Power Automate.



HTTP request



As I mentioned earlier an HTTP request consists of a view things. We will need a…



– Method

– URL

– Headers

– and a body


HTTPrequest.png

 

Method



Luckily we know the methods already.

 




























Method Action
GET read
PUT update
POST write
PATCH update partially
DELETE remove

 

In this use case we want to get the number of the day, so we choose the GET method.



URL



Now for the URL we need to know the URL (kind of obvious, isn’t it :beaming_face_with_smiling_eyes:) of the service we want to address. But not only that, we will also need the endpoint. This is something like the direct call, putting you to that exact point that you want. Usually an API will tell you how the endpoint looks:



api-math-tool.png



The endpoint of the website MathTOOLS is `https://api.math.tools`, but if we read carefully (I usually struggle with that :smiling_face_with_halo:), we get more details for the API of the number of the day:



api-nr-of-day.png



The endpoint for the number of the day is `https://api.math.tools/numbers/nod`. The API documentation even provides us with the information of how the HTTP response will look like:



JSON-nod.png



It’s a very long JSON object (if you want to get started with JSON, I recommend the amazing blog from Bob German Introduction to JSON.

But let’s stay at our HTTP request in Power Automate. We know the Method, we know the URL and we know that we don’t need any authentication. That means we can fill out all mandatory fields in that flow action and it looks like this:



HTTP-flow-step.png



Let’s run this flow on a daily basis and see what the result looks like:



HTTP-flow-run-successfull.png



(Since you can hardly see the result, I paste the body here once again)



HTTP-flow-result.png



And that’s it, we used an HTTP request to GET information from a API. Now for the last part of this blog, we want to use some information from this result to be posted in a chat in Teams.



Use a certain information from a JSON object in a chat message



Now it would make a lot of sense, if we cover the question, how to use a certain information from that JSON object in, let’s say a chat message, right?

Let’s say, we want to post the number of the day in a daily Microsoft Teams chat. We need just two steps for that:



1. put the information of that JSON file in a variable, so it’s always up to date



2. use that variable in message in a Microsoft Teams chat



To use a certain information in a variable, you first need to initialize a variable and fill out all the information:



Name: I called mine NrOfDay

Type: We want to use a string here (a string is a sequence of characters, that can include letters or numbers, but it will be recognized as a “text”)

Value: Here we want to define the value of this variable. In our case that means that particular information from this long JSON object.



JSON-value.png



We want the value of the property “number”



Notice, that this JSON element consists of three different objects. We have the objects “success”, “copyright” and “content”. The object “content” contains an object called “nod”, which contains two more objects called “category” and “numbers”.



JSON-objects.png



As stated earlier, we want the value of the property “number”, which is located in the object “numbers” (which is part of the object “nod”, which is part of the object “content”).



JSON-nod-value.png



Now we can tell our variable in Power Automate the exact location of the value we want to use in this variable. The expression to “navigate” to the value of this property looks like this:

`body(‘HTTP_-_GETnon’)[‘contents’][‘nod’][‘numbers’][‘number’]`

The first part (`body(‘HTTP_-_GETnon’)`) tells where we want to look, the later parts are navigating through the JSON object until we reach the exact object and the exact property. With this method you can get any value of any JSON object you like.



Now you can build in the variable in a “Post message in a chat or channel” action as dynamic content in Flow and it will always show the value of the property of that JSON object.



Teams-message.png



That’s it. That is how you call an API, get a JSON object back and use certain values from that object in Power Automate. I hope you liked it and it helps you. If anything is unclear, or you have questions, please feel free to reach out to me. Easiest way would be twitter :*



As I mentioned in the beginning, I will further work with APIs. If you want to learn more, here’s what I’m going to work on next. If you have specific questions, please ask me or make suggestions. I’m always eager to learn new things.

Next API topic: What’s a custom connector, where is the difference between a http request and a custom connector and when to use what.

Four Additional Azure Synapse Database Templates Now Available in Public Preview

Four Additional Azure Synapse Database Templates Now Available in Public Preview

This article is contributed. See the original author and article here.

In response to the enthusiastic adoption of the eleven Synapse Database Templates for which we announced availability, in public preview, in November and December 2021, we’re pleased to announce today that we are making available, in public preview, additional Synapse Database Templates for four more industries:


 



  • Automotive Industries

  • Genomics

  • Manufacturing

  • Pharmaceuticals


 


The Synapse Database Template for Automotive Industries is a comprehensive data model that addresses the typical data requirements of organizations engaged in manufacturing automobiles, heavy vehicles, tires, and other automotive components.


 


The Synapse Database Template for Genomics is a comprehensive data model that addresses the typical data requirements of organizations engaged in acquiring and analyzing genomic data about human beings or other species.


 


The Synapse Database Template for Manufacturing is a comprehensive data model that addresses the typical data requirements of organizations engaged in either discrete or continuous manufacturing of a wide range of products. Portions of this database template are also included as part of the previously announced Consumer Goods database template and in the Automotive Industries and Pharmaceuticals database templates being announced today so companies in those industries will likely prefer to use those database templates rather than the general purpose Manufacturing industry database template as they contain additional content specific to those industries in addition to the content contained in the general Manufacturing database template.


 


The Synapse Database Template for Pharmaceuticals is a comprehensive data model that addresses the typical data requirements of organizations engaged in creating, manufacturing, and marketing pharmaceutical and bio-pharmaceutical products and medical devices.


 


Most of the Synapse database templates contain many different business areas that together comprise each of these very large industry-specific data models. For example, in addition to business areas such as Product, Inventory, and Human Resources, there is also an Emissions business area which provides support for data used to report greenhouse gas emissions (including scope 1, scope 2, and scope 3 emissions), an area of significant focus for many of our large customers.


 


These 4 additional database templates can be accessed now in Azure Synapse either in the gallery or by creating a new lake database from the Data tab and selecting + Table and then From template.


 


DataModels_0-1641958582645.png


 


Learn more:


Microsoft named as a worldwide Leader in IDC MarketScape for Customer Data Platforms

Microsoft named as a worldwide Leader in IDC MarketScape for Customer Data Platforms

This article is contributed. See the original author and article here.

Organizations across industries and around the world are seeking new ways to unlock their customer data to provide high-quality, connected customer experiences. Microsoft’s work to help enterprises, especially those in the retail, consumer brands, healthcare, manufacturing, and media and advertising industries to meet their customers’ expectations by delivering privacy-aware, consent enabled personalization has gained some recognition.

Microsoft is thrilled to be named a Leader in the IDC MarketScape for Worldwide Customer Data Platforms Focused on Front-Office Users 2021-2022 Vendor Assessment (doc # US47524621, December 2021). The IDC MarketScape is the first research by a major analyst firm evaluating customer data platform (CDP) vendors.

Graphical illustration of IDC MarketScape Worldwide Customer Data Platforms Focused on Front-Office Users

Source: “IDC MarketScape: Worldwide Customer Data Platforms Focused on Front-Office Users 20212022 Vendor Assessment”, By: Gerry Murray, David Wallace & Michelle Morgan, December 2021, IDC # US47524621

The report highlights customer data management, including 360-degree customer view, improving customer experience, and globalization as top capabilities within Dynamics 365 Customer Insights. Dynamics 365 Customer Insights helps customers unify all their B2C and B2B customer data to generate AI-powered insights in real-time, creating a single view of the customer. Interactive reports help marketers optimize their customers’ journeys, and AI-powered insights speed the prediction of customer needs.

Dynamics 365 Customer Insights elegantly supports both technical and non-technical usersbe it through a visual UI/drag and drop interface for marketers or through advanced analytics for data scientists. The IDC MarketScape said to, “Consider Microsoft if you have significant investments in Microsoft’s Dynamics 365 applications such as marketing or sales or if you are looking for user-friendly AI/ML modeling capabilities that do not require marketers (and other LOB users) to be data scientists.” The report also noted, “Microsoft’s CDP segments are created through automated discovery powered by AI, API configuration, and visual UI/drag and drop interface for markets and through analytic/SQL queries for data scientists. Segments are updated based on a variety of factors such as streaming web session data, geolocation, and dynamic modeling and based on batch data updates.”

The IDC MarketScape noted, “Microsoft is strong in this important area for enterprise CDP buyers as the speed, scale, and response time for processing high volumes of customer data are an important enabler of personalization and customer experience.”

The IDC MarketScape also stated, “Microsoft has strengths in all aspects of globalization: number of languages supported in its CDP; number of countries with customers, sales, service, and support; and regional implementation partners.”

We invite you to read the IDC MarketScape for Worldwide Customer Data Platforms Focused on Front-Office Users 2021-2022 report excerpt for full details.

Find out how Microsoft customers are creating great brand and customer experiences with Dynamics 365 Customer Insights.

Campari Group raises the bar for customer experiences with a 360-degree customer view that enhances the personalization of its marketing, sales, and customer service efforts.

Chipotle served up personalized experiences to convert more guests into loyalty program members.

Walgreens Boots Alliance is unlocking insights that power more engaging, personalized customer experiences.

About the graphic:

IDC MarketScape vendor analysis model is designed to provide an overview of the competitive fitness of ICT suppliers in a given market.  The research methodology utilizes a rigorous scoring methodology based on both qualitative and quantitative criteria that results in a single graphical illustration of each vendor’s position within a given market. The Capabilities score measures vendor product, go-to-market and business execution in the short-term. The Strategy score measures alignment of vendor strategies with customer requirements in a 3-5-year timeframe. Vendor market share is represented by the size of the circles. Vendor year-over-year growth rate relative to the given market is indicated by a plus, neutral or minus next to the vendor name.

The post Microsoft named as a worldwide Leader in IDC MarketScape for Customer Data Platforms appeared first on Microsoft Dynamics 365 Blog.

Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.

Don’t assume every COVID-19 test site is legit

Don’t assume every COVID-19 test site is legit

This article was originally posted by the FTC. See the original article here.

If you’ve been looking for a COVID-19 test, you probably know that they are in short supply. Unfortunately, scammers love to “help” with shortages. They’ve created fake and unauthorized at-home testing kits, and they’re still at it with fake COVID-19 testing sites.

These fake sites can be hard to spot. They look real, with legitimate-looking signs, tents, hazmat suits, and realistic-looking tests. And the damage these fake testing sites can cause is very real.

We’ve heard reports of these sites claiming to have ‘free tests’ but then you’re later billed and sometimes never receive the test that was promised. Fake sites are taking people’s personal information, including Social Security numbers, credit card information, and other health information which can be used for identity theft or to run up your credit card bill.

Worst of all, they’re not giving people the help they need to stay healthy.

Here are a few things to keep in mind when looking into testing sites.

  • Get a referral. Go somewhere you have been referred to by your doctor or state or local health department’s website. In other words, don’t trust a random testing site you see around town.
  • Check the source. Did you hear about a new testing site on a neighborhood social media group or email listserv? That “neighbor” could actually be a scammer. See if the site is also listed on your state or local health department’s website.
  • Not sure if a site is legit? Check with your local police or sheriff’s office. If a legitimate testing site has been set up, they should know about it. And, if a fake testing site is operating, they’ll want to know.

Think you already went to a fake site? If you shared your credit card information, plan to dispute the charge.

Spotted a fake COVID-19 testing site? Tell your local police or sheriff’s office. And then tell us at ReportFraud.ftc.gov.

Brought to you by Dr. Ware, Microsoft Office 365 Silver Partner, Charleston SC.