Skip to main content

Hello, 

Just to preface, I am not a developer. I’ve been using a lot of Co-Pilot when working with Zapier and my knowledge of query languages/coding in general is pretty surface level.

I’m not sure if this post should be in “How Do I” or here.

Context: I am trying to create a workflow which automates Hubspot Contact & Company creation when a new Shopify company is created. So the general workflow looks like this: 


I am running into an error with the “Find Contact” Hubspot step. The error message is: Required field “First search property value” is missing. The Shopify “New Company” Trigger data is GraphQL and the data that I need to move into Hubspot is in these Edge Node fields. 

I have tried several different options w/ Co-Pilot and I just can’t get this error to be fixed. Eventually I landed with this where I use a webhook to request the New Company Data, then run JS to turn the data into strings to be usable by Hubspot steps. 

The problem is that I just keep getting empty strings input into the Find Contact Step. I don’t think any of the Company data is actually being extracted properly.
 



The JS works fine for any field that doesn’t have “Edge Node” in the name of the field. How would I go about properly and reliably extracting the Edge Node data and formatting the data into strings? 

Here’s what the webhook configuration looks like after a test run. All the other fields don’t have the yellow warning indicator. 


Thanks for y’alls help in advance, much appreciated.

Hi ​@KWSRO7 

As a different Zap logic approach, instead of Code, you may wan to use this Zap action: AI by Zapier - Analyze and Return Data

Concept is to provide the AI step with the inputs to use, then specify a main prompt (e.g. parse the data for the defined field values), and define the output variables you want. 

 

Zap step: HubSpot - Find Contact

Required fields expect values.

If a required field has no value when the Zap step runs, then it will throw an error.

 

FYI...if you are looking to hire help, there is a directory of Zapier Partners: https://zapier.com/partnerdirectory

 

 


Hey ​@KWSRO7,

I think it can be a bit more straightforward and you might not even require Webhooks or Code step. Are you using webhooks action to call the Shopify API?

For a bit of formatting, Formatter by Zapier is useful. See more about Formatter by Zapier here- https://help.zapier.com/hc/en-us/articles/8496212590093-Get-started-with-Formatter.

Also the yellow fields indicate that the New Company trigger is not receiving that data, try with more complete data. Either way if all the steps are necessary then you have to change the code in Code by Zapier action to ge your desired output. Hope it helps!

PS: If you need more active help, I’m happy to connect through my Zapier Solution Partner page if you’d like to reach out here- https://zapier.com/partnerdirectory/automation-jinn


Thanks for the suggestions, I tried these but it seems the issue is “New Company” Zapier trigger is pulling NO data from the company property. 

The only thing this step is actually pulling in when live is the GraphQL Admin API ID. Despite the tests populating the fields, when live nothing actually gets pulled in so the following step regardless of method receives no data from the New Company Trigger. 

Any ideas for why this is happening? Is there a special Shopify to Zapier API connection that is required to properly pass the GraphQL Edges Nodes data?


Hi there ​@KWSRO7 👋

Were you able to make any progress here? If not, does the missing company info appear in the Data Out for the Shopify trigger when running live but fail to be passed over to the other action steps?

If that’s the case, do the field names containing that information exactly match the name of the fields selected in the Zap? If they differ, then you could try using a recent Zap run as the test record for the Zap so you can map the fields that are available when the Zap runs live - see Select from previous Zap run for details on how to do that. 

Keep us posted on how you’re getting on, want to make sure this gets sorted!


Hi ​@SamB 

Thank you for the follow up. I had it working for about 2 days before it started hitting errors again. The workflow ran successfully several times then mid-day on the 9th it started erroring. Not exactly sure what happened here.

This set up below is what was working for a couple days until Thursday. I have the New Company Trigger which is all nested Edges Nodes data that needs to be extracted. I use the formatter with the “Extract Pattern” transform and the Input is “Admin Graphql Api id”. This input worked at first but seems to now be outputting false matched data. 

What confuses me here is that there is no field called “Graphql Admin Api id” in the New Company Trigger output during tests, but when live that is the name of the field/line item so I manually typed that into the Input box for step 2. Then I use the webhook to get all of the nested edges node data and pass it to hubspot from there.

Second image is the output for step 1 (this is in a failed run). Third image is where I think the error is actually occurring which caused the step 4 error as it has no valid input.

Any and all help is appreciated, thank you!

​​​​​​