Skip to content

Conversation

@saurabh-featherhq
Copy link
Contributor

…… (#1)

  • feat: add create workflow execution functionality with parameters and API integration

  • feat: update Feather node options and enhance create workflow execution to conditionally include forwardingPhoneNumber

  • fix: update TypeScript version specification and format JSON files for consistency

  • fix: change default value of forwardingPhoneNumber parameter to null for better handling of optional input

#1)

* feat: add create workflow execution functionality with parameters and API integration

* feat: update Feather node options and enhance create workflow execution to conditionally include forwardingPhoneNumber

* fix: update TypeScript version specification and format JSON files for consistency

* fix: change default value of forwardingPhoneNumber parameter to null for better handling of optional input
@saurabh-featherhq saurabh-featherhq merged commit e36bad9 into main Oct 8, 2025
1 check passed
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Summary

This PR introduces a new "Create Workflow Execution" operation to the Feather n8n node, enabling users to programmatically trigger workflow executions through the Feather API. The implementation adds a comprehensive form interface with required fields (workflowId, customerLeadId, primaryPhone) and optional fields (zipcode, state, forwardingPhoneNumber) along with flexible JSON-based metadata and variables support.

The changes follow n8n's established patterns by creating separate description and execution files for the new operation. The main node file is updated to include the new operation in alphabetical order alongside existing operations like "Cancel Workflow Execution", "Create Agent Workflow", "Dispatch Phone Call", and "Get Workflows". The implementation includes proper error handling for JSON parsing, conditional parameter inclusion, and comprehensive logging for debugging purposes.

Additionally, the PR includes minor maintenance improvements such as formatting package.json for better readability and updating the TypeScript version from exact (5.9.2) to flexible versioning (^5.9.2) to allow for patch and minor updates within the 5.9.x range.

Important Files Changed

Changed Files
Filename Score Overview
nodes/Feather/operations/createWorkflowExecution.description.ts 5/5 New file defining comprehensive UI form configuration for workflow execution parameters
nodes/Feather/operations/createWorkflowExecution.ts 4/5 New operation implementation with parameter validation, JSON parsing, and API integration
nodes/Feather/Feather.node.ts 4/5 Main node file updated to include new operation with proper imports and alphabetical ordering
package.json 5/5 Minor formatting improvements and TypeScript version update for better maintainability

Confidence score: 4/5

  • This PR is generally safe to merge with the new functionality well-implemented following established patterns
  • Score reflects solid implementation with proper error handling, though some debugging code should be cleaned up
  • Pay close attention to nodes/Feather/operations/createWorkflowExecution.ts for console.log statements that should be removed before production

Sequence Diagram

sequenceDiagram
    participant User
    participant "n8n Workflow"
    participant "Feather Node"
    participant "Feather API"

    User->>+"n8n Workflow": "Trigger workflow with Feather node"
    "n8n Workflow"->>+"Feather Node": "Execute createWorkflowExecution operation"
    
    "Feather Node"->>+"Feather Node": "Get node parameters (workflowId, customerLeadId, etc.)"
    "Feather Node"->>+"Feather Node": "Build request body with parameters and metadata"
    "Feather Node"->>+"Feather Node": "Parse JSON variables and additional metadata"
    
    "Feather Node"->>+"Feather API": "POST /api/v1/workflow/{workflowId}/execution"
    "Feather API"-->>-"Feather Node": "Return execution response"
    
    "Feather Node"-->>-"n8n Workflow": "Return execution data"
    "n8n Workflow"-->>-User: "Workflow execution completed"
Loading

4 files reviewed, 5 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +108 to +109
} else if (operation === 'createWorkflowExecution') {
returnData.push(await executeCreateWorkflowExecution.call(this, i, baseURL));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Missing credentials parameter in executeCreateWorkflowExecution call - other operations like getWorkflows and dispatchPhoneCall pass credentials as the third parameter

baseURL: string,
): Promise<INodeExecutionData> {
try {
console.log('Starting workflow execution creation...');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Remove console.log statements in production code

Comment on lines +32 to +37
const body: Record<string, unknown> = {
customerLeadId,
primaryPhone,
zipcode,
state,
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Including null values in API payload might cause issues - consider excluding null fields entirely

Suggested change
const body: Record<string, unknown> = {
customerLeadId,
primaryPhone,
zipcode,
state,
};
const body: Record<string, unknown> = {
customerLeadId,
primaryPhone,
};
// Only include optional fields if they have values
if (zipcode) {
body.zipcode = zipcode;
}
if (state) {
body.state = state;
}

};

// Only include forwardingPhoneNumber if it's provided
if (forwardingPhoneNumber) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Inconsistent handling - empty strings are falsy and won't be included, but null values in zipcode/state are included in payload


body.metadata = metadata;

console.log('Preparing API request with execution data:', JSON.stringify(body, null, 2));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Remove console.log statements in production code

@saurabh-featherhq saurabh-featherhq deleted the master branch October 8, 2025 18:50
saurabh-featherhq added a commit that referenced this pull request Oct 8, 2025
* feat: add create workflow execution functionality with parameters and… (#1) (#3)

* feat: add create workflow execution functionality with parameters and API integration

* feat: update Feather node options and enhance create workflow execution to conditionally include forwardingPhoneNumber

* fix: update TypeScript version specification and format JSON files for consistency

* fix: change default value of forwardingPhoneNumber parameter to null for better handling of optional input

Co-authored-by: Arijit Roy <[email protected]>

* pointing CI to main branch

---------

Co-authored-by: Saurabh Jain <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants