Reverse ETL from Redshift to Hubspot: Contacts ar...
# support
e
Reverse ETL from Redshift to Hubspot: Contacts are sent to Hubspot as batch create requests, with multiple contact specified. However, if one fails (commonly get 409 Contact already exists), all the others in the request are not synced 😱 Misconfiguration on my end? "Upsert" not working? Lack of redundancy in the sync? Help please!
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
Hi Trevor that should not be the case. For example in the shift started on 2024-01-08T143001+05:30, there were 559 deltas of which 9 failed and the rest were successful. Why did you feel that if one event fails, the other events in the sync are not sent?
e
I am referring to syncs with 409 errors such as the one on 2024-01-06T130007-08:00. In the sample error offered by Rudderstack, I get:
Copy code
{
  "response": "{\"status\":\"error\",\"message\":\"Contact already exists. Existing ID: 3494501\",\"correlationId\":\"88da2616-304e-424c-83d0-978098311afb\",\"category\":\"CONFLICT\"}",
  "firstAttemptedAt": "2024-01-06T21:01:21.390Z",
  "content-type": "application/json;charset=utf-8"
}
In such a request that returns a 409, the other users in this request's batch are not added to Hubspot. This is confirmed by looking at my Hubspot API logs. Often when there's a 409, the other records that should have been created by that request's batch cannot be located in Hubspot. I can provide the specific Request data I have from hubspot's logs or a request ID from the header if needed.
m
Actually if you can provide a specific case where you are seeing this I can take it to the team. That would be helpful.
e
Do you just need a certain request ID or something?
I have a theory as to what might be happening as I've seen this more than once now. Very commonly, I get the 409's for users that have multiple email addresses in hubspot. For example, the contact ID I pasted above corresponds with this contact in our CRM, who has multiple emails on their profile. I suggest that whatever mechanism you might be using to decide who gets updated rather than created, does not consider secondary or multiple emails.
The specific sync this case is from, is the one at 2024-01-04T130002-08:00
Request with headers
Copy code
{
  "User-Agent": [
    "RudderLabs"
  ],
  "CDN-Loop": [
    "cloudflare; subreqs=1"
  ],
  "Accept-Encoding": [
    "gzip"
  ],
  "CF-Connecting-IP": [
    "23.20.96.9"
  ],
  "True-Client-IP": [
    "23.20.96.9"
  ],
  "X-HubSpot-Trace": [
    "a56e641eb939a4938c2c516a11657eec"
  ],
  "Authorization": [
    "Bearer pat-na******"
  ],
  "X-HubSpot-Correlation-Id": [
    "48857e68-4406-4baf-a870-a5245eafe4f2"
  ],
  "x-envoy-external-address": [
    "172.16.10.49"
  ],
  "X-HS-Internal-Request": [
    "1"
  ],
  "Content-Length": [
    "6944"
  ],
  "X-Real-IP": [
    "23.20.96.9"
  ],
  "Content-Type": [
    "application/json"
  ],
  "x-request-id": [
    "48857e68-4406-4baf-a870-a5245eafe4f2"
  ],
  "cf-worker": [
    "hubapi.com"
  ],
  "CF-Ray": [
    "84066ad07765059b-IAD"
  ],
  "CF-IPCountry": [
    "US"
  ],
  "X-Forwarded-Proto": [
    "https"
  ],
  "Connection": [
    "close"
  ],
  "X-Request-Start": [
    "1704402091.601"
  ],
  "X-HS-Internal-User-Request": [
    "0"
  ],
  "Host": [
    "api.hubapi.com"
  ],
  "CF-Visitor": [
    "{\"scheme\":\"https\"}"
  ],
  "X-HS-User-Request": [
    "0"
  ],
  "CF-EW-Via": [
    "15"
  ],
  "X-Forwarded-Port": [
    "443"
  ],
  "X-Amzn-Trace-Id": [
    "Root=1-65971cab-37335565348063376bd2eecb"
  ],
  "X-Forwarded-For": [
    "23.20.96.9, 172.71.190.102,172.16.10.49, 23.20.96.9"
  ],
  "x-envoy-expected-rq-timeout-ms": [
    "60000"
  ],
  "X-Scheme": [
    "https"
  ]
}
m
Actually a screen recording of this would be helpful. I am unable to understand how the multiple email ids ties into this.
e
Sent in a DM to @silly-kitchen-30880
Was that sufficient to understand the issue and share with the team if needed?
m
Yes. Thanks. I am having a discussion today with the team to go over the issue and will provide an update soon.
s
cc @microscopic-gpu-51660
e
Thank you!
m
Still working with the team on this.
e
Thanks for the update, I was considering following-up. Good luck 👀
m
FYI This may take some time to fix, since the team is still figuring it out.
e
Understood
Hello @shy-kite-21035, any updates on this one?
s
Will update you by tomorrow.
✅ 1
m
Sorry, team mentioned they will provide an update on Monday.
✅ 1
e
Hey @shy-kite-21035, any updates for me 🙂
m
So the team mentioned that we are doing a lookup for the create/update flow in Hubspot , but are not able to get these other emails. Can you confirm that the emails are searchable fields in your Hubspot. The team also mentioned that they are using this search API for lookup. The team also offered to setup a call with you to debug further.
e
Did a little googling and it seems we are not the first to experience this issue. Could you have them try the solution here? It seems identical. https://community.hubspot.com/t5/APIs-Integrations/Search-Contacts-for-Secondary-Mail/td-p/358756
m
I have shared with the team
e
Thanks @shy-kite-21035 - keeping this on your radar, any idea if this is looking like a possible solution?
m
Sure