# Select bucket dynamically via parameter

**URL:** <https://discourse.nodered.org/t/select-bucket-dynamically-via-parameter/88458>\
**Category:** General\
**Tags:** influxdb\
**Created:** [3 June 2024 08:58 UTC](https://discourse.nodered.org/t/select-bucket-dynamically-via-parameter/88458 "2024-06-03T08:58:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![IngoKnito](https://avatars.discourse-cdn.com/v4/letter/i/41988e/32.png) [@IngoKnito](https://discourse.nodered.org/u/IngoKnito)\
**Post date:** [3 June 2024 08:58 UTC](https://discourse.nodered.org/t/select-bucket-dynamically-via-parameter/88458/1 "2024-06-03T08:58:42Z")

</div>

I have several influxdb-out nodes and would like to combine them into one.  
Is there a way to set or overwrite the bucketname to the influxdb-node via a parameter in the msg?  
Something like this:  
msg.bucket="bucket1"

With the measurement it works fine via msg.measurement or via msg.payload.  
msg.payload = [{ [measurement]: parseFloat(value) }];

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 June 2024 16:27 UTC](https://discourse.nodered.org/t/select-bucket-dynamically-via-parameter/88458/2 "2024-06-03T16:27:16Z")

</div>

It seems not to be documented that one can do this. I suggest that you ask via an issue on the [node's github page](https://github.com/mblackstock/node-red-contrib-influxdb). Unfortunately it seems that there is not a great deal of activity on issues from the author so you may not get a reply. The alternative is to use the influxdb directly rather than via that node, which I believe is not difficult though I have not done it myself.

---

<div class="post-metadata">

**Author:** ![IngoKnito](https://avatars.discourse-cdn.com/v4/letter/i/41988e/32.png) [@IngoKnito](https://discourse.nodered.org/u/IngoKnito)\
**Post date:** [3 June 2024 17:27 UTC](https://discourse.nodered.org/t/select-bucket-dynamically-via-parameter/88458/3 "2024-06-03T17:27:36Z")

</div>

Ok, thanks for the info!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 September 2024 17:27 UTC](https://discourse.nodered.org/t/select-bucket-dynamically-via-parameter/88458/4 "2024-09-01T17:27:38Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
