List indices must be integers or slices, not str

Problem in node ‘Create an item‘

list indices must be integers or slices, not str

Please share your workflow

Share the output returned by the last node

[
{
“id”: 2526,
“name”: “ST2545”,
“employee_id”: [
167,
“Mohammad”
],
“ticket_type_id”: [
5,
“Handover”
],“request_date”: “2025-08-19”,
“duration”: 0,
“duration_in_days”: 0,
“rejected_reason”: false,
“resend_reason”: false,
“chek_current_user”: false,
“request_subject”: “test”,
“notes”: “

test

”,
“resolution”: “


”,
“change_state_note”: false,
“ticket_state”: “new”,
“state”: “submitted”,
“technical_user”: true,
“edit_users”: true,
“done_date”: false,
“done_requester”: false,
“ticket_priority”: “high”
}
]

Information on your n8n setup

  • n8n version: 1.111.1
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: ubuntu 22.04

i think it has soemthing to do with the data type, try to convert the data that you are trying to use, to have a function to turn it into a. integer, you can wrap it with Number() or add a function .toInt

so like

{{$json.ticket.toInt()}} or {{Number($json.ticket)}}

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.