# Passing variables to API Import

**URL:** <https://community.parabola.io/t/passing-variables-to-api-import/484>\
**Category:** Ask a question\
**Created:** [May 9, 2020, 3:48am UTC](https://community.parabola.io/t/passing-variables-to-api-import/484 "2020-05-09T03:48:21Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/community.parabola.io/brian/32/11_2.png) [@brian](https://community.parabola.io/u/brian)\
**Post date:** [May 18, 2020, 6:18pm UTC](https://community.parabola.io/t/passing-variables-to-api-import/484/8 "2020-05-18T18:18:57Z")

</div>

Hey Geoff!

You can build up JSON bodies like this, where there are arrays of objects taken from rows of data.

You will want to first use a Text Merge to create the sets of objects in the array. So that would be using that step to create a column which has the value of:

```auto
				{
					"type": "plain_text",
					"text": "*this is plain_text text*",
					"emoji": true
				}

```

And it will make 1 per row. Obviously it may be different for each type, and you would merge in your columns to create each object.

Now, use a Merge Values step to combine rows that need to be bundled into the same JSON payload. Either by grouping by a specific column, or not grouping, so that every row is merged. Use a comma with no space after it as the delimiter.

That will give you this in a column:

```auto
				{
					"type": "plain_text",
					"text": "*this is plain_text text*",
					"emoji": true
				},
				{
					"type": "plain_text",
					"text": "*this is plain_text text*",
					"emoji": true
				},
				{
					"type": "plain_text",
					"text": "*this is plain_text text*",
					"emoji": true
				},
				{
					"type": "plain_text",
					"text": "*this is plain_text text*",
					"emoji": true
				},
				{
					"type": "plain_text",
					"text": "*this is plain_text text*",
					"emoji": true
				}

```

Now you can merge that column into your array in your payload body so that it is wrapped in `[square braces]` and you can add all the other trimmings around it!

Let me know if that works.

---

_[View the full topic](https://community.parabola.io/t/passing-variables-to-api-import/484)._
