How do I extract a particular text from response body of an external API and adding that extracted text in Sharepoint(new column field) through power automate.
Let me make it more clear with an example:
------------------------------------------------
I have a question 'text box' and an answer submit button in my power apps.
Whenever user types any question , I will get response from the external API which i automated through power automate
I have a response body from API
{
"id": "cmpl-6CUPOyw88UWW4INxrcP75vaf7L5fI",
"object": "text_completion",
"created": 1668434846,
"model": "text-davinci-002",
"choices": [
{
"text": "\n\nSachin is the co-founder of Shopify, an ecommerce platform that allows businesses to create online stores.",
"index": 0,
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 10,
"completion_tokens": 26,
"total_tokens": 36
}
}
------------------------------------------------------
From the above response body, i want only completion_tokens and it should be added in sharepoint list whenever user types any question.
and one more thing, from the above response - 'text' is the response that i get after typing question (that part i did in power automate)
but now i want only completion_token to be added in sharepoint list with user question + completion_token.
How do i do that?