Hi n8ners, I’m a newbie here and I’m having problems referencing data from one node to another.
From the first node I get a JSON with all the info from a Podio app, and I want chatgpt to create the DDL of a MySQL table with the same structure. Should be easy, but…
If I copy/paste the full JSON into the OpenAI module, it works perfectly. But when I try to make the reference, it will only create the DDL for the first of the iterations. I’m testing now in a workspace with 4 different apps and it creates 4 equal DDLs from the first of the items processed.
I’m sure it should be easy but I’m stuck =/
Thank you in advance!
Please share your workflow
Share the output returned by the last node
[
{
"id": "chatcmpl-",
"object": "chat.completion",
"created": 1729543180,
"model": "gpt-4o-mini-2024-07-18",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": {
"result": "CREATE TABLE \"APP_PRUEBA\" (\"id\" bigint NOT NULL AUTO_INCREMENT,\"Título\" varchar(255) DEFAULT NULL,\"Categoría\" varchar(255) DEFAULT NULL,\"Número\" float DEFAULT NULL,PRIMARY KEY (\"id\"))"
},
"refusal": null
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 2293,
"completion_tokens": 58,
"total_tokens": 2351,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0
}
},
"system_fingerprint": ""
},
{
"id": "chatcmpl-",
"object": "chat.completion",
"created": 1729543181,
"model": "gpt-4o-mini-2024-07-18",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": {
"result": "CREATE TABLE APP_PRUEBA (id bigint NOT NULL AUTO_INCREMENT, Título varchar(255) DEFAULT NULL, Categoría varchar(255) DEFAULT NULL, Número float DEFAULT NULL, PRIMARY KEY (id))"
},
"refusal": null
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 2293,
"completion_tokens": 50,
"total_tokens": 2343,
"prompt_tokens_details": {
"cached_tokens": 2176
},
"completion_tokens_details": {
"reasoning_tokens": 0
}
},
"system_fingerprint": ""
},
{
"id": "chatcmpl-",
"object": "chat.completion",
"created": 1729543182,
"model": "gpt-4o-mini-2024-07-18",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": {
"result": "CREATE TABLE \"APP_PRUEBA\" (\"id\" bigint NOT NULL AUTO_INCREMENT, \"Título\" varchar(255) DEFAULT NULL, \"Categoría\" varchar(255) DEFAULT NULL, \"Número\" float DEFAULT NULL, PRIMARY KEY (\"id\"))"
},
"refusal": null
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 2293,
"completion_tokens": 61,
"total_tokens": 2354,
"prompt_tokens_details": {
"cached_tokens": 2176
},
"completion_tokens_details": {
"reasoning_tokens": 0
}
},
"system_fingerprint": ""
},
{
"id": "chatcmpl-",
"object": "chat.completion",
"created": 1729543183,
"model": "gpt-4o-mini-2024-07-18",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": {
"result": "CREATE TABLE `APP_PRUEBA` (`id` bigint NOT NULL AUTO_INCREMENT, `Título` varchar(255) DEFAULT NULL, `Categoría` varchar(255) DEFAULT NULL, `Número` float DEFAULT NULL, PRIMARY KEY (`id`))"
},
"refusal": null
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 2293,
"completion_tokens": 59,
"total_tokens": 2352,
"prompt_tokens_details": {
"cached_tokens": 2176
},
"completion_tokens_details": {
"reasoning_tokens": 0
}
},
"system_fingerprint": ""
}
]
Information on your n8n setup
- n8n version: 1.62.4
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
- Operating system: