feat(Slack Node): Add option to include link to workflow in Slack node (#6611)
* feat(Slack Node): Add “automated by” message to Slack node’s post message Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> * Pass instanceBaseUrl to node context Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> * Move `includeLinkToWorkflow` to options Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> * keep "includeLinkToWorkflow" hidden * Only append the message for version 2.1 and up Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> --------- Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
@@ -2,11 +2,12 @@ import type _Vue from 'vue';
|
||||
import type { ITelemetrySettings, ITelemetryTrackProperties, IDataObject } from 'n8n-workflow';
|
||||
import type { Route } from 'vue-router';
|
||||
|
||||
import type { INodeCreateElement } from '@/Interface';
|
||||
import type { INodeCreateElement, IUpdateInformation } from '@/Interface';
|
||||
import type { IUserNodesPanelSession } from './telemetry.types';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useRootStore } from '@/stores/n8nRoot.store';
|
||||
import { useTelemetryStore } from '@/stores/telemetry.store';
|
||||
import { SLACK_NODE_TYPE } from '@/constants';
|
||||
|
||||
export class Telemetry {
|
||||
private pageEventQueue: Array<{ route: Route }>;
|
||||
@@ -197,6 +198,23 @@ export class Telemetry {
|
||||
}
|
||||
}
|
||||
|
||||
// We currently do not support tracking directly from within node implementation
|
||||
// so we are using this method as centralized way to track node parameters changes
|
||||
trackNodeParametersValuesChange(nodeType: string, change: IUpdateInformation) {
|
||||
if (this.rudderStack) {
|
||||
switch (nodeType) {
|
||||
case SLACK_NODE_TYPE:
|
||||
if (change.name === 'parameters.includeLinkToWorkflow') {
|
||||
this.track('User toggled n8n reference option');
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private resetNodesPanelSession() {
|
||||
this.userNodesPanelSession.sessionId = `nodes_panel_session_${new Date().valueOf()}`;
|
||||
this.userNodesPanelSession.data = {
|
||||
|
||||
Reference in New Issue
Block a user