Troubleshooting Workflow Issue: Filtering Records Based on Date Difference

Hello
and please help. i didn’t find answer for my troubles here.

  1. Question / Problem In my workflow, within Filter1, I filter records that have a date difference between the registration date and the current date of less than 30 days. This works well.

However, later in the workflow, the output only includes those records that are less than 30 days old, and I don’t know where the error is.

  1. Question When I started with n8n, the output of each node included all the inputs of the previous node. This is no longer the case in the new version. I found it easier to work with it back then :). Is there any way to achieve the same behavior?

n8n version: 1.26.0

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

hello @Petr_Mindl

That’s probably because you are referring to the nodes, that were before the filter node (e.g. GET_tab_User Node).

I don’t get the point. It still returns all the items from the previous node. Just don’t use the Schema view for that. It’s in the JSON view.

That’s the problem, my input data won’t pass to this node.
For example, I can enable Include Input Fields on the Date node. But for a node like MySQL, I can’t. So at the beginning I download some data using MySQL GET_tab_User node, but right after MySQL UPDATE tab User MaxTariffValidity col node I lose the data and have to reference it to the original MySQL GET_tab_User node

This is the output without input data

Can you provide some samples for the nodes below?


So I could help with the solution.

Just clear the json output for each node from any sensitive info

1 Like
  1. GET node output
[
{
"id": 33748,
"registered_at": "2024-03-01 00:00:00",
"status": "trial",
"MaxTariffValidity": "2024-03-31 00:00:00",
"MaxTariffValidity_prev": "2024-03-31 00:00:00",
"hashedEmail": "7d0f5d2a68c0332d8cae"
},
{
"id": 33751,
"registered_at": "2024-03-01 00:00:00",
"status": "paid",
"MaxTariffValidity": "2024-04-04 00:00:00",
"MaxTariffValidity_prev": "2024-04-04 00:00:00",
"hashedEmail": "3fc05bb03f4f173b1877"
},
{
"id": 33718,
"registered_at": "2024-02-29 00:00:00",
"status": "trial",
"MaxTariffValidity": "2024-03-30 00:00:00",
"MaxTariffValidity_prev": "2024-03-30 00:00:00",
"hashedEmail": ""
}
]
  1. UPDATE tab. User MaxTariffValidity col output
[
{
"success": true
},
{
"success": true
},
{
"success": true
},
{
"success": true
}
]
  1. GET MaxTariffValidity tab. User
    INPUT
[
{
"success": true,
"currentDate": "2024-03-08T14:57:42.589+01:00",
"daysDifference": {
"days": 34.58174292824074
}
},
{
"success": true,
"currentDate": "2024-03-08T14:57:42.590+01:00",
"daysDifference": {
"days": 35.581742939814816
}
},
{
"success": true,
"currentDate": "2024-03-08T14:57:42.590+01:00",
"daysDifference": {
"days": 35.581742939814816
}
}
]

Output

[
{
"MaxTariffValidity": 
null
},
{
"MaxTariffValidity": 
"2024-04-06 00:00:00"
},
{
"MaxTariffValidity": 
"2024-04-06 00:00:00"
},
{
"MaxTariffValidity": 
"2024-04-06 00:00:00"
},
{
"MaxTariffValidity": 
null
},

In short, you need to grab the original data from the Filter node. You can’t refer to the nodes before it.

Here is the edited workflow (part1)

1 Like

part 2

For some reason I can’t upload the entire workflow.
That’s how it should be linked

Or you can download it from there.

Hello @barn4k

thank you, that helps.
But anyway, if I use MySQL node, then I always have to merge. That’s not quite ideal, but it works.

1 Like

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