# INSERT msg.payload.object into postgres table

**URL:** https://discourse.nodered.org/t/insert-msg-payload-object-into-postgres-table/27793
**Category:** General
**Created:** [4 June 2020 22:02 UTC](https://discourse.nodered.org/t/insert-msg-payload-object-into-postgres-table/27793 "2020-06-04T22:02:27Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![gooroo](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gooroo](https://discourse.nodered.org/u/gooroo)
#### Post date: [7 June 2020 19:40 UTC](https://discourse.nodered.org/t/insert-msg-payload-object-into-postgres-table/27793/9 "2020-06-07T19:40:14Z")

</div>

Got it to work...Using the template node I had to make the sql query, then use the function query to build the full message that has to get passed to the postgres node. Thanks all for your help.

 ![Capture8](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/f/0f89a08178a4a25b98ac0253e7cde20e32dbad60.jpeg) ![Capture9](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/d/2db453beb47fd653a41f50aaad4fd6a3b094844b.jpeg) ![Capture10](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/c/4c977eccaa2564f5dc45c94253d2d72cdeab5899.jpeg)

---

_[View the full topic](https://discourse.nodered.org/t/insert-msg-payload-object-into-postgres-table/27793)._
