sendGrid.json•11.9 kB
{
"nodeType": "n8n-nodes-base.sendGrid",
"displayName": "SendGrid",
"description": "Consume SendGrid API",
"version": 1,
"properties": [
{
"name": "returnAll",
"displayName": "Return All",
"type": "boolean",
"default": false,
"description": "Whether to return all results or only up to a given limit",
"displayOptions": {
"show": {
"resource": [
"contact"
],
"operation": [
"getAll"
]
}
}
},
{
"name": "limit",
"displayName": "Limit",
"type": "number",
"default": 100,
"description": "Max number of results to return",
"typeOptions": {
"minValue": 1,
"maxValue": 1000
},
"displayOptions": {
"show": {
"resource": [
"contact"
],
"operation": [
"getAll"
],
"returnAll": [
false
]
}
}
},
{
"name": "filters",
"displayName": "Filters",
"type": "collection",
"default": {},
"description": "The query field accepts valid <a href=\"https://sendgrid.com/docs/for-developers/sending-email/segmentation-query-language/\">SGQL</a> for searching for a contact",
"placeholder": "Add Field",
"options": [
{
"name": "query",
"displayName": "Query",
"type": "string",
"default": "",
"description": "The query field accepts valid <a href=\"https://sendgrid.com/docs/for-developers/sending-email/segmentation-query-language/\">SGQL</a> for searching for a contact"
}
],
"displayOptions": {
"show": {
"resource": [
"contact"
],
"operation": [
"getAll"
]
}
}
},
{
"name": "email",
"displayName": "Email",
"type": "string",
"default": "",
"description": "Primary email for the contact",
"placeholder": "name@email.com",
"required": true,
"displayOptions": {
"show": {
"operation": [
"upsert"
],
"resource": [
"contact"
]
}
}
},
{
"name": "additionalFields",
"displayName": "Additional Fields",
"type": "collection",
"default": {},
"description": "Adds a custom field to set also values which have not been predefined",
"placeholder": "Add Field",
"displayOptions": {
"show": {
"resource": [
"contact"
],
"operation": [
"upsert"
]
}
}
},
{
"name": "ids",
"displayName": "Contact IDs",
"type": "string",
"default": "",
"description": "ID of the contact. Multiple can be added separated by comma.",
"displayOptions": {
"show": {
"resource": [
"contact"
],
"operation": [
"delete"
],
"deleteAll": [
false
]
}
}
},
{
"name": "deleteAll",
"displayName": "Delete All",
"type": "boolean",
"default": false,
"description": "Whether all contacts will be deleted",
"displayOptions": {
"show": {
"resource": [
"contact"
],
"operation": [
"delete"
]
}
}
},
{
"name": "by",
"displayName": "By",
"type": "options",
"default": "id",
"description": "Search the user by ID or email",
"required": true,
"options": [
{
"name": "ID",
"value": "id"
},
{
"name": "Email",
"value": "email"
}
],
"displayOptions": {
"show": {
"operation": [
"get"
],
"resource": [
"contact"
]
}
}
},
{
"name": "contactId",
"displayName": "Contact ID",
"type": "string",
"default": "",
"description": "ID of the contact",
"required": true,
"displayOptions": {
"show": {
"operation": [
"get"
],
"resource": [
"contact"
],
"by": [
"id"
]
}
}
},
{
"name": "operation",
"displayName": "Operation",
"type": "options",
"default": "upsert",
"description": "Create a new contact, or update the current one if it already exists (upsert)",
"options": [
{
"name": "Create or Update",
"value": "upsert",
"description": "Create a new contact, or update the current one if it already exists (upsert)"
},
{
"name": "Delete",
"value": "delete",
"description": "Delete a contact"
},
{
"name": "Get",
"value": "get",
"description": "Get a contact by ID"
},
{
"name": "Get Many",
"value": "getAll",
"description": "Get many contacts"
}
],
"displayOptions": {
"show": {
"resource": [
"contact"
]
}
}
},
{
"name": "name",
"displayName": "Name",
"type": "string",
"default": "",
"description": "Name of the list",
"required": true,
"displayOptions": {
"show": {
"operation": [
"create"
],
"resource": [
"list"
]
}
}
},
{
"name": "listId",
"displayName": "List ID",
"type": "string",
"default": "",
"description": "ID of the list",
"required": true,
"displayOptions": {
"show": {
"operation": [
"delete"
],
"resource": [
"list"
]
}
}
},
{
"name": "deleteContacts",
"displayName": "Delete Contacts",
"type": "boolean",
"default": false,
"description": "Whether to delete all contacts on the list",
"displayOptions": {
"show": {
"operation": [
"delete"
],
"resource": [
"list"
]
}
}
},
{
"name": "contactSample",
"displayName": "Contact Sample",
"type": "boolean",
"default": false,
"description": "Whether to return the contact sample",
"displayOptions": {
"show": {
"operation": [
"get"
],
"resource": [
"list"
]
}
}
},
{
"name": "fromEmail",
"displayName": "Sender Email",
"type": "string",
"default": "",
"description": "Email address of the sender of the email",
"placeholder": "sender@domain.com",
"displayOptions": {
"show": {
"resource": [
"mail"
],
"operation": [
"send"
]
}
}
},
{
"name": "fromName",
"displayName": "Sender Name",
"type": "string",
"default": "",
"description": "Name of the sender of the email",
"placeholder": "John Smith",
"displayOptions": {
"show": {
"resource": [
"mail"
],
"operation": [
"send"
]
}
}
},
{
"name": "toEmail",
"displayName": "Recipient Email",
"type": "string",
"default": "",
"description": "Comma-separated list of recipient email addresses",
"placeholder": "recipient@domain.com",
"displayOptions": {
"show": {
"resource": [
"mail"
],
"operation": [
"send"
]
}
}
},
{
"name": "subject",
"displayName": "Subject",
"type": "string",
"default": "",
"description": "Subject of the email to send",
"displayOptions": {
"show": {
"resource": [
"mail"
],
"operation": [
"send"
],
"dynamicTemplate": [
false
]
}
}
},
{
"name": "dynamicTemplate",
"displayName": "Dynamic Template",
"type": "boolean",
"default": false,
"description": "Whether this email will contain a dynamic template",
"required": true,
"displayOptions": {
"show": {
"resource": [
"mail"
],
"operation": [
"send"
]
}
}
},
{
"name": "contentType",
"displayName": "MIME Type",
"type": "options",
"default": "text/plain",
"description": "MIME type of the email to send",
"options": [
{
"name": "Plain Text",
"value": "text/plain"
},
{
"name": "HTML",
"value": "text/html"
}
],
"displayOptions": {
"show": {
"resource": [
"mail"
],
"operation": [
"send"
],
"dynamicTemplate": [
false
]
}
}
},
{
"name": "contentValue",
"displayName": "Message Body",
"type": "string",
"default": "",
"description": "Message body of the email to send",
"required": true,
"displayOptions": {
"show": {
"resource": [
"mail"
],
"operation": [
"send"
],
"dynamicTemplate": [
false
]
}
}
},
{
"name": "templateId",
"displayName": "Template Name or ID",
"type": "options",
"default": [],
"description": "Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>",
"displayOptions": {
"show": {
"resource": [
"mail"
],
"operation": [
"send"
],
"dynamicTemplate": [
true
]
}
}
},
{
"name": "dynamicTemplateFields",
"displayName": "Dynamic Template Fields",
"type": "fixedCollection",
"default": {},
"description": "Key of the dynamic template field",
"placeholder": "Add Dynamic Template Fields",
"typeOptions": {
"multipleValues": true
},
"displayOptions": {
"show": {
"resource": [
"mail"
],
"operation": [
"send"
],
"dynamicTemplate": [
true
]
}
}
},
{
"name": "resource",
"displayName": "Resource",
"type": "options",
"default": "list",
"required": true,
"options": [
{
"name": "Contact",
"value": "contact"
},
{
"name": "List",
"value": "list"
},
{
"name": "Mail",
"value": "mail"
}
]
}
],
"credentialsConfig": [
{
"name": "sendGridApi",
"required": true
},
{
"name": "resource",
"required": false
}
],
"io": {
"inputs": [
"Main"
],
"outputs": [
"Main"
],
"outputNames": [],
"hints": {}
},
"wiring": {
"role": "generic",
"requires": [],
"optional": [],
"consumedBy": [],
"consumes": [
"Main"
],
"produces": [
"Main"
]
}
}