Table
Table is a fundamental data type in Monkedo, designed for handling and manipulating tabular data in automations. Each table consists of Rows and Columns, as shown below.
Rows are numbered starting from 1, similar to list positions, and can be accessed from the end of the table using negative numbers. For instance, -1 indicates the last row, -2 the second-to-last row, and so forth.
Columns in tables have distinct names and types, and each column can be accessed by name. Column names can contain any characters such as lower and upper case characters, numbers, spaces and special characters. For example, all of these are valid column names: "fullname", "fullName", "Full Name", "fulname 2", "full_name"
Tables can contain any number of rows and columns, including none at all (an Empty Table). They can be created manually, read from spreadsheet files, or generated by components. For example, you can use the Example Values 3 component under Action > Miscellaneous to create an example table and explore table operations.
Table Components
Section titled Table ComponentsMonkedo offers various components for creating, modifying, and managing tables under the Action > Table Operations category. Since most table data is typically imported from files, components for reading and writing tables from/to files are available in the Action > File category.
With tables organized by rows, columns, and cells, youβll find components tailored for getting, setting, and managing each of these table elements.
Creating Tables
Section titled Creating TablesTables in Monkedo can be created through several methods: from files, apps, or manually.
Create Table From File
Section titled Create Table From FileThe Create Table From File component, listed under File actions, reads the contents of a spreadsheet file and outputs it as a Table into the automation.
The first input is the file type, supporting both CSV and XLSX files. CSV is widely used for exporting and transferring tabular data, and if your file is not in CSV or XLSX format, most spreadsheet programs allow exporting in CSV.
The second input, Has Header Row, specifies whether the first row contains column names. Select Yes if your first row contains column names.
Google Sheets - Get Values
Section titled Google Sheets - Get ValuesThe Get Values component of Google Sheets reads the contents of a Google Sheets file.
Important Note: Google Sheets stores all data as text, so any numbers or dates will be in text format. Conversion components listed below can convert these to the correct types.
Microsoft Excel - Get Values
Section titled Microsoft Excel - Get ValuesThe Get Values component for Microsoft Excel reads the contents of a Microsoft Excel file stored in the cloud.
Important Note: This component cannot read files from your local computer; they must be on Microsoftβs cloud.
Create Table
Section titled Create TableThe Create Table component under Action > Table Operations lets you create a table with specified columns. An example is shown below with some example columns.
Specify the initial number of rows using the Rows input, which you can leave empty or set to 0 if no initial rows are needed. You can later add rows during automation.
List to Table Conversion
Section titled List to Table ConversionWhen you get records from an app, they will be provided as a list of records (entities) where each record have the same fields as others and only the values change from record to record. For example, a todo list with 2 items are provided as below from Todoist (an app). (Not entire data is visible due to large number of fields)
You can convert List of Entities to Tables to export or use them by using the Convert to Table component under Action > List Operations category as shown below.
And the result from the app will be converted to a table with 2 rows as shown below. (Not all columns are visible due to large number of fields)
Saving Tables
Section titled Saving TablesYou can save a table as an XLSX or CSV file by using the Create File From Table component under Actions > File category.
Row Operations
Section titled Row OperationsYou can access, modify, and delete rows by their positions within a table.
Get Row
Section titled Get RowThis component retrieves a table row by position, with negative values allowing access from the end of the table. An example to access second row of a table is shown below. The table is provided by the Example Values 3 component and the table value (an example user table) can be viewed at the top of this article.
If you notice, the output of this component is an Entity. Whenever you access a row from a table, Monkedo will provide it as an Entity value that contains both column names and corresponding values in the row as shown below.
Get Range
Section titled Get RangeThe Get Range component gets a subset of table rows between specified start and end positions. It is helpful for fetching specific rows, such as the first ten rows of a table.
Add Row
Section titled Add RowAdd Row component inserts a new row at any specified position (e.g., the start, end, or a specific row). It does not remove rows; adding a row in the middle shifts other rows accordingly.
An important detail to note is that the Row input is an Entity. If you look at the Get Row component, the table row is given as an Entity. Similarly you need to provide an Entity to add a new row. Usually when working with tables, the row data already be in an Entity format but if it is not, you can use the Entity components to create one.
Set Row
Section titled Set RowSet Row component updates a table row at a specified position, creating the row if it does not already exist.
Remove Row By Position
Section titled Remove Row By PositionRemove Row By Position component removes a row at a specific position, reducing the row count by shifting remaining rows to fill the gap.
Column Operations
Section titled Column OperationsIndividual columns can be accessed, modified, or deleted by name.
Get Column
Section titled Get ColumnGet Column gets a column by name. For example, accessing the "name" column of the table:
The output is a list of column values:
Add Column
Section titled Add ColumnAdd Column component adds a new column to the table, optionally initialized with a specific value. If omitted, cells remain empty and can be populated later.
Set Column
Section titled Set ColumnSet Column column sets an entire column at once, creating the column if it does not exist. While previous Add Column component adds an empty column, Set Column assigns values immediately, using a List input for column data.
Cell Operations
Section titled Cell OperationsIndividual cells can be accessed or modified by specifying their row and column.
Set Cell
Section titled Set CellSet Cell component allows modification of a specific cell by its row and column:
Getting Cell Value
Section titled Getting Cell ValueTo get a cell value, use Expressions as shown in the later sections of this article.
Table Operations
Section titled Table OperationsYou can sort, filter, and perform other operations on tables.
Filter Table
Section titled Filter TableThe Filter Table component creates a new table with rows meeting specified criteria.
Sort Table
Section titled Sort TableThe Sort Table component sorts a table by one or more columns in ascending or descending order.
Convert Table to HTML
Section titled Convert Table to HTMLConvert Table to HTML component formats a table for use in emails or web pages. HTML is a markup language used in web pages and emails to place rich content such as tables. Raw HTML output is not human-friendly but once it is used in an email or web page, the email client or the web browser will show a properly formatted table.
Converting Columns
Section titled Converting ColumnsWhen tables from files or apps contain only text values, you can use conversion components to adjust columns to the correct data type. For example, when you get table data from a CSV file or some apps like Google Sheets, all the data (including numbers and dates) will be provided in Text type. In this case, use these components to get correct type. The type conversion is only needed when you want to manipulate or do calculations on this data. If you plan to use them as is (for example directly placing in a text body or providing as a Text input to a component), there is no need for conversion.
Convert Column to Number
Section titled Convert Column to NumberThis component changes a text-based column to a Number type.
Convert Column to Date
Section titled Convert Column to DateThis component changes a text-based column to Date format. Specify the original date format for accurate conversion.
Convert Column to Yes/No
Section titled Convert Column to Yes/NoThis component converts a text-based column to a Yes/No type.
Expressions
Section titled ExpressionsExpressions enable direct access to specific table values in component inputs. When you click +Expression on an input, the expression box appears.
If a table value is connected to the input, clicking the expression box opens a menu for the table value.
As tables have rows, columns, and cells, they offer various Expression options.
Accessing a Row
Section titled Accessing a RowIn the option menu, click the caret at the right side of the Rows option to list all rows. Select a row, or specify a custom row number by selecting the special option at the top. Negative numbers can be used to access rows from the end.
Similar to Get Row component, the selected row is provided as an Entity.
Accessing a Column
Section titled Accessing a ColumnIn the option menu, click the caret at the right side of the Columns option to list all columns. Select a column or specify a custom name using the special option at the top.
Similar to Get Column component, the selected column is provided as a List.
Accessing a Cell
Section titled Accessing a CellExpand Rows in the option menu by clicking the caret to list rows. Then, click the caret at the right side of a row to list columns. Then, pick a column from that rowβs data.
Note: The same can also be achived by selecting the column first and then selecting a row number.
Iteration
Section titled IterationWhen you need to process each row in a table individually, you can use the Iterate Table component from the Flow Control category. This component sequentially outputs each table row, running for each row in the table until the end. The Iterate Table component is invaluable for automations that perform repetitive actions on each row in a table.