How to check the execution status of a previous node?

Describe the problem/error/question

Getting error Cannot assign to read only property 'name' of object 'Error: Referenced node is unexecuted' in an if/then block. Trying to do this in code (rather than merge) because of the position in overall workflow:

let jiraIssue = null

if($('Create an issue') != null) {
  jiraIssue = $('Create an issue').item.json
} else {
  jiraIssue = $('Check for Existing Open Issue').item.json
}

// calculate a browser URL from the issue
const baseUrl = jiraIssue.self.replace(/\/rest\/api\/.*/,'')
const browserUrl = baseUrl +"/browse/" + jiraIssue.key

return {"json": {
  "jiraIssueApiUrl": jiraIssue.self,
  "jiraIssueBrowserUrl": browserUrl
}}

What is the error message (if any)?

Cannot assign to read only property ‘name’ of object ‘Error: Referenced node is unexecuted’

Please share your workflow

Error is in the final node, where I’m trying to get the URL of the JIRA issue that we either updated or created in the prior nodes.

Information on your n8n setup

  • Version 1.108.1

Here is how you can verify if the node ran without code:

same in code:

2 Likes

Thank you. The isExecuted is exactly what I needed.

That didn’t pop up in the UI and I couldn’t find it documented at Output of other nodes | n8n Docs (maybe I missed it), but I was sure there was a way.

2 Likes

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