Reimplement n8n

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-02-17 18:37:52 +04:00
parent cfcbc0d7e1
commit 0e8f65c553
13 changed files with 651 additions and 449 deletions

View File

@@ -0,0 +1,57 @@
import type { INodeProperties, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
import { proboConnectApiRequest } from '../../GenericFunctions';
export const description: INodeProperties[] = [
{
displayName: 'User ID',
name: 'userId',
type: 'string',
displayOptions: {
show: {
resource: ['user'],
operation: ['getUser'],
},
},
default: '',
description: 'The ID of the user (profile)',
required: true,
},
];
export async function execute(
this: IExecuteFunctions,
itemIndex: number,
): Promise<INodeExecutionData> {
const userId = this.getNodeParameter('userId', itemIndex) as string;
const query = `
query GetUser($userId: ID!) {
node(id: $userId) {
... on Profile {
id
fullName
emailAddress
source
state
additionalEmailAddresses
kind
position
contractStartDate
contractEndDate
createdAt
updatedAt
identity { id email fullName emailVerified }
organization { id name email }
membership { id role createdAt }
}
}
}
`;
const responseData = await proboConnectApiRequest.call(this, query, { userId });
return {
json: responseData,
pairedItem: { item: itemIndex },
};
}