Describe the problem/error/question
I am trying to create an automation that takes a name and location of a person, searches on Perplexity and Tavily and then creates a persona based on the search results using OpenAI Chat Model.
But my problem is that both perplexity and tavily output their payload (JSON) in different structures and I can’t figure out how to merge them to give it as input to OpenAI.
I tried Aggregate and Merge and even read their docs, but there’s nothing on how to aggregate or merge if your data sets are different.
As you can see, in the OpenAI node, the second part from Tavily Search "
{{ $json.results }}" comes up as ‘undefined’.
I have frozen/pinned all the outputs because Tavily requires an API key that is to be sent along with the search. I ran the workflow, pinned all the outputs and then removed the node that passed the API key to Tavily node.
I would really appreciate if I could get some guidance on how to use both search results to pass on to OpenAI for its analysis and processing.
Share the output returned by the last node
Information on your n8n setup
- n8n version: 1.66.0
- Database (default: SQLite): default
- n8n EXECUTIONS_PROCESS setting (default: own, main): no clue what this is
- Running n8n via (Docker, npm, n8n cloud, desktop app): npm on raspi
- Operating system: debian