mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-28 05:59:42 -08:00
b5b60008d6
* 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>
45 lines
829 B
TypeScript
45 lines
829 B
TypeScript
import {
|
|
IAuthenticateBearer,
|
|
IAuthenticateQueryAuth,
|
|
ICredentialTestRequest,
|
|
ICredentialType,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export class SlackApi implements ICredentialType {
|
|
name = 'slackApi';
|
|
displayName = 'Slack API';
|
|
documentationUrl = 'slack';
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'Access Token',
|
|
name: 'accessToken',
|
|
type: 'string',
|
|
default: '',
|
|
required: true,
|
|
},
|
|
];
|
|
authenticate: IAuthenticateBearer = {
|
|
type: 'bearer',
|
|
properties: {
|
|
tokenPropertyName: 'accessToken',
|
|
},
|
|
};
|
|
test: ICredentialTestRequest = {
|
|
request: {
|
|
baseURL: 'https://slack.com',
|
|
url: '/api/users.profile.get',
|
|
},
|
|
rules: [
|
|
{
|
|
type: 'responseSuccessBody',
|
|
properties: {
|
|
key: 'ok',
|
|
value: false,
|
|
message: 'Invalid access token',
|
|
},
|
|
},
|
|
],
|
|
};
|
|
}
|