Skip to main content

Automatically registering articles to webflow through zapier was successful.

The final goal is to register automatically inserting webflow item ID values ​​into the values ​​of nations, delivery to, and tags by using webhooks.

 

I set “webhooks’ by Zapier” for webflow article updating of some categories and tags, like follows 

 

But it keeps giving 400 error result.

Here’s the code of Patch Cellection Item. 

======================================================

curl --request PATCH \
     --url 'https://api.webflow.com/collections/644a05e4541e00d991d58265/items/644a3f1d58f9feb29bec0226?live=true' \
     --header 'Accept-Version: 1.0.0' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer 9bfd5213xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
     --header 'content-type: application/json' \
     --data '
{
  "fields": {
    "slug": "celestial-charm-necklace-moon-star-pendant",
    "name": "Celestial Charm Necklace with Moon and Star Pendant",
    "_archived": false,
    "_draft": false,
    "nations": "644a05e4541e0056a3d582c5",
    "delivery to": "644a05e4541e004223d582ab",
    "tags": y"644a3cf6a5e66b3c2c0073ee", "644a3c7eb924cc3deea60df8", "644a3bf04c36a620c060ebec", "644a05e4541e009ee2d582af"]
  }
}
 

======================================================

There seems to be nothing wrong with json data validation in this website https://jsonlint.com/

 

  1. I'm currently suing the free plan, but Zapier's webhook is permium service, so I don't know whether I can't even it or not becuase of using free plan. 
  1. Could you teach me which one is correct between 401 error and 400 error?
  1. Is the Bearer api key what I entered correct?
  1. In the Patch Collection Item api document, "slug, name, _archived, _draft" are required in the json data format. But, Is it okay to delete them?
  1. Anyway, I would really appreciate it if you could tell me what is the solution to this error… TT

Thanks to you guys, it worked out well^^ 

It was confirmed that it was not an api problem, but a json data problem in the body, and it was resolved.

Strangely, only tags data was successful, so other nations and deliveryto fields were resolved by entering the webflow item id without using a webhook.

Have a good day eveybody:)😄😄


Reply