APIs & Integrations

Yel-o
Contributor

Multiple Filter - Task Type and Team ID

SOLVE

I'm looking to grab a list of LinkedIn tasks that are under "hs_task_type" specifically, "LINKED_IN",  "LINKED_IN_CONNECT" or  "LINKED_IN_MESSAGE" I'm using the SEARCH endpoint and when I tried to use the IN operator, it doesn't seem to work so what I did is create multiple filters within a filterGroup to create an OR logic. On top of this, I need to filter only tasks that have been assigned to a specific "hubspot_team_id" So I have to do: (A OR B OR C) AND D but it doesn't seem possible. Does anyone have other suggestions?

So far, it looks like this to create the OR logic just for the hs_task_type

 

{"filterGroups": 
    [
        {
                "filters":[
                {
                    "propertyName":"hs_task_type",
                    "operator":"EQ",
                    "value":"LINKED_IN"
                }
            ],
            "filters":[
                {
                    "propertyName":"hs_task_type",
                    "operator":"EQ",
                    "value":"LINKED_IN_CONNECT"
                }
            ],
            "filters":[
                {
                    "propertyName":"hs_task_type",
                    "operator":"EQ",
                    "value":"LINKED_IN_MESSAGE"
                }
            ]
        }
    ]}

 

 

 

0 Upvotes
1 Accepted solution
skimura
Solution
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

Multiple Filter - Task Type and Team ID

SOLVE

@Yel-o 

Hi.

 

> I tried to use the IN operator, it doesn't seem to work

 

Could you please tell me the request parameters at this?

Did the following "parameter" also not work?

"filters":[
    {
        "propertyName":"hs_task_type",
        "operator":"IN",
        // NOT "value"
        "values": [
            "LINKED_IN",
            "LINKED_IN_CONNECT",
            "LINKED_IN_MESSAGE"
        ]
    }
]

 

Thanks.

View solution in original post

0 Upvotes
1 Reply 1
skimura
Solution
Top Contributor | Platinum Partner
Top Contributor | Platinum Partner

Multiple Filter - Task Type and Team ID

SOLVE

@Yel-o 

Hi.

 

> I tried to use the IN operator, it doesn't seem to work

 

Could you please tell me the request parameters at this?

Did the following "parameter" also not work?

"filters":[
    {
        "propertyName":"hs_task_type",
        "operator":"IN",
        // NOT "value"
        "values": [
            "LINKED_IN",
            "LINKED_IN_CONNECT",
            "LINKED_IN_MESSAGE"
        ]
    }
]

 

Thanks.

0 Upvotes