Describe the problem/error/question
I’m using the IMAP trigger and retrieve data there e.g.:
"textPlain": "Hello, \n \n \n \nKind Regards\nOur website: https://domain",
Then, I want to POST this data with an HTTP request into an API.
"name": "{{ $('Email Trigger (IMAP)').item.json.subject }}",
"description": "asdf",
works fine.
"name": "{{ $('Email Trigger (IMAP)').item.json.subject }}",
"description": "{{ $('Email Trigger (IMAP)').item.json.textPlain }}",
throws an error:
JSON parameter needs to be valid JSON
I’ve tried this:
"description": "JSON.stringify({{ $('Email Trigger (IMAP)').item.json.textPlain }})",
But it throws an error as well.
Is there a good solution to make that future proof?
The plain text and the HTML mail?
What is the error message (if any)?
JSON parameter needs to be valid JSON
Information on your n8n setup
- n8n version: 1.72.1
- Database (default: SQLite): PostgreSQL
- n8n EXECUTIONS_PROCESS setting (default: own, main): own
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Ubuntu 24.04