mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 05:23:08 +00:00
feat: Add workflow activation/deactivation via diff operations
Implements workflow activation and deactivation as diff operations in n8n_update_partial_workflow tool, following the pattern of other configuration operations. Changes: - Add activateWorkflow/deactivateWorkflow API methods - Add operation types to diff engine - Update tool documentation - Remove activation limitation Resolves #399 Credits: ArtemisAI, cmj-hub for investigation and initial implementation Conceived by Romuald Członkowski - www.aiadvisors.pl/en
This commit is contained in:
@@ -170,6 +170,24 @@ export class N8nApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
async activateWorkflow(id: string): Promise<Workflow> {
|
||||
try {
|
||||
const response = await this.client.post(`/workflows/${id}/activate`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw handleN8nApiError(error);
|
||||
}
|
||||
}
|
||||
|
||||
async deactivateWorkflow(id: string): Promise<Workflow> {
|
||||
try {
|
||||
const response = await this.client.post(`/workflows/${id}/deactivate`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
throw handleN8nApiError(error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists workflows from n8n instance.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user