This repository was archived by the owner on Feb 19, 2026. It is now read-only.
Open
Conversation
Author
|
@yakkomajuri Are you able to take a look at this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the ability for users to define fields that should only be passed to Hubspot when creating a new contact. This will prevent overriding of the specified fields if the identified person in Posthog already exists in Hubspot.
Within Hubspot it is possible to restrict field editing access to teams and users but those restrictions do not apply to API keys: https://knowledge.hubspot.com/account/restrict-edit-access-for-properties
Like the
additionalPropertyMappingsconfig property, users can pass the fields tocreateOnlyPropertiesthey would like to restrict from updating using a comma separated list of Hubspot property names. If the plugin is unable to create a new contact when the contact already exists, it loops through the all of thecreateOnlyPropertiesand deletes them fromhubspotFilteredPropsbefore making the PATCH request to the existing contact.An example problem this solves:
Hubspot contacts can either be created manually by sales reps or automatically via the Posthog integration to a webapp. When created manually, the sales reps add the value of
[sales rep name]to asourceproperty in Hubspot. If created automatically via the webapp, the value of thesourceproperty is set to[web app name]. If a contact that was manually added to Hubspot signs up for the webapp, thesourcefield of the contact will no longer be updated to[web app name].