Example of Convert to Text File node feeding JIRA create attachment node?

Describe the problem/error/question

I am using the JIRA create Issue node and would like to follow with a create attachment step that uploads some JSON data (from a prior step’s `item.json`) as a .json or .txt file.

I’m not sure how convert the JSON output from the prior step into a binary object. I also don’t know how to set the filename.

I’m hoping someone has an example node.

What is the error message (if any)?

Workflow sits on “Executing Workflow” when I test the step.

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

Debug info

core

  • n8nVersion: 1.108.1
  • platform: docker (self-hosted)
  • nodeJsVersion: 22.17.0
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: enterprise (production)

I found one of the missing links, Convert to Text File node:

That node throws this error, so perhaps I’m not converting something appropriately.

Problem in node ‘Convert to File‘

The value in “{ “cmdline”: “C:\\WINDOWS\\system32\\svchost.exe -k netsvcs -p -s Schedule”, “filename”: “svchost.exe” }” is not set

Hey @hukel hope all is well.

Thank you for attaching the workflow. Could you pin the output of the Create an issue node, so that we have something to test with?

I’m trying to do that but keep getting this error from this page:

Token type `html_raw` not supported by Markdown parser

Try to switch to markdown mode first

Thank you. So reassuring to see those three ticks… I hope this has what you need and still works post-redaction.

No problem.

Here is one way to do it:

Alternatively this could be a better approach:

Thank you. I used the node pattern from your second suggestion but used the merge combine option from the first That combination works well.

Minor question, that I can break into another thread if needed,

I’m trying to pretty-print the JSON in the generated file. No matter what options I use,

{{$(JSON.stringify(item.json,null,20))}}
{{$(JSON.stringify(item.json,null,'\n\t'))}}

the file generated is “compressed” JSON, not “pretty”. I am verifying this by downloading from the n8n node window. JIRA attachment matches.

Any tips there?

Here you go:

Hope that answered your question. Please mark my answer as solution if if did. Thank you.

Cheers.