GenerateContentRequest.contents[0].parts[0].data: required oneof field 'data' error for subworkflow

Describe the problem/error/question

my receive gmail email workflow show the error.

Bad request - please check your parameters

* GenerateContentRequest.contents[0].parts[0].data: required oneof field ‘data’ must have one initialized field

Information on your n8n setup

  • n8n version: 2.1.4
  • Database (default: SQLite): no
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: windows 10

Hi @tytom2003

Please can you share more context and information around your workflow and your current setup and use case. Simply providing an error is not helpful.

If you can share your workflow in a code block here even better

this is my sub workflow. i tried choose “accept all data“ or “define using fields below“. it still show this error. i input some data to test the workflow is no error show.

Hi @tytom2003, Can you also share your main workflow.

I am also a bit confused. Your question is around the gmail node but you’re sharing something different. I still have not clear idea what the context or use case is

main workflow

i define input data name is query in when execute by another workflow node.

in message a model 1, user prompt message is {{ json.address }}, but i see my workflow is {{ json.query }}

Hi @tytom2003

Yes this is because by default, the main AI Agent will send a “query” param to the sub-workflow. You can change this though if you define the input params on the sub flow like this:

Then in the main flow click the magic button to have the agent fill the filed for you.

it is no show star button to show “workflow input“ data

As per my previous post, on the sub-workflow, make sure you set the property like below. Only then will the option to set the address appear in the main workflow agent with the magic button

i reinstall n8n to solve my problem. thank you very much for your help.

1 Like

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