# InfluxDBv2 Write Point Action

This provides a way to provide write point to InfluxDBv2. Before adding InfluxDBv2 Write Point Action, user has to define a [**InfluxDBv2 Connection**](https://docs.thingsup.io/connections/influxdbv2-connection). User need to provide following parameters to add InfluxDBv2 Write Point Action.

#### Measurement

User need to provide name of InfluxDB measurement.

#### Function

* User can write JavaScript code to create dynamic query.
* "payload" object, tags, fields and timestamp objects are available in this code which are directly written on InfluxDBv2 Connection.

```
//Example 1

tags["device"] = payload.devicename;
fields["temperature"] = payload.temperature;
timestamp = null; // Take server Time

```

#### Bucket

User need to provide bucket name of InfluxDB database.

#### Org

User need to provide Org name of InfluxDB database.

#### Connection ID

User need to provide a Connection ID of InfluxDBv2 database connection.

![Add InfluxDBv2 Write Point Action](https://365492316-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7aTljSjWsfbXZ_OP_9%2Fuploads%2FDSgy06VKbF8ULP9WBWXF%2Finfluxdbv2_write.png?alt=media\&token=56ed38df-d76c-4480-b14b-50b07560296d)

Please note the following points:

{% hint style="info" %}

* "payload" object is supplied from Action Trigger like Rules, Action Command etc.
* Data Response of InfluxDB query will be available as Action Response.
* Only InfluxDB 2.X Databases are supported.
  {% endhint %}
