mirror of
https://github.com/n8n-io/n8n-docs.git
synced 2025-11-20 17:48:34 +00:00
Fix code indentation in choose-node-method.md (#2840)
Co-authored-by: Nick Veitch <nick.veitch@n8n.io>
This commit is contained in:
parent
f41038d0bf
commit
c1cd0ca152
@ -51,36 +51,36 @@ export class FriendGrid implements INodeType {
|
||||
. . .
|
||||
},
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'contact',
|
||||
],
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'contact',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: 'Create a contact',
|
||||
},
|
||||
],
|
||||
default: 'create',
|
||||
description: 'The operation to perform.',
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: 'Create a contact',
|
||||
},
|
||||
],
|
||||
default: 'create',
|
||||
description: 'The operation to perform.',
|
||||
},
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
. . .
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
// Sets up optional fields
|
||||
},
|
||||
],
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
. . .
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
// Sets up optional fields
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
@ -139,21 +139,21 @@ export class FriendGrid implements INodeType {
|
||||
. . .
|
||||
// Set up the basic request configuration
|
||||
requestDefaults: {
|
||||
baseURL: 'https://api.sendgrid.com/v3/marketing'
|
||||
baseURL: 'https://api.sendgrid.com/v3/marketing'
|
||||
},
|
||||
properties: [
|
||||
{
|
||||
{
|
||||
displayName: 'Resource',
|
||||
. . .
|
||||
},
|
||||
{
|
||||
},
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'contact',
|
||||
'contact',
|
||||
],
|
||||
},
|
||||
},
|
||||
@ -164,41 +164,41 @@ export class FriendGrid implements INodeType {
|
||||
description: 'Create a contact',
|
||||
// Add the routing object
|
||||
routing: {
|
||||
request: {
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: '=/contacts',
|
||||
send: {
|
||||
type: 'body',
|
||||
properties: {
|
||||
type: 'body',
|
||||
properties: {
|
||||
email: {{$parameter["email"]}}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// Handle the response to contact creation
|
||||
output: {
|
||||
postReceive: [
|
||||
postReceive: [
|
||||
{
|
||||
type: 'set',
|
||||
properties: {
|
||||
type: 'set',
|
||||
properties: {
|
||||
value: '={{ { "success": $response } }}'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
default: 'create',
|
||||
description: 'The operation to perform.',
|
||||
},
|
||||
{
|
||||
},
|
||||
{
|
||||
displayName: 'Email',
|
||||
. . .
|
||||
},
|
||||
{
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
// Sets up optional fields
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
// No execute method needed
|
||||
|
||||
Loading…
Reference in New Issue
Block a user