Skip to main content

I am trying to use Webhooks to pass data multi-reference field data from Google Sheets to Webflow.

I’ve follow tutorials and checked other people with the issue and it looks like I have everything configured properly, but I’m still getting an error.  

  • Data Pass-Through = False
  • Multi-reference fields IDs in quotes
  • Collection and Item IDs set properly

Can anyone help?

 

 

This is the error

 

Hi @Brian16 

Status code 400 is indicating that your JSON formatted code isn’t valid, try checking your JSON (in the data field) with https://jsonlint.com to verify whether you are sending proper JSON value. You can try sending static values by removing the google sheet mappings from the API step and hardcode the data and see if that works.


Thanks @robschmidt.  What’s strange is I got this working but then it broke.

When I test on Webflow’s Patch Collection API tool it works for patching a single item to the skills-tags field, but with multiple item IDs it breaks.  Again very strange/frustrating because I had it working yesterday. 

 

This is the format:

NOT WORKING:
curl --request PATCH \

     --url 'https://api.webflow.com/collections/oCOLLECTION IT]/items/ ITEM ID]?live=true' \

     --header 'accept: application/json' \

     --header 'authorization: Bearer rAPI KEY]' \

     --header 'content-type: application/json' \

     --data '

{

  "fields": {

    "slug": "mem_cljr4ok012woi0shqfnc0fh8d",

    "name": ",EMAIL]",

    "_archived": false,

    "_draft": false,

    "skill-tags": "\"64a6bb15a257876f2a611c46\",\"64a6bb177172a75c4b1fc6b9\""

  }

}

'

WORKING:

curl --request PATCH \

     --url 'https://api.webflow.com/collections/ COLLECTION IT]/items/cITEM ID]?live=true' \

     --header 'accept: application/json' \

     --header 'authorization: Bearer rAPI KEY]' \

     --header 'content-type: application/json' \

     --data '

{

  "fields": {

    "slug": "mem_cljr4ok012woi0shqfnc0fh8d",

    "name": "_EMAIL]",

    "_archived": false,

    "_draft": false,

    "skill-tags": "64a6bb15a257876f2a611c46"

  }

}

'


Hi @Brian16 

 

There are double quotes at the start and end of the values.

 


@Troy Tessalone thanks.  Sadly that doesnt seem to be the problem.

I added quotes around each value when passing in multiple.  That is what every tutorial says to do for multi-reference fields and then the API adds those additional quotes automatically.

These are the values I pass in for the skill-tags field:
"64a6bb15a257876f2a611c46","64a6bb177172a75c4b1fc6b9"

Then the curl output is:
"skill-tags": "\"64a6bb15a257876f2a611c46\",\"64a6bb177172a75c4b1fc6b9\""

Each skill tag ID works if I add it individually on the with no quotes on the Webflow Patch Collection tool so it does definitely feel like its a formatting issue though.

 

When I remove all quotes I get this curl output:
"skill-tags": "64a6bb15a257876f2a611c46,64a6bb177172a75c4b1fc6b9"

And this error:
"msg": "Validation Failure",

  "code": 400,

  "name": "ValidationError",

  "path": "/collections/64624924d0bad2ab82df04ac/items/64a6ba177172a75c4b1e9a7c",

  "err": "ValidationError: Validation Failure",

  "problems": "

    "Field '---': Invalid argument provided: Not an id: null"

  ],


@Brian16 

Have you tried this?

skill-tags looks to be a custom field.

What type of field is “skill-tags”?

If it’s an array, then try formatting the data like this:

"skill-tags": t"64a6bb15a257876f2a611c46","64a6bb177172a75c4b1fc6b9"]

 

 


@Troy Tessalone it is an array (multi-reference field in Webflow). 

 

When I add brackets to the interface (the screenshot you have above) I get the same error.

 

 


@Brian16 

Have you tried testing it outside in the Zap as recommended?

Looks like the Webflow CMS API Explorer auto formats the data.


@Troy Tessalone  The Zap is formatted like this, with the brackets outside:



 


@Brian16 

These fields are required as part of the supplied data:

  • slug
  • name
  • _archived
  • _draft

 

 

 


I am passing those fields @Troy Tessalone

 

And it is working for single items, so I dont think that’s the issue, but could be wrong.


@Brian16 

In the Zap, I don’t see those other fields, only skill-tags.

 


@Troy Tessalone - all the tutorials say to only include what I have included. 

 

I’m not sure how to add those fields to the payload, but I’ll try to figure that out.

 

I dont think that’s the issue though because when I use the Webflow tool that does have those fields it gets the same error:

 

 


@Brian16 

Which tutorials are you referring to? (links)


@Brian16 

It looks like the Webflow tool treats every custom field as a string, which may not be the correct way to format the JSON data.

 


@Troy Tessalone here is one, but I’ve watched a few of them.

 


@Troy Tessalone and this Zap was working yesterday.  Here is an example of a successful run:

 


Doing some testing and when I hardcode in multiple skill IDs like this it works

 

 

But when I replace this with a field form the spreadsheet which these values were copied from it fails
 

 


I think I found the issue.  One of these skills itself was deleted from Webflow.  Fun 5 hours wasted :)

 

Thank you so much for the help @Troy Tessalone 


@Brian16 

I was able to get it working.

Try these Headers and capitalize the same.

Make sure you are testing with skill-tag values that are valid.