description:'Whether to reply to the sender only or to the entire list of recipients',
},
],
},
{
displayName:'Simplify',
name:'simple',
type:'boolean',
displayOptions:{
show:{
operation:['get'],
resource:['message'],
},
},
default:true,
description:'Whether to return a simplified version of the response instead of the raw data',
},
{
displayName:'Options',
name:'options',
type:'collection',
placeholder:'Add Option',
displayOptions:{
show:{
resource:['message'],
operation:['get'],
},
hide:{
simple:[true],
},
},
default:{},
options:[
{
displayName:'Attachment Prefix',
name:'dataPropertyAttachmentsPrefixName',
type:'string',
default:'attachment_',
description:
"Prefix for name of the binary property to which to write the attachment. An index starting with 0 will be added. So if name is 'attachment_' the first attachment is saved to 'attachment_0'.",
},
{
displayName:'Download Attachments',
name:'downloadAttachments',
type:'boolean',
default:false,
description:
"Whether the email's attachments will be downloaded and included in the output",
description:'Whether to return all results or only up to a given limit',
},
{
displayName:'Limit',
name:'limit',
type:'number',
displayOptions:{
show:{
operation:['getAll'],
resource:['message'],
returnAll:[false],
},
},
typeOptions:{
minValue: 1,
maxValue: 500,
},
default:50,
description:'Max number of results to return',
},
{
displayName:'Simplify',
name:'simple',
type:'boolean',
displayOptions:{
show:{
operation:['getAll'],
resource:['message'],
},
},
default:true,
description:'Whether to return a simplified version of the response instead of the raw data',
},
{
displayName:
'Fetching a lot of messages may take a long time. Consider using filters to speed things up',
name:'filtersNotice',
type:'notice',
default:'',
displayOptions:{
show:{
operation:['getAll'],
resource:['message'],
returnAll:[true],
},
},
},
{
displayName:'Filters',
name:'filters',
type:'collection',
placeholder:'Add Filter',
default:{},
displayOptions:{
show:{
operation:['getAll'],
resource:['message'],
},
},
options:[
{
displayName:'Include Spam and Trash',
name:'includeSpamTrash',
type:'boolean',
default:false,
description:'Whether to include messages from SPAM and TRASH in the results',
},
{
displayName:'Label Names or IDs',
name:'labelIds',
type:'multiOptions',
typeOptions:{
loadOptionsMethod:'getLabels',
},
default:[],
description:
'Only return messages with labels that match all of the specified label IDs. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName:'Search',
name:'q',
type:'string',
default:'',
placeholder:'has:attachment',
hint:'Use the same format as in the Gmail search box. <a href="https://support.google.com/mail/answer/7190?hl=en">More info</a>.',
description:'Only return messages matching the specified query',
},
{
displayName:'Read Status',
name:'readStatus',
type:'options',
default:'unread',
hint:'Filter emails by whether they have been read or not',
'Get all emails received after the specified date. In an expression you can set date using string in ISO format or a timestamp in miliseconds.',
},
{
displayName:'Received Before',
name:'receivedBefore',
type:'dateTime',
default:'',
description:
'Get all emails received before the specified date. In an expression you can set date using string in ISO format or a timestamp in miliseconds.',
},
{
displayName:'Sender',
name:'sender',
type:'string',
default:'',
description:'Sender name or email to filter by',
hint:'Enter an email or part of a sender name',
},
],
},
{
displayName:'Options',
name:'options',
type:'collection',
placeholder:'Add Option',
default:{},
displayOptions:{
show:{
operation:['getAll'],
resource:['message'],
},
hide:{
simple:[true],
},
},
options:[
{
displayName:'Attachment Prefix',
name:'dataPropertyAttachmentsPrefixName',
type:'string',
default:'attachment_',
description:
"Prefix for name of the binary property to which to write the attachment. An index starting with 0 will be added. So if name is 'attachment_' the first attachment is saved to 'attachment_0'.",
},
{
displayName:'Download Attachments',
name:'downloadAttachments',
type:'boolean',
default:false,
description:
"Whether the email's attachments will be downloaded and included in the output",