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.)
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:
Google Sheets Node:
Operation: Read / Get Many
Ensure the output shows multiple items (JSON objects), one for each row in your sheet.
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.
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.
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.