description:'Space resource name, in the form "spaces/*". Example: spaces/AAAAMpdlehY. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.',
description:'Whether to pass the message object as JSON',
},
{
displayName:'Message',
name:'messageUi',
type:'collection',
required: true,
placeholder:'Add Message',
displayOptions:{
show:{
resource:[
'message',
],
operation:[
'create',
],
jsonParameters:[
false,
],
},
},
default:{},
options:[
{
displayName:'Text',
name:'text',
type:'string',
default:'',
},
// { // TODO: get cards from the UI (check the Slack node, specifically the blocks parameter under message: post)
// displayName: 'Cards',
// name: 'cards',
// placeholder: 'Add Cards',
// type: 'fixedCollection',
// default: '',
// typeOptions: {
// multipleValues: true,
// },
// description: 'Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images',
// options: [
// {
// name: 'metadataValues',
// displayName: 'Metadata',
// values: [
// {
// displayName: 'Name',
// name: 'name',
// type: 'string',
// default: '',
// description: 'Name of the card',
// },
// {
// displayName: 'Header',
// name: 'header',
// type: 'json',
// default: '',
// description: 'Header of the card',
// },
// {
// displayName: 'Sections',
// name: 'sections',
// type: 'json',
// default: '',
// description: 'Sections of the card',
// },
// {
// displayName: 'Actions',
// name: 'cardActions',
// type: 'json',
// default: '',
// description: 'Actions of the card',
// },
// ],
// },
// ],
// },
],
},
{
displayName:'See <a href="https://developers.google.com/chat/reference/rest/v1/spaces.messages#Message" target="_blank">Google Chat Guide</a> To Creating Messages',
name:'jsonNotice',
type:'notice',
displayOptions:{
show:{
resource:[
'message',
],
operation:[
'create',
],
jsonParameters:[
true,
],
},
},
default:'',
},
{
displayName:'Message (JSON)',
name:'messageJson',
type:'json',
required: true,
typeOptions:{
alwaysOpenEditWindow: true,
},
displayOptions:{
show:{
resource:[
'message',
],
operation:[
'create',
],
jsonParameters:[
true,
],
},
},
default:'',
description:'Message input as JSON Object or JSON String',
},
{
displayName:'Additional Fields',
name:'additionalFields',
type:'collection',
placeholder:'Add Field',
default:{},
displayOptions:{
show:{
resource:[
'message',
],
operation:[
'create',
],
},
},
options:[
// {
// displayName: 'Thread Key',
// name: 'threadKey',
// type: 'string',
// default: '',
// description: 'Thread identifier which groups messages into a single thread. Has no effect if thread field, corresponding to an existing thread, is set in message. Example: spaces/AAAAMpdlehY/threads/MZ8fXhZXGkk.',
// },
{
displayName:'Request ID',
name:'requestId',
type:'string',
default:'',
description:'A unique request ID for this message. If a message has already been created in the space with this request ID, the subsequent request will return the existing message and no new message will be created.',