Single/Multiref Error on Sheets <> Webflow flow (via API Export)

Hey all,

I’m getting the following error in Parabola when trying to map a value from my Google Sheet to the Webflow API.

{
    "code": 400,
    "err": "ValidationError: Validation Failure",
    "extensions": {
      "input": {
        "collection_id": {
          "_bsontype": "ObjectID",
          "id": {
            "0": 94,
            "1": 130,
            "2": 114,
            "3": 251,
            "4": 210,
            "5": 65,
            "6": 46,
            "7": 1,
            "8": 185,
            "9": 206,
            "10": 111,
            "11": 76
          }
        },
        "isPatchMode": false,
        "isSilentMode": false,
        "item_id": null,
        "mode": "staging",
        "need_collections": false,
        "need_live": false,
        "need_staging": true,
        "need_staging_draft": false,
        "skipInvalidFiles": false,
        "target": "staging"
      },
      "meta": {
        "authType": "oauth_user",
        "userId": {
          "_bsontype": "ObjectID",
          "id": {
            "0": 89,
            "1": 127,
            "2": 150,
            "3": 53,
            "4": 186,
            "5": 219,
            "6": 12,
            "7": 0,
            "8": 1,
            "9": 147,
            "10": 232,
            "11": 199
          }
        }
      }
    },
    "msg": "Validation Failure",
    "name": "ValidationError",
    "path": "/collections/XXXXXXXXXXXXXXXXXXXXX/items",
    "problem_data": [
      {
        "msg": "Referenced item not found",
        "slug": "order-options",
        "value": "'\"5e82889db3257822cffa74db\"'"
      },
      {
        "msg": "Referenced item not found",
        "slug": "hours",
        "value": "'\"5e8272fbd2412e0ccbce6fbb\"'"
      }
    ],
    "problems": [
      "Field 'order-options': Referenced item not found: '\"5e82889db3257822cffa74db\"'",
      "Field 'hours': Referenced item not found: '\"5e8272fbd2412e0ccbce6fbb\"'"
    ]
  }

Hours for me is a single-ref field, and I currently have it in my Google Sheet as follows:
"5e8272fbd2412e0ccbce6fbb"

Order Options is a multi-ref, where the value could be just one “ID”, or it could be multiple IDs. Therefore, a sample cell in Google Sheets could be something like

"5e8272fbd2412e0ccbceasdda"

OR

"5e8272fbd2412e0ccbceasdda", "5e8272fbd2412e0ccbgaca", "5e8272fbd2412e0ccbcenmh"

That said, Webflow is throwing an error and I can’t figure out why.

In my JSON body, I have:

"hours": "{Hours ID}"

"order-options": ["{FINAL PICKUP OPTIONS}"]

For some reason, my output re: the multiref specifically has these unwanted \ characters in the output and I can’t figure out where they’re coming from. Any assistance is appreciated!

Hey Matt - Thanks for the detailed information! Makes it a lot easier to troubleshoot.

To summarize the problem, in your current configuration, the export is your data like this:

"hours":""5e8272fbd2412e0ccbce6fbb""

"orders-option:": [""5e8272fbd2412e0ccbceasdda", "5e8272fbd2412e0ccbgaca", "5e8272fbd2412e0ccbcenmh""]

To solve for the double quotes we’re sending in hours, just remove the quotes in the Hours column coming from the Google Sheet. You can use the Find/Replace step for that and have it search for quotes in the column and replace with blank.

To solve for the spaces in your order options column, you can use the same Find/Replace step and configure a rule to look for spaces in that column and remove.

Lastly, to solve for the double quotes we’re sending in order-options, just remove the quotes in your body:

"order-options": [{FINAL PICKUP OPTIONS}]

Let me know if that works!

3 Likes

That worked! Thanks Sachi — appreciate the assistance here. :smiley:

2 Likes