I'm a nursing student trying to use the NLP API to understand what hospital patients are saying about their experience. I'm trying to use the NLP API in Microsoft's Power Automate via their HTTP connector option but I don't know how to correct configure the connector.
Google's documentation page shows the following example:
curl -X POST \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-H "Content-Type: application/json; charset=utf-8" \
--data "{
'encodingType': 'UTF8',
'document': {
'type': 'PLAIN_TEXT',
'content': 'Enjoy your vacation!'
}
}" "https://language.googleapis.com/v1/documents:analyzeSentiment"
I have a API key that works but I'm unsure of how to pass it into Microsoft's HTTP connector.
How do I set the connector up to call the Google Natural Language API and return the sentiment score?
Google's documentation shows this as a successful return:
{
"documentSentiment": {
"magnitude": 0.8,
"score": 0.8
},
"language": "en",
"sentences": [
{
"text": {
"content": "Enjoy your vacation!",
"beginOffset": 0
},
"sentiment": {
"magnitude": 0.8,
"score": 0.8
}
}
]
}