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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create a news when an ...
Power Automate
Answered

Create a news when an item is created Question

(0) ShareShare
ReportReport
Posted on by 185

Hi I have a question about this post you created. https://powerusers.microsoft.com/t5/Building-Flows/Create-a-news-post-when-a-list-item-is-created/m-...

 

 

l follow the instruction in that post and was successful, however at the last send HTTP action whenever I add the Text Properties from the when a new item is created, I am getting this error:

 

knishal_0-1664452964748.png

 

 

When a new item is created: I am adding the Text on and thats where the error is coming from. If I add title/name the flow runs with no errror:

 

knishal_1-1664452964746.png

 

 

Would you be able to assist?

Categories:
  • Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @knishal,

     

    Have you added the Text field within the innerHTML property? Can you also share a screenshot of the configuration of that Send an HTTP request action which uses the SavePageAsDraft method?

     

     

  • knishal Profile Picture
    185 on at

    Hi @Expiscornovus  I think the issue is, its getting the text field as an HTML. When I add the text field I am getting the error only, it started a timer on the work flow then it fails after 20 minutes.

     

    here is the code:

     

    knishal_1-1664466300286.png

     

    The flow runs fine when I remove the text field.

     

    I think since the text filed is a multiple line of text field in sharepoint, there has to be a compose method to remove the HTML tags because this is how its seeing the text field:

     

    This is the output for  when an item is created.

    </div>","Text2":"<div class=\"ExternalClass747E7CCDCE8A42DEA57125DABC98288E\"><p>​​test8​<br></p></div>

     

    If there is a way it can remove the the html tags, i think then it will work. The test 8 is the text that needs to be extracted.

  • Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @knishal,

     

    In that case try an HTML to text action. And use the output of that in your Send an HTTP request action.

     

    htmltotextaction.png

  • knishal Profile Picture
    185 on at

    Thank you @Expiscornovus  I tried that but its giving me the same issue: 

    knishal_2-1664467212213.png

     

    knishal_3-1664467254233.png

     

  • knishal Profile Picture
    185 on at

    This is the raw out from the HTML To Text:

    {
     "host": {
     "connectionReferenceName": "shared_conversionservice",
     "operationId": "HtmlToText"
     },
     "parameters": {
     "Content": "<p><div class=\"ExternalClassF3736BF7A7E74453854FAF6D68CD89E0\"><p>​test8<br></p></div></p>"
     }
    }
  • Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @knishal,

     

    That looks like the input instead of the output, to be honest. What is in the raw outputs?

     

    rawoutputs_htmltotext.png

     

    When I use your html I am getting this:

    slashn.PNG

     

    It looks like it is adding new line characters. We can remove them by using a replace.

     

    Can you use this together with the HTML output?

    replace(body('Html_to_text'), decodeuricomponent('%0A'), '')

     

    replacefunction.png

     

  • knishal Profile Picture
    185 on at

    Yes i took a look, I am getting the same output as well. I tried with your 

    replace(body('Html_to_text'), decodeuricomponent('%0A'), '')

    & I am getting the same error:

    knishal_0-1664480960675.png

     

    knishal_1-1664480997642.png

     

     

  • Verified answer
    Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @knishal,

     

    Your Title is empty, you used Title/Name field for that before, right? Can you please add a Title in the last part of your json?

  • knishal Profile Picture
    185 on at

    Wow. That works, Thank you so much @Expiscornovus . 

     

    Now I need to add a picture but it starts the timer when I did, Where do I add the picture in the json?

    knishal_0-1664539396048.png

     

    I am getting the picture from when an item is created:

    knishal_1-1664539468228.png

     

    Also is it possible to use a template or retain this format:

    knishal_2-1664539638824.png

     

  • knishal Profile Picture
    185 on at

    I have a profile banner image url on the destination site:

    knishal_0-1664541539705.png

    Whenever a post is created it, display the image and the title on the home page:

    knishal_1-1664541604282.png

     Its currently not displaying any image. Do i get a get the image and store it somewhere or how can I do this? @Expiscornovus 

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 349 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard