Skip to main content
Answered

Count of Conversations with a tag + Zapier Use

  • July 13, 2022
  • 1 reply
  • 32 views

Forum|alt.badge.img+1
  • Active User
  • 37 replies

Hi there! I'm a noob when it comes to API stuff, so just still trying to figure it all out.

I'm attempting to setup a Zapier hook to pull a total number of conversations with a particular tag on them. Wondering if this is possible?

 

I can see by this https://developers.intercom.com/intercom-api-reference/reference/conversation-counts I'm able to get the total count of conversations, but it doesn't specify if I'm able to also add a filter by tag.

 

For some context that may or not be helpful, for customers that are affected by a bug we'll assign them the relevant bug tag. We can filter by this in reports, but if I can do it as an API call then I can get it into our Notion page which would be super handy.

 

Finally, (and very optionally since it's probably not that related to Intercom lol) any basic advice on how I could implement an API call into Zapier? I tried to set one up and got a bit befuddled when it wanted tokens and auth stuff that I wasn't very familiar with.

Perhaps just some advice on what I need authentication wise to make API calls would be handy! 🙂

 

 

Edit: I've since figured out how to send the request, but its returning data at 0.

 

I've made a POST request to https://api.intercom.io/conversations/searchand my code is:

 

{
 
"query": {
 
"field": "tag_ids",
 
"operator": "~",
 
"value": "AC-379"
 
}
 
}

 

 

The value is definitely a tag that exists with open conversations, and I've tried to change the operator to a few different things but all it's returning is:

 

type
conversation.list
pages
type
pages
page
1
per_page
150
total_pages
0
total_count
0
conversations

In summary I'm trying to get the totalcount of conversations that contain tag AC379

Best answer by Zak

I've since figured out the issue, and it's kind of annoying.

 

I cannot search by the 'name' of the tag, I have to search by the ID of the tag, information I cannot actually get unless I first do an API call.

 

This works:

 

{
"query": {
"field": "tag_ids",
"operator": "IN",
"value": ["5537509"]
}
}

The value in this case translates to a tag called 'Username Change', which I only found the value of by doing another general search into conversations.

 

I've been using this page https://developers.intercom.com/intercom-api-reference/reference/search-for-conversationsas a reference point, and notice that in one of the examples on the right it shows 'tags' as a variable that's useable, but it's actually not.

 

image.png 

Can this please be updated in some way so that I can actually filter via the tag, or at the very least have it possible to view what the ID of each tag is easily?

View original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+1
  • Author
  • Active User
  • 37 replies
  • Answer
  • July 13, 2022

I've since figured out the issue, and it's kind of annoying.

 

I cannot search by the 'name' of the tag, I have to search by the ID of the tag, information I cannot actually get unless I first do an API call.

 

This works:

 

{
"query": {
"field": "tag_ids",
"operator": "IN",
"value": ["5537509"]
}
}

The value in this case translates to a tag called 'Username Change', which I only found the value of by doing another general search into conversations.

 

I've been using this page https://developers.intercom.com/intercom-api-reference/reference/search-for-conversationsas a reference point, and notice that in one of the examples on the right it shows 'tags' as a variable that's useable, but it's actually not.

 

image.png 

Can this please be updated in some way so that I can actually filter via the tag, or at the very least have it possible to view what the ID of each tag is easily?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings