You are viewing limited content. For full access, please sign in.

Question

Question

Workflow Auto Post to Discussions

asked on June 26, 2020

I want to build a process that automatically posts a new item to Discussions with information pulled from a database.

 

Is there a way to get Workflow to auto post to Discussions? Is there something in the SDK? Or a documented POST i can send over? Or does anyone know of another method to automate posting to Discussions?

0 0

Answer

SELECTED ANSWER
replied on June 29, 2020

Ok, so this is probably a bit messy but this my work around for the problem. Instead of auto posting, we really just need one post that is updated daily with information joined from another set of tables. 

 

I edited this script down a bit; the 'sampletable'  is a series of joins that was to wide and long for this post.

Update [Discussions].[dbo].[Posts]
Set [Discussions].[dbo].[Posts].[Body] = tblAgg.[AggData]
From
    (Select stuff((
     ( Select '  <p>' + col1 + ', ' + col2 + '</p>' 
       from sampletable
     ) as tblData
    for xml path(''),TYPE).value('.','varchar(max)')
    ), 1, 2, '' ) as AggData) as tblAGG
Where [Discussions].[dbo].[Posts].[Id] = IDnumberOfTargetedPost;

 

0 0

Replies

replied on June 29, 2020

I've attempted to use chrome to follow how the web page submits a POST but seems to rely on a cookie for the submissions.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.