Yammer data export - how to automate to run daily

%3CLINGO-SUB%20id%3D%22lingo-sub-105903%22%20slang%3D%22en-US%22%3EYammer%20data%20export%20-%20how%20to%20automate%20to%20run%20daily%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-105903%22%20slang%3D%22en-US%22%3E%3CP%3ERequire%20assistance%20to%20script%20and%20schedule%20a%20Yammer%20data%20export%20(excluding%20attachments)%20to%20run%20daily%2C%20in%20an%20unzipped%20format.%20Also%20if%20its%20possible%2C%20to%20save%20the%20exported%20data%20directly%20into%20an%20Azure%20store%20(for%20Machine%20Learning%20processing).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20suggestions%2C%20or%20methods%20already%20being%20used%20to%20achieve%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECame%20across%20this%20information%20on%20the%20Yammer%20data%20export%20api%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdeveloper.yammer.com%2Fv1.0%2Fdocs%2Fdata-export-api%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdeveloper.yammer.com%2Fv1.0%2Fdocs%2Fdata-export-api%3C%2FA%3E%3C%2FP%3E%3CP%3EHowever%20I'm%20not%20a%20developer%20ie.%20Unsure%20how%20to%20correctly%20code%2C%20setup%20and%20execute%20something%20like%20this...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-105903%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EYammer%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-112992%22%20slang%3D%22en-US%22%3ERe%3A%20Yammer%20data%20export%20-%20how%20to%20automate%20to%20run%20daily%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-112992%22%20slang%3D%22en-US%22%3EYou're%20actually%20getting%20views%20per%20person%20and%20per%20*group*%2C%20but%20you're%20right%20-%20there's%20no%20way%20to%20get%20read%20information%20at%20the%20thread%20level.%20We%20have%20one%20workaround%20for%20this.%20If%20you%20include%20a%20GIF%20in%20the%20original%20post%2C%20tyGraph%20has%20figured%20out%20how%20to%20get%20the%20number%20of%20%22file%20views%22%20on%20a%20file%2C%20which%20is%20incremented%20whenever%20someone%20views%20a%20GIF%20in%20a%20thread.%20Aside%20from%20that%2C%20I'd%20have%20a%20conversation%20with%20your%20stakeholders%20about%20using%20a%20different%20metric%20like%20replies%20or%20likes.%20It%20will%20certainly%20be%20a%20smaller%20number%2C%20but%20it's%20potentially%20a%20more%20potent%20measure%20of%20actual%20value%20of%20the%20thread.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-112926%22%20slang%3D%22en-US%22%3ERe%3A%20Yammer%20data%20export%20-%20how%20to%20automate%20to%20run%20daily%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-112926%22%20slang%3D%22en-US%22%3EYea%2C%20the%20read%20counts%20are%20already%20available%20in%20O365%20admin%20analytics%20reporting%20board.%20You%20can%20download%20views%20per%20person%20and%20per%20thread%2C%20but%20you%20can't%20isolate%20who%20is%20viewing%20what.%20It's%20an%20aggregation%20graph%20you%20really%20can't%20do%20much%20with%20and%20there's%20still%20no%20API%20despite%20it's%20getting%20a%20read%20count%20somehow.%20I%20want%20to%20be%20able%20to%20report%20on%20what%20threads%20are%20getting%20the%20most%20views%20and%20the%20unique%20count%20of%20views%20etc%20to%20do%20analytics%20behind%20it.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-110357%22%20slang%3D%22en-US%22%3ERe%3A%20Yammer%20data%20export%20-%20how%20to%20automate%20to%20run%20daily%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-110357%22%20slang%3D%22en-US%22%3E%3CP%3ECongrats%20on%20automating%20that!%20It's%20a%20shame%20you're%20not%20seeing%20the%20demand%20for%20those%20analytics%20that%20I%20see%20elsewhere.%20I'd%20suggest%20driving%20a%20conversation%20with%20management%20about%20their%20business%20goals%20for%20the%20platform%3A%20are%20they%20looking%20to%20drive%20more%20innovation%3F%20improve%20execution%3F%20When%20usage%20is%20driven%20by%20a%20business%20goal%2C%20there's%20much%20more%20interest%20in%20the%20data%20showing%20improvement%20toward%20that%20goal.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%2C%20there's%20no%20API%20for%20thread%20%22reads%22%20but%20tyGraph%20has%20found%20a%20way%20to%20mine%20file%20views%20and%20downloads.%20They%20and%20others%20also%20analyze%20replies%20and%20mentions%20for%20a%20clearer%20picture%20of%20who%20the%20influencers%20are%20in%20your%20organization.%20Also%2C%20there%20was%20this%20announced%20today%20by%20the%20Yammer%20team%20at%20Ignite%20(note%20the%20%22read%22%20counts).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F20938i8570EE2214DF9821%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22IMG_-2tpqeu.jpg%22%20title%3D%22IMG_-2tpqeu.jpg%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EGroup%20Analytics%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-110192%22%20slang%3D%22en-US%22%3ERe%3A%20Yammer%20data%20export%20-%20how%20to%20automate%20to%20run%20daily%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-110192%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20not%20quite%20sure%20if%20you%20can%20extract%20any%20more%20information%20than%20the%20export%20provides.%20I%20built%20out%20a%20pretty%20robust%20dashboard%20in%20Tableau%20based%20off%20the%20export%2C%20which%20costs%20my%20organization%20%240%20to%20maintain%20now%20as%20it's%20in%20an%20automated%20state.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%2C%20tygraph%20has%20more%20at%20the%20moment%2C%20but%20I%20can%20build%20out%20any%20of%20those%20dashboards%20in%20a%20day%20-%20but%20there's%20been%20no%20requirement%20for%20me%20to%20do%20so%20internally.%20The%20thing%20we%20lack%20most%20is%20the%20ability%20to%20view%20lurkers.%20(See%20people%20who%20just%20sign%20in%20to%20read%20messages)%20-%20As%20well%20as%20what%20they're%20viewing%2C%20but%20there's%20no%20API%20for%20that%20so%20I%20assume%20there's%20no%20solution%20that%20includes%20that.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-107972%22%20slang%3D%22en-US%22%3ERe%3A%20Yammer%20data%20export%20-%20how%20to%20automate%20to%20run%20daily%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-107972%22%20slang%3D%22en-US%22%3E%3CP%3EIt%20may%20be%20more%20cost%20effective%20and%20impactful%20for%20your%20organization%20in%20the%20long%20run%20to%20use%20a%203rd%20party%20tool%20designed%20to%20do%20this%20and%20much%20more.%20They've%20spent%20the%20time%20to%20learn%20how%20best%20to%20extract%20all%20the%20data%20possible%20from%20Yammer.%20For%20your%20specific%20use%20case%2C%20I'd%20highly%20recommend%20tyGraph.%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F324%22%20target%3D%22_blank%22%3E%40Dean%20Swann%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-106127%22%20slang%3D%22en-US%22%3ERe%3A%20Yammer%20data%20export%20-%20how%20to%20automate%20to%20run%20daily%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-106127%22%20slang%3D%22en-US%22%3E%3CP%3EI%20run%20a%20powershell%20script....%20scheduled%20to%20run%20every%20day.%20Make%20sure%20whereever%20you're%20hosting%20has%20access%20as%20well%20as%20Powershell%20Version%204%20or%20newer%20(I%20use%205%20currently).%20Check%20powershell%20version%20with%20%24PSVersionTable.PSVersion.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFollow%20instructions%20on%20that%20site%20to%20get%20your%20token%2C%20then%20fill%20it%20in%20the%20bearer%20token%20below...%3C%2FP%3E%3CP%3EUse%20at%20your%20own%20risk.%20You%20need%20to%20build%20out%20error%20handling%20and%20logging.%20Also%2C%20directory%20checks%20for%20items%20that%20already%20exist%2Fmove%20items%20if%20you%20want%20to%20archive%20previous%20exports.%20GL.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%24BearerToken%20%3D%20''%3C%2FP%3E%3CP%3E%24headers%20%3D%20New-Object%20%22System.Collections.Generic.Dictionary%5B%5BString%5D%2C%5BString%5D%5D%22%3CBR%20%2F%3E%24headers.Add(%22Authorization%22%2C%20%22Bearer%20%24BearerToken%22)%3CBR%20%2F%3E%24headers.Add(%22Accept%22%2C'*%2F*')%3CBR%20%2F%3E%24headers.Add(%22accept-encoding%22%2C%20%22zip%22)%3C%2FP%3E%3CP%3E%23Base%20Directory%20where%20you%20want%20these%20files%20to%20be%20saved%20locally%3C%2FP%3E%3CP%3E%24dir%20%3D%20''%3CBR%20%2F%3E%24currentfile%20%3D%20%22%24(%24dir)%5Ccurrent%5Cmessages.csv%22%3C%2FP%3E%3CP%3E%23%20You%20can%20use%20a%20relative%20date%20range%20for%20the%20export%20as%20well%2C%20by%20building%20out%20a%20date%20object%3C%2FP%3E%3CP%3E%24export%20%3D%20%22%3CA%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Fapi%2Fv1%2Fexport%3Fsince%3D2015-01-01T00%3A00%3A00%26amp%3Binclude%3Dcsv%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.yammer.com%2Fapi%2Fv1%2Fexport%3Fsince%3D2015-01-01T00%3A00%3A00%26amp%3Binclude%3Dcsv%3C%2FA%3E%22%3C%2FP%3E%3CP%3E%23Create%20logs%20for%20your%20files.%3C%2FP%3E%3CP%3E%24log_file%20%3D%20%22%24(%24dir)%5Clog%5C%7B0%3Ayyyy-MM%7D_Export.log%22%20-f%20(get-date)%3CBR%20%2F%3E%23Example%20to%20add%20logs%20--%20%24logmsg%20%3D%20%22This%20is%20my%20log%22%3C%2FP%3E%3CP%3E%23%20Add-content%20%24log_file%20%22%24logmsg%22%3C%2FP%3E%3CP%3E%23Two%20lines%20inside%20the%20Try%20is%20actually%20where%20the%20attempts%20work.%20I%20found%20there%20to%20be%20issues%20so%20I%20put%20them%20in%20different%20areas%20for%20download%2C%20then%20download%20is%20complete%2C%20unzip.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ETry%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20invoke-webrequest%20-uri%20%24export%20-method%20get%20-headers%20%24headers%20-OutFile%20%24dir%5Cexport.zip%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Expand-archive%20-path%20%24dir%5Cexport.zip%26nbsp%3B%20-dest%20%24dir%5Ccurrent%20-f%3C%2FP%3E%3CP%3ECatch%3C%2FP%3E%3CP%3E%7B%3C%2FP%3E%3CP%3E%23Error%20Handling%20goes%20here%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-105953%22%20slang%3D%22en-US%22%3ERe%3A%20Yammer%20data%20export%20-%20how%20to%20automate%20to%20run%20daily%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-105953%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F161%22%20target%3D%22_blank%22%3E%40Loryan%20Strant%3C%2FA%3E%26nbsp%3Bits%20a%20requirement%20from%26nbsp%3Bour%20machine%20learning%20lab...I%20believe%20they%20need%20to%20have%20the%20latest%20data%20set%26nbsp%3Band%20to%26nbsp%3Btrack%20changes%2Fvariances%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-105948%22%20slang%3D%22en-US%22%3ERe%3A%20Yammer%20data%20export%20-%20how%20to%20automate%20to%20run%20daily%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-105948%22%20slang%3D%22en-US%22%3ECan%20I%20ask%20what%20the%20purpose%20is%20of%20exporting%20the%20content%20on%20a%20daily%20basis%3F%3C%2FLINGO-BODY%3E
Occasional Contributor

Require assistance to script and schedule a Yammer data export (excluding attachments) to run daily, in an unzipped format. Also if its possible, to save the exported data directly into an Azure store (for Machine Learning processing).

 

Any suggestions, or methods already being used to achieve this?

 

Came across this information on the Yammer data export api:

https://developer.yammer.com/v1.0/docs/data-export-api

However I'm not a developer ie. Unsure how to correctly code, setup and execute something like this...

 

Thanks

8 Replies
Can I ask what the purpose is of exporting the content on a daily basis?

@Loryan Strant its a requirement from our machine learning lab...I believe they need to have the latest data set and to track changes/variances   

I run a powershell script.... scheduled to run every day. Make sure whereever you're hosting has access as well as Powershell Version 4 or newer (I use 5 currently). Check powershell version with $PSVersionTable.PSVersion.

 

Follow instructions on that site to get your token, then fill it in the bearer token below...

Use at your own risk. You need to build out error handling and logging. Also, directory checks for items that already exist/move items if you want to archive previous exports. GL.

 

$BearerToken = ''

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "Bearer $BearerToken")
$headers.Add("Accept",'*/*')
$headers.Add("accept-encoding", "zip")

#Base Directory where you want these files to be saved locally

$dir = ''
$currentfile = "$($dir)\current\messages.csv"

# You can use a relative date range for the export as well, by building out a date object

$export = "https://www.yammer.com/api/v1/export?since=2015-01-01T00:00:00&include=csv"

#Create logs for your files.

$log_file = "$($dir)\log\{0:yyyy-MM}_Export.log" -f (get-date)
#Example to add logs -- $logmsg = "This is my log"

# Add-content $log_file "$logmsg"

#Two lines inside the Try is actually where the attempts work. I found there to be issues so I put them in different areas for download, then download is complete, unzip.

 


Try
    {

     invoke-webrequest -uri $export -method get -headers $headers -OutFile $dir\export.zip  }

     Expand-archive -path $dir\export.zip  -dest $dir\current -f

Catch

{

#Error Handling goes here

}

It may be more cost effective and impactful for your organization in the long run to use a 3rd party tool designed to do this and much more. They've spent the time to learn how best to extract all the data possible from Yammer. For your specific use case, I'd highly recommend tyGraph. @Dean Swann

I'm not quite sure if you can extract any more information than the export provides. I built out a pretty robust dashboard in Tableau based off the export, which costs my organization $0 to maintain now as it's in an automated state. 

 

Yes, tygraph has more at the moment, but I can build out any of those dashboards in a day - but there's been no requirement for me to do so internally. The thing we lack most is the ability to view lurkers. (See people who just sign in to read messages) - As well as what they're viewing, but there's no API for that so I assume there's no solution that includes that.

 

 

Congrats on automating that! It's a shame you're not seeing the demand for those analytics that I see elsewhere. I'd suggest driving a conversation with management about their business goals for the platform: are they looking to drive more innovation? improve execution? When usage is driven by a business goal, there's much more interest in the data showing improvement toward that goal.

 

Yes, there's no API for thread "reads" but tyGraph has found a way to mine file views and downloads. They and others also analyze replies and mentions for a clearer picture of who the influencers are in your organization. Also, there was this announced today by the Yammer team at Ignite (note the "read" counts).

 

Group AnalyticsGroup Analytics

 

 

 

 

Yea, the read counts are already available in O365 admin analytics reporting board. You can download views per person and per thread, but you can't isolate who is viewing what. It's an aggregation graph you really can't do much with and there's still no API despite it's getting a read count somehow. I want to be able to report on what threads are getting the most views and the unique count of views etc to do analytics behind it.
You're actually getting views per person and per *group*, but you're right - there's no way to get read information at the thread level. We have one workaround for this. If you include a GIF in the original post, tyGraph has figured out how to get the number of "file views" on a file, which is incremented whenever someone views a GIF in a thread. Aside from that, I'd have a conversation with your stakeholders about using a different metric like replies or likes. It will certainly be a smaller number, but it's potentially a more potent measure of actual value of the thread.