Yammer tag: id not matching topic ID or name

New Contributor

I am using the Yammer export api to build Power Bi reports. Within the last few months MSFT made a change to remove the tag name from the inline tags in the body of messages. We can no longer reference these as we are using the tag names.

 

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

 

I have attached the old and new format images. What is the workaround now to use these tags in a report for a popularity trend?

OLD

NEWOldFormat.jpg

NewFormat.jpg

2 Replies
Hi Christian,

Did you find a way to link the messages to topics then? The Export topics.csv contains totally different IDs...

Hi @Christian Luce, I found a way around this. Hold on.

What we know

The Yammer network Export ZIP file contains both messages.csv and topics.csv.

The messages.csv contains [[tag:<tag_id>]] entries inline in the messages.

These IDs do not match with the IDs in the topics.csv file.

There is no apparent relation between the IDs in the messages.csv [[tag:<tag_id>}} entries and the topics.csv "id" column.

An automated workaround

I've tried many endpoints like /topics, /messages/about_topic, ... They either don't work or don't return anything.

In the end I resorted to using the /search.json?query=tag_name.

The tag names can be found in the topics.csv file. Just iterate over them and ask the search api. The search api will return something like this:

{  count: { messages: 8, groups: 0, topics: 1, ... },
  messages: {}
    ...
topics: [
    {
type: "topic",
id: 657247,
name: "topic_name"
    }
  ]
}

Don't be fooled, this ID is the ID from the topics.csv and hence useless.

BUT, when we look at the messages object in the search results, we get a "references" member that shows:

references: [
{
type: "tag",
id: 54527877,
name: "tag_name"
}
]

 That ID is the ID that is found in the messages!

 

Agreed, this is a tedious workaround, having to call the search API for each and every tag in topics.csv, but at least this way you can link messages with topics.

 

Hope this helps anyone - will create a more elaborate blogpost about this sometime soon.