mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 11:49:59 +00:00
fix(HubSpot Node): Fix issue with contact lists not working (#5582)
This commit is contained in:
@@ -86,7 +86,7 @@ export const contactListFields: INodeProperties[] = [
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'List to Add From',
|
||||
displayName: 'List to Add To',
|
||||
name: 'listId',
|
||||
type: 'number',
|
||||
required: true,
|
||||
|
||||
@@ -1152,7 +1152,6 @@ export class HubspotV2 implements INodeType {
|
||||
`/contacts/v1/lists/${listId}/add`,
|
||||
body,
|
||||
);
|
||||
returnData.push.apply(returnData, responseData as INodeExecutionData[]);
|
||||
}
|
||||
//https://legacydocs.hubspot.com/docs/methods/lists/remove_contact_from_list
|
||||
if (operation === 'remove') {
|
||||
@@ -1168,8 +1167,12 @@ export class HubspotV2 implements INodeType {
|
||||
`/contacts/v1/lists/${listId}/remove`,
|
||||
body,
|
||||
);
|
||||
returnData.push.apply(returnData, responseData as INodeExecutionData[]);
|
||||
}
|
||||
const executionData = this.helpers.constructExecutionMetaData(
|
||||
this.helpers.returnJsonArray(responseData as IDataObject[]),
|
||||
{ itemData: { item: 0 } },
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
returnData.push({ json: { error: (error as JsonObject).message } });
|
||||
|
||||
Reference in New Issue
Block a user