web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How do i extract a par...
Power Automate
Answered

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

(0) ShareShare
ReportReport
Posted on by 403

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?
 

 

Categories:
I have the same question (0)
  • Verified answer
    Ajinder31 Profile Picture
    530 on at

    Hi @Jupyter123 , We can use Parse JSON action to parse the response and access the completion token.

    Ajinder31_0-1668487732142.png

     

  • Jupyter123 Profile Picture
    403 on at

    yea @Ajinder31  and finally how do you add it in sharepoint column field?

  • Ajinder31 Profile Picture
    530 on at

    Hi @Jupyter123 , We can use SharePoint Create Item or Update Item for same. Just pass the required value to respective field in the Action.

    Ajinder31_0-1668489645537.png

     



  • Jupyter123 Profile Picture
    403 on at

    Well, @Ajinder31  In sharepoint it asking for some ID to be added. What should i enter there>

  • Ajinder31 Profile Picture
    530 on at

    Hi @Jupyter123 , ID is identifier of the item we're trying to Update.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 331 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 203 Most Valuable Professional

Last 30 days Overall leaderboard