Insert data
Set variables and add values to the workflow's table, several at once.
In both apps
WarpX Browser
WarpX 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}}.
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.
ExampleVariable | 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
.jsonfile is parsed). Read as base64 gives adata:URL. For a.csv,.xlsor.xlsxfile, 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
- Start
- Open URL
- Get text
- Get text
- Insert data
- Open the workflow's table and add two columns,
orderIdandtotal. - Add a Get text block that reads the order number, tick Assign to variable and name it
orderId. - Add a second Get text block that reads the total, assigned to
totalText. - Add Insert data and click Insert data (0).
- In the first row, keep Variable, type
orderTotalas the name and{{variables.totalText}}as the value. - Click Add, switch the row to Table, choose
orderIdand type{{variables.orderId}}. - Add one more Table row for
totalwith{{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.90becomes a number,truea 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||paidfills 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
orderIdand thentotalfills the same row. - The variable name can hold references, and it takes the same prefixes as any variable:
$push:emailsappends to a list calledemails, 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.