Referencing Slack channel after creation is undefined

Describe the problem/error/question

I’m using the slack create:channel node to create a channel and then passing the channel Id to post message. I can see all the data is there but when I drop it into the json it is rendered as [undefined].

What is the error message (if any)?

Please share your workflow

Information on your n8n setup

  • n8n version: 1.84.1,
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system:
1 Like

hello @Ashex

Seems some kind of impaired items occurs (when the previous nodes have different amount of returned items). Try replacing the .item.json with .last().json for slack channel

1 Like

Interesting, this fixed it! I’m a bit confused as to why that was the solution but I guess Setup Channel is technically returning an array so this forces selection of the only item in it.

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