Gmail AI Agent - Read messages and mark them as read

Dear Community,

I just discovered n8n and it is really a great tool! Looking forward to automate plenty of tasks with it.

I am currently trying to build a workflow to summarise my unread emails and mark them as read. I wanted to do this with a “Tools Agent”, but I am currently facing the following issue: the requested emails get properly read and summarised, but marking them as read fails with the following error message:

Bad request - please check your parameters (item 0)
Invalid id value

Part of the workflow:

Tool configuration:

Result:

It looks like the node receives the correct 3 email IDs as input, but doesn’t use them as message ID.

Any hint on what I am doing wrong?

Thank you very much in advance for your assistance!

Information on your n8n setup

  • n8n version: 1.76.1
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu 22.04

Sorry, my bad, found the issue. The Message ID was defined as “Fixed” instead of “Expression” :see_no_evil::

Now everything is working like a charm.

1 Like

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