Assistance getting correct data sent to influxdb

In future please post flows inline. In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

See this post for more details - How to share code or flow json

Also please just post enough of the flow that we can see the problem.

I have looked briefly at your flow, however. I don't understand why you are putting the data into global variables, if you look at the help text for the influxdb node you will see that it expects the data to be in msg.payload.