Microsoft Power Automate - Search Company

I am trying to figure out how to use the Search Company API and getting an odd error.

ResponseSwaggerSchemaValidationFailure. The API ‘hubspotcrmv2’ returned an invalid response for workflow operation ‘Search_companies’ of type ‘OpenApiConnection’. Error details: ‘The API operation ‘Post-_crm_v3_objects_companies_search’ requires the property ‘body/total’ to be of type ‘String’ but is of type ‘Integer’.’

I am doing a simple search on a custom contact number we track:

{

“filters”: [

{

“operator”: “EQ”,

“propertyName”: “MyCompanyID”,

“value”: “877”

}

]

}

My connector is working, I am using another action to pull all Companies just fine… but I want to speed things up and just pull what I need.

Hey, @NThoman Does your query work when you test outside of Power Automate with something like Postman? I found threads for similar errors on the Power Automate forums, but not a direct solution.

We’ll leave this here in case other community members have experience.

Best,

Jaycee

I ended up having to use the HTTP request action. It turns out the Hubspot API is sending the value “Total” as an Int but the MS Action has it Mapped to a string. Who ever built that connector will need to update it for the search action to function correctly.

Thank you for letting us know! — Jaycee

Has this been resolved. I tried using the Search for contacts connector (Power Automate).
Still getting the same error

Hey @naijacoder and welcome, we are so glad to have you here!

Thanks for reaching out! Just for your information, I haven’t come across a recent and similar issue internally so far.

Did you try the solution from @NThoman yet? If this doesn’t work, it might be something to do with the connector’s schema. If that is the case, I recommend reaching out to Microsoft Power Automate support or checking the Power Automate connector documentation for more detailed guidance. They’ll be happy to help you out!

For reference, here are the HubSpot documentation that might help:

Let’s invite our Top Experts to this discussion: Hi @Anton, @sylvain_tirreau and @zach_threadint do you have suggestions to help @naijacoder, please?

Have a lovely day and thanks so much! :orange_heart:
Bérangère

This post was created with the assistance of AI tools