How to send a text automatically to different wp numbers

Hi guys, I am trying to send a reminder for my list of phone numbers, those are in my Google sheets and the idea is to send the message every Friday, but I am doubting what could be the best option and eficient way to do that, I am using now:

Cron > Google sheets > Python > Split in Batches > Whatsapp

I am having problems with my whatsapp, its taking the first number only, do you have some idea how I can deal with it?

Describe the problem/error/question

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.)

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:

It sounds like the Python node is effectively breaking the loop by aggregating your Google Sheet rows into a single data object. You are absolutely correct: unless you are doing heavy data science or complex regex, you generally do not need Python for this.

Here is the most efficient way to fix your workflow and ensure all numbers receive the message.

1. The Root Cause

In n8n, when the Google Sheets node reads a file, it outputs a list of items (e.g., 50 rows = 50 items). n8n automatically runs the next node 50 times.

However, if you pass that data into a Python node, and that script returns a single array or object, n8n treats it as 1 item. Consequently, the subsequent WhatsApp node runs only once (for the first number it sees).

2. The Solution: Simplify the Workflow

You should remove the Python node. You can do almost all simple preprocessing (like adding country codes or formatting names) directly inside the n8n nodes using Expressions.

Recommended Workflow:

Cron (Schedule) > Google Sheets > Split in Batches > HTTP Request (WhatsApp API)

Step-by-Step Implementation:

  1. Google Sheets Node:

    • Operation: Read / Get Many

    • Ensure the output shows multiple items (JSON objects), one for each row in your sheet.

  2. Split in Batches (Crucial for WhatsApp):

    • Connect Sheets to this node.

    • Batch Size: Set this to 1 or 5.

    • Why? WhatsApp APIs (and HTTP requests in general) can be sensitive to rate limits. If you send 500 requests instantly, you might get blocked. Batching allows you to control the flow.

  3. HTTP Request / WhatsApp Node:

    • Connect the “Split in Batches” node to this.

    • Preprocessing Data: Instead of Python, use an Expression.

      • Example: If you need to add a + to the phone number, in the “Phone Number” field, click the intended field, select Expression, and type: +{{ $json["phoneNumber"] }}.
    • Wait Node (Optional but recommended): Add a Wait node after the HTTP request (e.g., wait 2 seconds) to act as a buffer between messages.

  4. Close the Loop:

    • Connect the output of the Wait (or HTTP) node back to the input of the Split in Batches node.

    • This tells n8n: “Finish this batch, wait, and then go get the next batch.”

3. If you MUST use Python

If you have complex logic that absolutely requires Python, you must ensure your Python code returns a list of dictionaries, not a dictionary containing a list.

Bad Output (Causes your error):

{
  "numbers": ["123", "456", "789"]
}

Correct Output (Fixes the loop):

[
  { "number": "123" },
  { "number": "456" },
  { "number": "789" }
]

To achieve the correct output in the Python node, ensure you are returning:

return [{"json": item} for item in your_processed_list]

Summary of the Fix

  1. Remove the Python Node (use Expressions in the HTTP node instead).

  2. Connect Sheets → Split in Batches.

  3. Connect Batch → HTTP Request (WhatsApp).

  4. Drag a connection from the end of your HTTP/Wait node back to the start of the Split in Batches node to create a loop.