# Data table Insert row in workflow

**URL:** <https://forums.losant.com/t/data-table-insert-row-in-workflow/979>\
**Category:** Help\
**Created:** [June 14, 2018, 11:29am UTC](https://forums.losant.com/t/data-table-insert-row-in-workflow/979 "2018-06-14T11:29:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sreyams\_Jain1](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Sreyams\_Jain1](https://forums.losant.com/u/Sreyams_Jain1)\
**Post date:** [June 14, 2018, 11:29am UTC](https://forums.losant.com/t/data-table-insert-row-in-workflow/979/1 "2018-06-14T11:29:22Z")

</div>

In a workflow, I have data in the payload. I am trying to add data into a data table. Column names in table are the same as in payload. I tried assigning column values with the data. My table is not getting updated. what is the reason?

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [June 15, 2018, 3:07am UTC](https://forums.losant.com/t/data-table-insert-row-in-workflow/979/2 "2018-06-15T03:07:30Z")

</div>

Can you please provide a screenshot that shows your Data Table: Insert configuration. Please also provide a screenshot of the Debug Panel that shows the payload so we can see what your data looks like.

---

<div class="post-metadata">

**Author:** ![Sreyams\_Jain1](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Sreyams\_Jain1](https://forums.losant.com/u/Sreyams_Jain1)\
**Post date:** [June 18, 2018, 1:08am UTC](https://forums.losant.com/t/data-table-insert-row-in-workflow/979/3 "2018-06-18T01:08:26Z")

</div>

I get this error - InvalidJsonError Param dataTableRow template did not render to valid JSON  
CreateDataTable node - has response in dataTable. Table is created OK  
AddRows node has data in data1 payload. Table is not getting rows added

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/d409128d1e141f8a418ebe7c14090b749c38eabe.png)

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [June 18, 2018, 2:16am UTC](https://forums.losant.com/t/data-table-insert-row-in-workflow/979/4 "2018-06-18T02:16:36Z")

</div>

I would recommend using the [Table: Insert Row](https://docs.losant.com/workflows/data/table-insert-row/) node instead of the Losant API node to insert rows into a Data Table. It will be much easier to use.

---

<div class="post-metadata">

**Author:** ![Sreyams\_Jain1](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Sreyams\_Jain1](https://forums.losant.com/u/Sreyams_Jain1)\
**Post date:** [June 27, 2018, 2:51am UTC](https://forums.losant.com/t/data-table-insert-row-in-workflow/979/5 "2018-06-27T02:51:49Z")

</div>

I am now trying to use the Table: Insert Row node. I have now a valid data and tableId is stored in data payload. When I give {{data.tableId}} as the data table ID template and all values to be inserted into table being optional, rows are NOT getting added.

Why?

---

<div class="post-metadata">

**Author:** ![Sreyams\_Jain1](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Sreyams\_Jain1](https://forums.losant.com/u/Sreyams_Jain1)\
**Post date:** [June 27, 2018, 3:31pm UTC](https://forums.losant.com/t/data-table-insert-row-in-workflow/979/6 "2018-06-27T15:31:58Z")

</div>

outside of the workflow, adding rows to data table works with the api. But, it does not somehow recognize the {{data.tableId}} given in he workflow (obtained from the data payload)

Is there some kind of a delay in creating the table although the id has been fetched?

---

<div class="post-metadata">

**Author:** ![Sreyams\_Jain1](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Sreyams\_Jain1](https://forums.losant.com/u/Sreyams_Jain1)\
**Post date:** [July 2, 2018, 12:45pm UTC](https://forums.losant.com/t/data-table-insert-row-in-workflow/979/7 "2018-07-02T12:45:18Z")

</div>

Any help regarding this, please?

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [July 2, 2018, 1:11pm UTC](https://forums.losant.com/t/data-table-insert-row-in-workflow/979/8 "2018-07-02T13:11:54Z")

</div>

I did a small test in an attempt to reproduce the issue. I was able to successfully insert data into a newly created DataTable using a workflow. Here’s a screenshot of the payload and the configuration.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/8e5d9cef977d10134af528cda2d478d559f11a6f.png)

The first thing to check is that the `tableId` is on the payload at the correct location. The previous screenshot you provided doesn’t show enough of the payload to confirm whether or not `data.tableId` exists.
