Block reference / Data

Insert data

Set variables and add values to the workflow's table, several at once.

In both appsWarpX BrowserWarpX Phone

Use Insert data when you want to put a value somewhere by hand: set a variable, or add a cell to a column of the workflow's table. One block can hold many rows, and each row writes one value. Values can be plain text or built from references such as {{variables.orderId}}.

The Insert data block's settings, filled in as in the example below.

Settings

Insert data

Click Insert data (0) to open the list; an empty block opens with one row ready. Each row is a type (Variable or Table), then a Variable name or a column from Select column, then the value. Rows run from top to bottom; click Add for another row.

Example
Variable | orderTotal | {{variables.totalText}}
Table | orderId | {{variables.orderId}}
Table | total | {{variables.totalText}}
Import file

The file button under a row's value. On, the row's value is read from a file instead of typed: the value box becomes a file path, and File Action appears.

ExampleUnchecked
File absolute path/File URLwhen Import file is on

The full path of a file on this computer, or a web address. A web address is fetched by the profile's browser, through its proxy and with its cookies. Files up to 50 MB. It can hold references, such as {{variables.exportFolder}}/products.csv.

ExampleC:\Users\you\Documents\products.csv
File Actionwhen Import file is on

Default puts the file's text in the value (a .json file is parsed). Read as base64 gives a data: URL. For a .csv, .xls or .xlsx file, Read as JSON gives a list of rows, each a list of cells, and Read as JSON with headers gives a list of objects keyed by the first row.

ExampleRead as JSON with headers
Sheet (optional)when the file is .xls or .xlsx and File Action reads it as JSON

The spreadsheet's sheet to read. Empty reads the first sheet.

ExampleOrders
Range (optional)when the file is .xls or .xlsx and File Action reads it as JSON

Only these cells of the sheet. Empty reads the whole sheet.

ExampleA1:C50
Preview datawhen Import file is on

A button that shows what the row would read, in the editor. It reads files on this computer. A web address is only fetched when the workflow runs, through the profile's browser, so its preview says so instead.

ExampleUnchecked

Every block also has the shared block settings — a description, Disable block and what to do on an error. Fields that take text accept data from earlier blocks.

What it hands on

Writes each row to its variable or table column. It hands nothing on to the next block: {{prevBlockData}} is empty after it.

Example: Record an order in the table and keep its total

  1. Start
  2. Open URL
  3. Get text
  4. Get text
  5. Insert data
Where Insert data sits in the example workflow.
  1. Open the workflow's table and add two columns, orderId and total.
  2. Add a Get text block that reads the order number, tick Assign to variable and name it orderId.
  3. Add a second Get text block that reads the total, assigned to totalText.
  4. Add Insert data and click Insert data (0).
  5. In the first row, keep Variable, type orderTotal as the name and {{variables.totalText}} as the value.
  6. Click Add, switch the row to Table, choose orderId and type {{variables.orderId}}.
  7. Add one more Table row for total with {{variables.totalText}}, then run the workflow.

On WarpX Phone

  • On WarpX Phone a web address in File absolute path/File URL cannot be read: it is fetched by a profile's browser, which a phone run does not have, so the block fails. Use the path of a file on this computer.

Good to know

  • A value that reads as JSON is stored as JSON: 129.90 becomes a number, true a boolean, ["a","b"] a list. Blocks that need text, such as RegEx variable, then refuse it.
  • In a Table row, separate values with || to add several rows in one go: new||pending||paid fills three cells of the column.
  • Each column keeps its own place. A value goes into the next empty cell of its column, so writing to orderId and then total fills the same row.
  • The variable name can hold references, and it takes the same prefixes as any variable: $push:emails appends to a list called emails, and a name starting with $$ is also saved for later runs.
  • The Table list only offers the columns you added in the workflow's table. Add them there first.
  • There is no Export data block. To get the table out of a run, send it on with Google Sheets or HTTP request.
  • To loop over the rows of a CSV or spreadsheet, read it with Read as JSON with headers into a variable, then point Loop data at that variable. Each item is one row, keyed by the header names.

See also

  • Delete data — Empty the table, clear one column, or delete variables.
  • Get text — Read the text of one element or many, and save it to the table or a variable.
  • Loop data — Run the blocks after it once for each row, number, list item or element.
  • Google Sheets — Read rows from a Google Sheet, keep only the ones you want, or write, append and clear cells.