Google Analytics : different values of totalUsers in Web and n8n

I’m facing an issue with Analytics. My workflow is supposed to be triggered everyday at 8am (UTC+01:00) and gets the total number of users that visited my website (I set the settings for “Yesterday”).

I also set a condition that returns true if this total number is 1. When true is returned, it sends an email that says there is only one visitor on my website. It is a very simple workflow, but still doesn’t work correctly.

Sometimes it sends the email whereas there is more than 1 visitor. I don’t really get why.

  • n8n version: 1.64.3
  • Database (default: SQLite): SQLite
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker

Hi @NitNeuq22

Thanks for posting here and welcome to the community! :raised_hands:

For debugging, it would help if you could have a look at the execution where an email was sent despite more than 1 visitors and inspect the data that was received from Google Analytics.

Can you share some data from that flow to look at how it get’s evaluated along the way?
(make sure to remove any sensitive content)

Tip for sharing your workflow in the forum

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

Make sure that you’ve removed any sensitive information from your workflow and include dummy data or pinned data as much as you can!


Hi !

Thank you for your answer.

When the email is sent, the Analytics node only gets 1 user, whereas, in this case, they were 2.

image

I already tried to change the hour of execution, to be later (at first I thought it was the time difference, because I’m in France GMT +1, but even when changing the hour of execution, it still sends the emails)

Can you please share the output of your google analytics node?
I am not sure if the error may come from how the data is processed further down the stream or if the data is incorrectly fetched from the node itself.

Thanks!

Tip for sharing your workflow in the forum

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

Make sure that you’ve removed any sensitive information from your workflow and include dummy data or pinned data as much as you can!