mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(Slack Node): Add blocks to slack message update (#2182)
* Adding blocks to slack message update * Fixing lint * Adding blocks to slack message update * Fixing lint * ⚡ added toggle to display json inputs in update operation * ⚡ Improvements * feat(Markdown Node): Add new node to covert between Markdown <> HTML (#1728) * ✨ Markdown Node * Tweaked wording * ⬆️ Bump showdown to latest version * ⚡ Small improvement * 👕 Fix linting issue * ⚡ Small improvements * 🔨 added options, added continue on fail, some clean up * ⚡ removed test code * ⚡ added missing semicolumn * 🔨 wip * 🔨 replaced library for converting html to markdown, added options * ⚡ lock file fix * 🔨 clean up Co-authored-by: sirdavidoff <1670123+sirdavidoff@users.noreply.github.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com> Co-authored-by: Ricardo Espinoza <ricardo@n8n.io> Co-authored-by: sirdavidoff <1670123+sirdavidoff@users.noreply.github.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
|
||||
import { Credentials, NodeExecuteFunctions } from 'n8n-core';
|
||||
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { get } from 'lodash';
|
||||
import { NodeVersionedType } from 'n8n-nodes-base';
|
||||
|
||||
import {
|
||||
@@ -633,8 +634,10 @@ export class CredentialsHelper extends ICredentialsHelper {
|
||||
mode,
|
||||
);
|
||||
|
||||
let response: INodeExecutionData[][] | null | undefined;
|
||||
|
||||
try {
|
||||
await routingNode.runNode(
|
||||
response = await routingNode.runNode(
|
||||
inputData,
|
||||
runIndex,
|
||||
nodeTypeCopy,
|
||||
@@ -683,6 +686,24 @@ export class CredentialsHelper extends ICredentialsHelper {
|
||||
};
|
||||
}
|
||||
|
||||
if (
|
||||
credentialTestFunction.testRequest.rules &&
|
||||
Array.isArray(credentialTestFunction.testRequest.rules)
|
||||
) {
|
||||
// Special testing rules are defined so check all in order
|
||||
for (const rule of credentialTestFunction.testRequest.rules) {
|
||||
if (rule.type === 'responseSuccessBody') {
|
||||
const responseData = response![0][0].json;
|
||||
if (get(responseData, rule.properties.key) === rule.properties.value) {
|
||||
return {
|
||||
status: 'Error',
|
||||
message: rule.properties.message,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
status: 'OK',
|
||||
message: 'Connection successful!',
|
||||
|
||||
Reference in New Issue
Block a user