Apps Script data type translation table
When configuring the new AppSheet Apps Script Task, you can pass data from the AppSheet app to the function arguments using Expressions.
The table below summarizes the type translation of an argument that gets passed through an AppSheet task.
AppSheet Data Type
Apps Script Data Type when passed
Example
String (in ISO 8601 date format)
AppSheet expression: DATETIME("12/20/2020 7PM)"
Apps Script value: "2022-12-25T19:00:00"
Array<Value>
AppSheet expression: REF_ROWS("My Table", "TaskID")
Apps Script value: ["taskId1", "taskId2", "taskId3"]
AppSheet expression: LIST("a", "b", "c")
Apps Script value: ["a", "b", "c"]
AppSheet expression: {"a", {"b", "c"}}
Apps Script value: ["a", ["b", "c"]]
All other types
String
AppSheet expression: "Hello"
Apps Script value: "Hello"
AppSheet expression: TIME("15:14")
Apps Script value: "3:14pm"
AppSheet expression: HYPERLINK("https://www.google.com", "Google")
Apps Script value: "https://www.google.com"
Tips
- For date types, you can go
new Date(dateString)to convert the date string into a native Javascript Type object - Most types are represented in their respective string format which will vary on the type. For example, a file type will return the path of the file in the provider and an email type will simply be the email as a string.