mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
⚡ Add StatusCallback parameter - Twilio (#2801)
* ⚡ Add StatusCallback parameter * ⚡ Fix type Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
parent
66acaade29
commit
f43a38951c
|
@ -151,10 +151,25 @@ export class Twilio implements INodeType {
|
||||||
},
|
},
|
||||||
description: 'The message to send',
|
description: 'The message to send',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Options',
|
||||||
|
name: 'options',
|
||||||
|
type: 'collection',
|
||||||
|
placeholder: 'Add Field',
|
||||||
|
default: {},
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
displayName: 'Status Callback',
|
||||||
|
name: 'statusCallback',
|
||||||
|
type: 'string',
|
||||||
|
default: '',
|
||||||
|
description: 'Status Callbacks allow you to receive events related to the REST resources managed by Twilio: Rooms, Recordings and Compositions',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||||
const items = this.getInputData();
|
const items = this.getInputData();
|
||||||
const returnData: IDataObject[] = [];
|
const returnData: IDataObject[] = [];
|
||||||
|
@ -192,6 +207,7 @@ export class Twilio implements INodeType {
|
||||||
body.From = this.getNodeParameter('from', i) as string;
|
body.From = this.getNodeParameter('from', i) as string;
|
||||||
body.To = this.getNodeParameter('to', i) as string;
|
body.To = this.getNodeParameter('to', i) as string;
|
||||||
body.Body = this.getNodeParameter('message', i) as string;
|
body.Body = this.getNodeParameter('message', i) as string;
|
||||||
|
body.StatusCallback = this.getNodeParameter('options.statusCallback', i, '') as string;
|
||||||
|
|
||||||
const toWhatsapp = this.getNodeParameter('toWhatsapp', i) as boolean;
|
const toWhatsapp = this.getNodeParameter('toWhatsapp', i) as boolean;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue