# How insert msg.payload in Postgrestor node?

**URL:** https://discourse.nodered.org/t/how-insert-msg-payload-in-postgrestor-node/45220
**Category:** General
**Created:** [5 May 2021 13:02 UTC](https://discourse.nodered.org/t/how-insert-msg-payload-in-postgrestor-node/45220 "2021-05-05T13:02:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![MrWolff](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrwolff/32/30557_2.png) [@MrWolff](https://discourse.nodered.org/u/MrWolff)
#### Post date: [5 May 2021 13:02 UTC](https://discourse.nodered.org/t/how-insert-msg-payload-in-postgrestor-node/45220/1 "2021-05-05T13:02:39Z")

</div>

Does anyone now how you can insert the msg.payload value into a Postgresql database using the Postgrestor node?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/6/e67001bf61c69798312d9a60953a7862cb0e0ff3.png)

Defining msg.payload doesn't work becuase this is not SQL language.

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [5 May 2021 13:12 UTC](https://discourse.nodered.org/t/how-insert-msg-payload-in-postgrestor-node/45220/2 "2021-05-05T13:12:27Z")

</div>

According to the help info  
`VALUES ('{{msg.payload}}', NOW(), '1');`

> **[postgrestor](https://flows.nodered.org/node/postgrestor)**
>
> Yet another Node-RED node to query PostgreSQL

---

<div class="post-metadata">

### Author: ![MrWolff](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrwolff/32/30557_2.png) [@MrWolff](https://discourse.nodered.org/u/MrWolff)
#### Post date: [5 May 2021 13:23 UTC](https://discourse.nodered.org/t/how-insert-msg-payload-in-postgrestor-node/45220/3 "2021-05-05T13:23:45Z")

</div>

It is that easy. Thank you very much!

---

<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: [19 May 2021 13:24 UTC](https://discourse.nodered.org/t/how-insert-msg-payload-in-postgrestor-node/45220/4 "2021-05-19T13:24:00Z")

</div>

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