Hi Community,
I’m building a ticket management system in n8n with the following workflow:
- Trigger: Email IMAP node checks for incoming emails.
- Parse: Extracts relevant fields from the email (including ticket number in subject/body).
- Check in DynamoDB:
- If ticket number exists, update the existing entry with the new/updated message body.
- If ticket number does not exist, insert a new row with all relevant details.
- Send Acknowledgment Email to the user confirming ticket creation or update.
- The message body is not just plain text — it’s a structured object containing:
fromEmail
toEmail
timestamp
emailSubject
emailBody
(and optionally) attachments metadata
Everything works fine except when trying to store this message body in DynamoDB as a Map.
The workflow fails or DynamoDB does not store the field as expected, despite multiple attempts to format the value as a Map.
I’ve tried different JSON formatting, Set node, and manual {{ JSON.parse() }} conversions, but Dynamo still stores it as a string or fails entirely.
Question:
How can I correctly store the email’s message body (with its structured fields) as a Map in DynamoDB via n8n?
What is the error message (if any)?
Unable to store params of msg body in map format so that can be retrieved easily at frontend.
Please share your workflow
Share the output returned by the last node
[
{
"ticketId": "TICKET-1234556788965-1233",
"Msgbody": {
"Subject": "Testing new workflows nice",
"From": "<[email protected]>",
"To": "<[email protected]>",
"Msg": "<Testing new workflows nice... message body> ",
"Timestampe": "Mon, 4 Aug 2025 05:57:51 +0000",
"Msg-type": "Email",
"Email-status": "Default"
},
"Timestampe": "Mon, 4 Aug 2025 05:57:51 +0000"
}
]
Information on your n8n setup
- n8n version: 1.105.3
- Database (default: SQLite): AWS Dynamo DB
- n8n EXECUTIONS_PROCESS setting (default: own, main) : default
- Running n8n via (Docker, npm, n8n cloud, desktop app) : Self Hosted.
- Operating system : Linux
