Can't sort the date in Google sheets for Automated birthday messages

Describe the problem/error/question

the sorting tool receive the proper info infos from the google sheet but always send in False.

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.){
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 7
            }
          ]
        }
      },
      "id": "483fa963-7edb-401e-8e73-65dbfa51dec5",
      "name": "Daily 9AM Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        4848,
        2256
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "condition-id-1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $now.toFormat('MM-dd') }}",
              "rightValue": "={{ DateTime.fromISO($json['Date of Birth']).toFormat('MM-dd') }}"
            },
            {
              "id": "condition-id-2",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $now.toFormat('MM-dd') }}",
              "rightValue": "={{ DateTime.fromISO($json['Joining Date']).toFormat('MM-dd') }}"
            }
          ],
          "combinator": "or"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "id": "d592703c-5650-4b3b-83da-b5093b4b4dae",
      "name": "Check Birthday or Work Anniversary",
      "type": "n8n-nodes-base.if",
      "position": [
        5344,
        2256
      ],
      "typeVersion": 2.2
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "options": {}
      },
      "id": "45d12616-072c-417d-bc76-3196a50fde9f",
      "name": "Combine Today's Celebrations",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        5664,
        2240
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "operation": "send",
        "phoneNumberId": "885942214604787",
        "recipientPhoneNumber": "590690778699",
        "textBody": "={{ $json.output }}",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.whatsApp",
      "typeVersion": 1.1,
      "position": [
        6256,
        2240
      ],
      "id": "751c2bd1-22be-423c-9825-8f017038e03b",
      "name": "Send message",
      "webhookId": "0cb534c9-3506-416c-9420-6b50f2202fae",
      "credentials": {
        "whatsAppApi": {
          "id": "Pz6240YEPC6FXb9w",
          "name": "WhatsApp account 6"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=todays date :- {{ $now }}\n\nemp data :- {{ $json.data.toJsonString() }}",
        "options": {
          "systemMessage": "πŸŽ‰ Celebration Message Generator\nGenerate unique, heartfelt birthday and work anniversary messages for Whatsapp that feel genuinely human-written, never templated.\n🎯 Core Rules\nUniqueness: Never repeat opening phrases, sentence structures, or tones across messages. Each celebration must feel completely different.\nAuthenticity: Write like a caring colleague, not a robot. Messages should be personal, warm, and memorable.\nVariation: Rotate through different styles, emojis, and approaches systematically.\n🎨 Message Styles (Rotate These)\nBirthdays:\n\nJoyful - Pure celebration and excitement\nReflective - New beginnings and fresh chapters\nGrateful - Appreciation for their presence\nPlayful - Lighthearted with gentle humor\nAchievement - Celebrate growth and contributions\nWarm - Team family togetherness\n\nWork Anniversaries:\n\nMilestone - Highlight achievements and impact\nJourney - Their evolution and growth story\nTeam Impact - How they enrich the culture\nFuture-Forward - Excitement for what's ahead\nExcellence - Innovation and expertise\nLegacy - Foundational role (5+ years)\n\nπŸ“ Format Requirements\nStructure:\n*[Unique Opening + Name + Hook]* [Emoji Combo]\n[Specific wishes/appreciation - keep brief]\n_β€” from the team πŸ’™_\nMarkdown:\n\n*bold* for names and key phrases\n_italic_ for signature only\nProper line breaks for readability\n\nEmojis (rotate):\n\nBirthday: πŸŽ‚βœ¨, πŸŽ‰πŸŽ‚, πŸŽ‚πŸŒŸ, πŸŽˆπŸŽ‰, πŸŽ‚πŸŽŠ, 🌟🎁, πŸŽ‰βœ¨, πŸŽ‚πŸ’«\nAnniversary: πŸŽŠπŸš€, πŸ†πŸŽ‰, 🎊πŸ’ͺ, ⭐🎊, πŸš€βœ¨, πŸŽ‰πŸ…, 🎊⚑, πŸ’ŽπŸŽŠ\n\n🎲 Variation Rules\n\nOpening: Never repeat within 30 days\nTone: Never use same emotional tone consecutively\nLength: 1-3 lines per person, mobile-friendly\nAnniversary Years: Adapt message to tenure length\n\nπŸ’‘ Writing Tips\n\nUse first names only\nVary sentence length and rhythm\nKeep culturally inclusive and professional\nMake it screenshot-worthy\nEach person gets distinctly different treatment\n\nOutput: Generate ready-to-post Whatsapp messages that colleagues will genuinely react to and appreciate.\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3,
      "position": [
        5904,
        2240
      ],
      "id": "d53bb379-b00f-42c8-8f91-4158fc769625",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "builtInTools": {},
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        5824,
        2464
      ],
      "id": "2c079b49-8a52-4320-a95e-e3da4942ae33",
      "name": "OpenAI Chat Model8",
      "credentials": {
        "openAiApi": {
          "id": "ty2Jj9lVWJc5GgTB",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1EJcirpb37yojhj_S-tjwQszJZL4YcGV3NPNM4QcaSiU",
          "mode": "list",
          "cachedResultName": "Employee Data",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1EJcirpb37yojhj_S-tjwQszJZL4YcGV3NPNM4QcaSiU/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1EJcirpb37yojhj_S-tjwQszJZL4YcGV3NPNM4QcaSiU/edit#gid=0"
        },
        "options": {}
      },
      "id": "89802675-64c1-451d-b6e3-a0d8ff20c91c",
      "name": "Fetch Employee Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5072,
        2256
      ],
      "typeVersion": 4.7,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "cYtUpGnTFoiYyPSp",
          "name": "Google Sheets account"
        }
      }
    }
  ],
  "connections": {
    "Daily 9AM Trigger": {
      "main": [
        [
          {
            "node": "Fetch Employee Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Birthday or Work Anniversary": {
      "main": [
        [
          {
            "node": "Combine Today's Celebrations",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Combine Today's Celebrations": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model8": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Employee Data": {
      "main": [
        [
          {
            "node": "Check Birthday or Work Anniversary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "instanceId": "0b20725643baa9a0df8254b853d336e239218878552bb77f76258790cbb23ba5"
  }
}

Share the output returned by the last node

Information on your n8n setup

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

Hi there, i’d defintely love to help, can you properly paste your workflow so it will be easier for me to debug it

Ah almost there copying the workflow but you somehow included the instruction text (Select the ndoes on your canvas… if you had removed that then the post would have rendered your workflow in the browser.

I’m a little confused what you mean by β€œThe sorting tool receives the proper info from the google sheet but always sends False.”

Are you referring to the If node β€œCheck Birthday or Work Anniversary?

From what I can tell, this returns a true or a false if either the birthday or anniversary date is today. Are you wondering why this node is only returning False for all records?

Because what will happen is that the output of the Get Row(s) from google sheets node is all the data from that google sheet and it appears as a table of data.

In the Schema view you only see the first item like this:

But if you switch that to the Table view you then see more records like this:

According to my data the If node should match on 2 records for today (2025-12-01) Velma and Al.

But as you only want to keep the records that Filter out records, I would replace this If node with a Filter node instead (it’s a little clearer to someone else or your future self what is happening here)

I hope that solves your first problem!

:warning: Don’t forget to mark this as the solved answer if you think my post fixed your issue! :smiling_cat_with_heart_eyes:

1 Like

thanks mate, problem solde with using the Filter instead of If node

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