description:'Whether all fields should be sent to Airtable or only specific ones',
},
{
displayName:'Fields',
name:'fields',
type:'string',
typeOptions:{
multipleValues: true,
multipleValueButtonText:'Add Field',
},
requiresDataPath:'single',
displayOptions:{
show:{
addAllFields:[false],
operation:['append'],
},
},
default:[],
placeholder:'Name',
required: true,
description:'The name of fields for which data should be sent to Airtable',
},
// ----------------------------------
// delete
// ----------------------------------
{
displayName:'ID',
name:'id',
type:'string',
displayOptions:{
show:{
operation:['delete'],
},
},
default:'',
required: true,
description:'ID of the record to delete',
},
// ----------------------------------
// list
// ----------------------------------
{
displayName:'Return All',
name:'returnAll',
type:'boolean',
displayOptions:{
show:{
operation:['list'],
},
},
default:true,
description:'Whether to return all results or only up to a given limit',
},
{
displayName:'Limit',
name:'limit',
type:'number',
displayOptions:{
show:{
operation:['list'],
returnAll:[false],
},
},
typeOptions:{
minValue: 1,
maxValue: 100,
},
default:100,
description:'Max number of results to return',
},
{
displayName:'Download Attachments',
name:'downloadAttachments',
type:'boolean',
displayOptions:{
show:{
operation:['list'],
},
},
default:false,
description:"Whether the attachment fields define in 'Download Fields' will be downloaded",
},
{
displayName:'Download Fields',
name:'downloadFieldNames',
type:'string',
required: true,
requiresDataPath:'multiple',
displayOptions:{
show:{
operation:['list'],
downloadAttachments:[true],
},
},
default:'',
description:
"Name of the fields of type 'attachment' that should be downloaded. Multiple ones can be defined separated by comma. Case sensitive and cannot include spaces after a comma.",
},
{
displayName:'Additional Options',
name:'additionalOptions',
type:'collection',
displayOptions:{
show:{
operation:['list'],
},
},
default:{},
description:'Additional options which decide which records should be returned',
placeholder:'Add Option',
options:[
{
displayName:'Fields',
name:'fields',
type:'string',
requiresDataPath:'single',
typeOptions:{
multipleValues: true,
multipleValueButtonText:'Add Field',
},
default:[],
placeholder:'Name',
description:
'Only data for fields whose names are in this list will be included in the records',
},
{
displayName:'Filter By Formula',
name:'filterByFormula',
type:'string',
default:'',
placeholder:"NOT({Name} = '')",
description:
'A formula used to filter records. The formula will be evaluated for each record, and if the result is not 0, false, "", NaN, [], or #Error! the record will be included in the response.',
},
{
displayName:'Sort',
name:'sort',
placeholder:'Add Sort Rule',
description:'Defines how the returned records should be ordered',
type:'fixedCollection',
typeOptions:{
multipleValues: true,
},
default:{},
options:[
{
name:'property',
displayName:'Property',
values:[
{
displayName:'Field',
name:'field',
type:'string',
default:'',
description:'Name of the field to sort on',
},
{
displayName:'Direction',
name:'direction',
type:'options',
options:[
{
name:'ASC',
value:'asc',
description:'Sort in ascending order (small -> large)',
},
{
name:'DESC',
value:'desc',
description:'Sort in descending order (large -> small)',
},
],
default:'asc',
description:'The sort direction',
},
],
},
],
},
{
displayName:'View',
name:'view',
type:'string',
default:'',
placeholder:'All Stories',
description:
'The name or ID of a view in the Stories table. If set, only the records in that view will be returned. The records will be sorted according to the order of the view.',
},
],
},
// ----------------------------------
// read
// ----------------------------------
{
displayName:'ID',
name:'id',
type:'string',
displayOptions:{
show:{
operation:['read'],
},
},
default:'',
required: true,
description:'ID of the record to return',
},
// ----------------------------------
// update
// ----------------------------------
{
displayName:'ID',
name:'id',
type:'string',
displayOptions:{
show:{
operation:['update'],
},
},
default:'',
required: true,
description:'ID of the record to update',
},
{
displayName:'Update All Fields',
name:'updateAllFields',
type:'boolean',
displayOptions:{
show:{
operation:['update'],
},
},
default:true,
description:'Whether all fields should be sent to Airtable or only specific ones',
},
{
displayName:'Fields',
name:'fields',
type:'string',
typeOptions:{
multipleValues: true,
multipleValueButtonText:'Add Field',
},
requiresDataPath:'single',
displayOptions:{
show:{
updateAllFields:[false],
operation:['update'],
},
},
default:[],
placeholder:'Name',
required: true,
description:'The name of fields for which data should be sent to Airtable',
},
// ----------------------------------
// append + delete + update
// ----------------------------------
{
displayName:'Options',
name:'options',
type:'collection',
placeholder:'Add Option',
displayOptions:{
show:{
operation:['append','delete','update'],
},
},
default:{},
options:[
{
displayName:'Bulk Size',
name:'bulkSize',
type:'number',
typeOptions:{
minValue: 1,
maxValue: 10,
},
default:10,
description:'Number of records to process at once',
},
{
displayName:'Ignore Fields',
name:'ignoreFields',
type:'string',
requiresDataPath:'multiple',
displayOptions:{
show:{
'/operation':['update'],
'/updateAllFields':[true],
},
},
default:'',
description:'Comma-separated list of fields to ignore',
},
{
displayName:'Typecast',
name:'typecast',
type:'boolean',
displayOptions:{
show:{
'/operation':['append','update'],
},
},
default:false,
description:
'Whether the Airtable API should attempt mapping of string values for linked records & select options',