HubsSpot ADF connector v2 error

Hello everyone,

I’m trying to use HubSpot v2.0 (Preview) connector in Azure Data Factory. I’m using a Lookup activity in ADF to read from the CRM.Objects.Deals table in HubSpot. I can see the data just fine when I click the “Preview data” button (including deals with empty “amount”). I can also retrieve 1 deal successfully when I select the “First row only” option in the Lookup activity (also with empty “amount” value). However, when I try to retrieve all the deals (not just the first row), I get the following error:

Failure happened on ‘Source’ side.
Type=System.InvalidCastException,
Message=Value ‘’ for column ‘amount’ cannot be converted to Double.,
Source=Microsoft.DI.Driver.HubSpot

Does anyone know what might be causing this?

Thanks!

Hi @FNK
Thank you for reaching out to the Community!
I’d like to invite some community members who are subject matter experts to join this conversation.
@GiantFocal @IMakkar @SteveHTM - Would you be able to share any insights on this? Your expertise would be greatly appreciated.
Best,
Victor

Thanks @Victor_Becerra for looping in the experts.

@GiantFocal @IMakkar @SteveHTM would be super grateful if you guys can share some insights here.

Hi @ISmolin — just checking back in, any luck with this issue since your last update?

I’m looping in some other community members for additional expertise, as it seems this is still unresolved. @RubenBurdin @johnelmer @evaldas , you’ve shared some really helpful guidance around similar issues before — would love your insights here.

Any additional tips or workarounds from you would also be much appreciated.

Thank you,
Victor

Hi @Victor_Becerra, the thing is that the usage of URL tracking links makes sense only if the contact before was “introduced” to our website, meaning exchanged smth (email) with smth from us, e.g., filled data using the website contact form, downloaded an ebook and filled in contact data, booked a call using a meetings link. If that happened prior to the usage of the URL tracking link or any other links (in sequences), we will see who clicked the link and which link (of course, the code should be embedded, etc.). Otherwise, it doesn’t really matter. Marketing emails like Newsletters - yes, we will see who and what link clicked, but in sequences, no way, even using a URL tracking link (especially if you have 2 links in 1 sequence email, e.g., some link to the tool (demo) and a booking link. Just clicks will be visible, not a precise click to this or that link.

The purpose of the URL tracking link is different, as it was explained to me by HS support - it is a vehicle to see from where the traffic came using utm source, but not the tool to see who exactly, when, and which link was clicked = that’s why you see just overall number of sessions but not people who did it eventhough you have them as contatcs in CRM - to see marketing emails level of data - those contatcs prior to clicking any links you sent should be “introduced” to your website.

I ran into this same issue. I cannot copy deal data from Hubspot into ADF because the amount is type Double and cannot be edited in the schema mapping or as a source in the dataflow. Does rolling back to the version 1 connect work?

Hi @PBlatchley,
Thank you for posting to the Community!
I’d love to check with our Top Contributors here.
Hi @GiantFocal, @johnelmer, and @RubenBurdin have any of you successfully worked with HubSpot v2.0 (Preview) connector in Azure Data Factory? If so, do you have any insight on @PBlatchley’s question?
Thank you!
Cassie, Community Manager

Hey @FNK and @ISmolin ,

I’ve been checking the documentation and found that this is a known issue with the HubSpot ADF v2.0 (Preview) connector. The error happens because numeric fields like amount sometimes come back as empty strings. ADF can’t convert those to Double, which triggers the InvalidCastException.

A common workaround is to use a Derived Column transformation in a Data Flow to handle empty/null values before loading:

iif(isNull(amount) || amount == ‘’, null(), toDouble(amount))

This converts valid numbers to Double and sets empty strings to null. Make sure your target table allows nulls for these columns.

HubSpot connector version 2.0 is now generally available (GA). Version 2.0 should be used for HubSpot connections in Azure Data Factory.

Hope it helps!—Victor

Moderator Note: this post was reviewed for relevancy and optimized for clarity on September 30, 2026. Thank you for your contributions to the HubSpot Community!

Hi @Victor_Becerra, thanks for getting back and for outlining the root cause and workaround.

As far as I know from the documentation, the HubSpot v2 (Preview) connector does not support being used as a Data Flow source in ADF. That’s why we weren’t able to apply the iif(isNull(amount) …) transformation you suggested. If I’m missing something and there is a way to use this connector within a Data Flow source, could you please clarify?

Otherwise, is there any alternative solution you’d recommend that works directly within the Copy activity?

Thanks again for your help!

Hi @FNK,

Thank you for your thorough follow-up and for clarifying the limitations with the current HubSpot v2 (Preview) connector in Azure Data Factory.
You are correct that, as of now, the connector does not support being used as a Data Flow source, so the Derived Column workaround previously suggested isn’t directly applicable in this case.

For scenarios where you can only use the Copy activity, a possible workaround is to use an intermediate step where you pre-process the data before ingestion (such as with an Azure Function or Logic App that converts empty string values in numeric fields, like ‘amount’, to null or zero).
You could maybe try this and see if it allows ADF to handle the data type conversion successfully during the copy process.
Also, please feel free to submit the HubSpot Developer Feedback form or I can submit it for you if you’d like.

In the meantime, I understand that you’d like to know why you get a “System.InvalidCastException: Value ‘’ for column ‘amount’ cannot be converted to Double” error when using the HubSpot v2 ADF connector to retrieve all deals, but not when previewing data or retrieving only the first row. Please let me know if that’s not the case.
I’d love to check with our Top Experts: Hi @sylvain_tirreau, @Anton and @RubenBurdin have you successfully worked around this limitation within Copy activity? If yes, please feel free to share your approaches with @FNK. Also, can you think of other workarounds to help @FNK, please?

Have a great day and thanks so much!

Bérangère

Hi @BérangèreL, thank you for the detailed follow-up and for looping in the experts.

Just to confirm your understanding, yes, the error (System.InvalidCastException: Value ‘’ for column ‘amount’ cannot be converted to Double) happens consistently when retrieving all deals, but not when previewing data or fetching only the first row.

Regarding the suggested workaround of using an intermediate pre-processing layer (Azure Function/Logic App): while this might technically work, it feels like it undermines the purpose of having a native connector in ADF, which is meant to simplify ingestion without needing custom pipelines outside of ADF. What we’d really hope for is a fix at the connector level.

Could you confirm if this issue is already on the roadmap, or if Microsoft/HubSpot engineering is actively working on a fix?

Thanks again for your support!

Hi @FNK, I hope that you are well!
To reply to your question, at this time, our team does not have direct insight into any official roadmaps regarding collaboration between HubSpot and Microsoft/Azure.

However, you may find this documentation helpful for integrating HubSpot with Azure Data Factory.
Thanks and have a lovely day!
Bérangère