Publishing Localized Item in collection (API via Zapier)

Hi Everyone,

I tried to publish an item in my secondary locale via Zapier (Webflow API Request Integration). The problem is that the version 1 of the API doesn’t support the field “cmsLocaleId”:

The request works well when I take out the “cmsLocaleId” line but returns a 400 when it’s in it.
Any advice will be highly appreciated. Thanks!!

Headers:
-accept-version :1.0.0
-content-typpwe: application/json

Payload:
{
“fields”:{
“name”:“Mi primer Post via API”,
“slug”:“my-first-blog-post-via-api”,
“cmsLocaleId”:{cmsLocaleId},
“_archived”: false,
“_draft”: false
}
}

I don’t believe the v1 API has any form of localization support.
Have you tried the v2 API?

Likely you’ll need to make a direct API call from Zapier rather than use the pre-built Webflow adapter.

1 Like

Hey Fredi,

I also ran into the same issue with content from instagram only showing in the primary locale… I think Michael is correct, Zapier and Make.com are still using the old API v1 which doesn’t support adding content to all locales as far as I’m aware…

I managed to resolve it with the following payload:

{
  "isArchived": false,
  "isDraft": false,
  "fieldData": {
    "name": "New Post",
    "slug": "new-post",
    "post-url": "https://www.instagram.com/p/postID/",
    "post-image": {
      "fileId": "665713dcce01d06df4ab0367",
      "url": "https://uploads-ssl.webflow.com/659d70c4320ef402d818c38d_n.jpeg",
      "alt": null
    }
  },
  "items": [
    {
      "id": "65df88b3d9706dfafead9118",
      "cmsLocaleId": "65e8846938445bda8ba44a48",
      "lastPublished": null,
      "lastUpdated": "2024-02-28T19:25:39.942Z",
      "createdOn": "2024-02-28T19:25:39.942Z",
      "isArchived": false,
      "isDraft": false,
      "fieldData": {
        "name": "My New Item",
        "slug": "my-new-item"
      }
    },
    {
      "id": "65df88b3d9706dfafead9118",
      "cmsLocaleId": "65e8846938445bda8ba44a4a",
      "lastPublished": null,
      "lastUpdated": "2024-02-28T19:25:39.942Z",
      "createdOn": "2024-02-28T19:25:39.942Z",
      "isArchived": false,
      "isDraft": false,
      "fieldData": {
        "name": "My New Item",
        "slug": "my-new-item"
      }
    },
{
      "id": "65df88b3d9706dfafead9118",
      "cmsLocaleId": "65e8846938445bda8ba44a46",
      "lastPublished": null,
      "lastUpdated": "2024-02-28T19:25:39.942Z",
      "createdOn": "2024-02-28T19:25:39.942Z",
      "isArchived": false,
      "isDraft": false,
      "fieldData": {
        "name": "My New Item",
        "slug": "my-new-item"
      }
    }
  ],
  "cmsLocaleIds": [
    "65e8846938445bda8ba44b48",
    "65e8846938445bda8ba44b4a",
    "65e8846938445bda8ba44b46"
  ]
}

I basically used these docs to craft my API call and then updated the schema to match my CMS layout (some values are updated to protect my clients identity).

Interestingly the fieldData in the items array is essential but doesn’t seem to do anything visible when added to the Webflow CMS, same with information about publishing. Because it was working I didn’t bother streamlining it but you could play around with omitting fields or setting them to null just in case it causes anything strange on your end!

I actually built this in make.com so if you’re familiar with that I can share a blueprint?

1 Like