cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thressac
Helper I
Helper I

Create a news post when a list item is created

Is there a flow when a new list item is created it creates a news post with the info from that list item?

22 REPLIES 22
Automaton1
Regular Visitor

Hi @Expiscornovus 

 

Your solution works!! Thank you so much.

 

I've tried to insert the banner image using the following:

{

"LayoutWebpartsContent":"[{\"id\":\"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788\",\"instanceId\":\"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788\",\"title\":\"\\n      Title area\\n    \",\"description\":\"\\n      Title area description\\n    \",\"audiences\":[],\"serverProcessedContent\":{\"htmlStrings\":{},\"searchablePlainTexts\":{},\"imageSources\":{\"imageSource\":\"\"},\"links\":{},\"customMetadata\":{\"imageSource\":{}}},\"dataVersion\":\"1.4\",\"properties\":{\"imageSourceType\":2,\"title\":\"Test\",\"textAlignment\":\"Left\",\"showPublishDate\":true,\"authors\":[{\"id\":\"\",\"upn\":\"\",\"email\":\"\",\"name\":\"\",\"role\":\"\"}],\"showTopicHeader\":false,\"authorByline\":[\"\"],\"layoutType\":\"CutInShape\",\"titlePlaceholder\":\"Name your news post\",\"topicHeader\":\"\"},\"reservedHeight\":356}]","CanvasContent1":"[{\"controlType\":4,\"id\":\"1212fc8d-dd6b-408a-8d5d-9f1cc787efbb\",\"position\":{\"controlIndex\":2,\"sectionIndex\":1,\"sectionFactor\":12,\"zoneIndex\":1,\"layoutIndex\":1},\"addedFromPersistedData\":true,\"innerHTML\":\"@{triggerOutputs()?['body/Description']} <p>Congrats, @{triggerOutputs()?['body/NominatedEmployee/DisplayName']}!!</p> @{triggerOutputs()?['body/Author/DisplayName']} has just nominated you for having these values: @{variables('SCCValues')}. <br> Here is their message: @{triggerOutputs()?['body/Reasons']}.<br>\",\"emphasis\":{}},{\"controlType\":0,\"pageSettingsSlice\":{\"isDefaultDescription\":true,\"isDefaultThumbnail\":true}}]","AuthorByline": [],"TopicHeader": "","BannerImageUrl":"https://company.sharepoint.com/sites/TestCommunicationSite/Images1/award.png","Title":"@{triggerOutputs()?['body/Title']} Congrats @{triggerOutputs()?['body/NominatedEmployee/DisplayName']}!!"}

 

On the main site, it shows up fine however not on the page itself.

Automaton1_1-1661832209007.png

 

Automaton1_0-1661832174323.png

 

Once I click on 'Page details', its showing the banner photo on the top-right.

Automaton1_0-1661836936923.png

When I click on 'Edit' to enter the edit mode on the page and click on 'page details', it shows the default banner image.

Automaton1_1-1661837035522.png

 

Any advises would be much appreciated.

 

Thanks

Lukas_SCH
New Member

Hi @Expiscornovus and @thressac,

i would like to follow your instructions as a total noob and beginner in Power Automate. i have problems with the beginning of the third HTTP Request using the right URI. Have you made or created something beforehand that is pretty obvious? Flowreader asks me to correct for valid reference. Can u help me out here?

I have gotten closer. Mine post but only show the image when I click on the news post. The thumbnail doesn't show until I click on the post again, click edit and then immediately update the post without changing anything. Then the image and thumbnail show up correctly. 

 

\"imageSources\":{\"imageSource\":\"/sites/PC/SiteAssets/SitePages/Test-Title/88339-Expired-stamp-PSD---PSDstamps.png\"}

 

{
	"LayoutWebpartsContent": "[{\"id\":\"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788\",\"instanceId\":\"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788\",\"title\":\"\\n      Title area\\n    \",\"description\":\"\\n      Title area description\\n    \",\"audiences\":[],\"serverProcessedContent\":{\"htmlStrings\":{},\"searchablePlainTexts\":{},\"imageSources\":{\"imageSource\":\"/sites/PC/SiteAssets/SitePages/Test-Title/88339-Expired-stamp-PSD---PSDstamps.png\"},\"links\":{},\"customMetadata\":{\"imageSource\":{}}},\"dataVersion\":\"1.4\",\"properties\":{\"imageSourceType\":2,\"title\":\"Expired Forms\",\"textAlignment\":\"Left\",\"showPublishDate\":true,\"authors\":[{\"id\":\"\",\"upn\":\"\",\"email\":\"yourauthor@domain.com\",\"\":\"\",\"role\":\"\"}],\"showTopicHeader\":false,\"authorByline\":[\"\"],\"layoutType\":\"CutInShape\",\"titlePlaceholder\":\"Expired Forms\",\"topicHeader\":\"\"},\"reservedHeight\":356}]",
	"CanvasContent1": "[{\"controlType\":4,\"id\":\"1212fc8d-dd6b-408a-8d5d-9f1cc787efbb\",\"position\":{\"controlIndex\":2,\"sectionIndex\":1,\"sectionFactor\":12,\"zoneIndex\":1,\"layoutIndex\":1},\"addedFromPersistedData\":true,\"innerHTML\":\"<b>The following documents are no longer active.</b><br><br>@{outputs('Compose_Table_to_String')}\",\"emphasis\":{},\"zoneGroupMetadata\":{\"type\":0}}]",
	"Title": "Forms Expired on @{body('Convert_time_zone')}"
}

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,502)