Forum Discussion

Frontman's avatar
Frontman
Qrew Trainee
2 days ago

Pipelines bug: Not able to parse JSON when JSON records path defined

Hello,

I bought up this very issue 2 years ago, but it now looks like the solution is no longer working.

https://community.quickbase.com/discussions/quickbase-discussions/pipelines-bug-json-value-not-being-parse-when-specifying-the-json-records-path/20129

Steps to reproduce:

  1. Insert a fetch JSON and iterate JSON steps.
  2. In the Iterate JSON step, I've defined the JSON Records Path as: /response/results. I've included an example JSON response below.
  3. Inside the Iterate JSON loop, I'm tried using the following variables to refer to the custom_id parameter:
    • {{c.raw_record.custom_id}}
    • {{c.raw_record.['custom_id']}}

However, I keep getting this error when the pipeline is run:

Validation error: Incorrect template "{{c.raw_record.custom_id }}". ValueError: invalid literal for int() with base 10: 'raw_record'

This is very strange as this method to refer to a JSON path used to work perfectly.

I also doubled checked the activity log and using raw_record in the variable should be correct, because when you define the JSON Records Path, Quickbase uses "raw_record" to refer the defined path as shown in the activity log for the Iterate JSON step with the records path defined. (see attached screenshot)

 

Example JSON response

{
    "status_code": "200",
    "response": {
      "batch_id": 123",
      "created_at": "1740504520",
      "expires_at": "1740590920",
      "completed_at": "1740504923",
      "status": "completed",
      "results": [
        {
          "custom_id": "123",
          "result": {
            "text": "text",
            "type": "text"
          }
        },
        {
            "custom_id": "test_0",
            "result": {
              "text": "text",
              "type": "text"
            }
          }
    ]
    },
    "error_message": null
  }

 

  • I found the issue. The variable name was correct but I set the wrong Iterate JSON step in the "Loop - For each:" setting so Pipelines was referencing the wrong JSON response.