mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -08:00
⚡ Now tags are loaded for the user (contactTag:add) (#1267)
This commit is contained in:
parent
f36af0fcfd
commit
0f0e67eb30
|
@ -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: {
|
||||||
|
|
Loading…
Reference in a new issue