mirror of
https://github.com/n8n-io/n8n.git
synced 2024-10-08 19:00:28 +03:00
✨ Add backend expression support for credentials
This commit is contained in:
parent
7365309346
commit
1719fd5b76
@ -403,7 +403,13 @@ export async function getCredentials(workflow: Workflow, node: INode, type: stri
|
||||
} as ICredentialsExpressionResolveValues;
|
||||
}
|
||||
|
||||
const name = node.credentials[type];
|
||||
let name = node.credentials[type];
|
||||
|
||||
if (name.charAt(0) === '=') {
|
||||
// If the credential name is an expression resolve it
|
||||
const additionalKeys = getAdditionalKeys(additionalData)
|
||||
name = workflow.expression.getParameterValue(name, runExecutionData || null, runIndex || 0, itemIndex || 0, node.name, connectionInputData || [], mode, additionalKeys) as string;
|
||||
}
|
||||
|
||||
const decryptedDataObject = await additionalData.credentialsHelper.getDecrypted(name, type, mode, false, expressionResolveValues);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user