How to Set Up API Connection Between Hubspot and Gorgias Using Specific Tags?

This topic was automatically generated from Slack. You can find the original thread here.

Hi! Is anyone familiar with how to set up the API connection between Hubspot and Gorgias? I have a target question within that setup that is around whether you can use a specific tag in Gorgias to create the trigger. Ideally, we’re not pulling every customer outreach into HubSpot but specific ones with specific tags if that makes sense. Appreciate the help!

Yea, sounds like you need to do some filtering of the events before you send data to HubSpot, is that right?

Exactly! Talked to pipedrive and they said they don’t have the functionality but shared the code to do the filtering

I can’t quite get it to work yet but we’ll see…

Which Gorgias trigger are you using, and what data are you trying to filer out?

Screenshot 2024-09-26 at 2.42.27 PM.png

Basically I’m trying to pull out chats in Gorgias tied to specific tags. We have two parts of our business bridal and fine jewelry so we want to tease out tickets to our customer service team the are directed to bridal specifically.

Those outreaches will be turned into leads - where as every single person writing into gorgias for customers service support is not helpful

Got it, so tickets that are created in Gorgias have tags on them, and for the purpose of this workflow, you only care about specific tags, like BESPOKE and Engagement Ring, and you want to ignore everything else?

Is that right?

Right!

Okay cool, so there are a few ways you can do this —

  1. Use a code step like you’re doing, and do something like this:
const tags = this.eventTags
const filterTags = this.filterTags

const present = tags.filter(item => filterTags.includes(item));

if (!present) {
  return $.flow.exit('Ignoring these tags')
} 
  1. Use the prebuilt Filter action (you might need to do this in 2 steps, since you need to check for multiple values), but check out the screenshot
  2. Another option is for us to add Tags as a prop on that Gorgias trigger, so you can specify which tags you care about there, and filter out all the rest, so that your trigger only emits events that match that criteria.

In 1 and 2, you’ll get charged credits for all the events you don’t care about, since the workflow is still running. In 3, you won’t, since the trigger wouldn’t emit any event for any new tickets without the tags you care about. This seems like a pretty common use case and a logical improvement for that trigger, so it probably makes sense for us to make that change for everyone.

Let me know if that all makes sense

This is super helpful, Danny!

Okay so 1 and 2 are exactly what I’m trying to do… but completely agree with you assessement (and I didn’t realize) that we’d be paying for credits on the time’s the tickets are matching the tags and since it’s hooked up to gorgias where we get tens of thousands of messages over the year, it’s just very unecessary based on the smaller subset use case we’re talking about.

How long would it take for you guys to do option 3?

Oh actually I see someone just requested that functionality yesterday — did that happen to come from you? [FEATURE] Gorgias: New Ticket source - Add Tags prop for filtering tags · Issue #14108 · PipedreamHQ/pipedream · GitHub

It’s on the team’s board, it should get done pretty quickly

It did!! That was me :slightly_smiling_face:

What does pretty quickly mean? Like should I keep trying to mess around a build this or really we need to just wait? Like 2 weeks?