mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Now tags are loaded for the user (contactTag:add) (#1267)
This commit is contained in:
@@ -298,6 +298,19 @@ export class ActiveCampaign implements INodeType {
|
|||||||
}
|
}
|
||||||
return returnData;
|
return returnData;
|
||||||
},
|
},
|
||||||
|
// Get all the available tags to display them to user so that he can
|
||||||
|
// select them easily
|
||||||
|
async getTags(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||||
|
const returnData: INodePropertyOptions[] = [];
|
||||||
|
const { tags } = await activeCampaignApiRequest.call(this, 'GET', '/api/3/tags', {});
|
||||||
|
for (const tag of tags) {
|
||||||
|
returnData.push({
|
||||||
|
name: tag.tag,
|
||||||
|
value: tag.id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return returnData;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,10 @@ export const contactTagFields = [
|
|||||||
{
|
{
|
||||||
displayName: 'Tag ID',
|
displayName: 'Tag ID',
|
||||||
name: 'tagId',
|
name: 'tagId',
|
||||||
type: 'number',
|
type: 'options',
|
||||||
|
typeOptions: {
|
||||||
|
loadOptionsMethod: 'getTags',
|
||||||
|
},
|
||||||
default: '',
|
default: '',
|
||||||
required: true,
|
required: true,
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
|
|||||||
Reference in New Issue
Block a user