Documentation
¶
Overview ¶
Package n8n implements the n8n workflow automation provider.
Index ¶
- Constants
- type N8N
- func (v *N8N) ActivateWorkflow(id string) error
- func (v *N8N) CreateWorkflow(workflow *Workflow) (*Workflow, error)
- func (v *N8N) DeactivateWorkflow(id string) error
- func (v *N8N) DeleteWorkflow(id string) error
- func (v *N8N) ExecuteWorkflow(id string, data map[string]any) error
- func (v *N8N) GetWorkflow(id string) (*Workflow, error)
- func (v *N8N) ListWorkflows() ([]*Workflow, error)
- func (v *N8N) UpdateWorkflow(id string, workflow *Workflow) (*Workflow, error)
- type Node
- type Tag
- type Workflow
Constants ¶
View Source
const ( ID = "n8n" EndpointKey = "endpoint" ApiKeyKey = "api_key" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type N8N ¶
type N8N struct {
// contains filtered or unexported fields
}
func (*N8N) ActivateWorkflow ¶
ActivateWorkflow activates a workflow
func (*N8N) CreateWorkflow ¶
CreateWorkflow creates a new workflow
func (*N8N) DeactivateWorkflow ¶
DeactivateWorkflow deactivates a workflow
func (*N8N) DeleteWorkflow ¶
DeleteWorkflow deletes a workflow by ID
func (*N8N) ExecuteWorkflow ¶
ExecuteWorkflow executes a workflow via webhook with optional input data
func (*N8N) GetWorkflow ¶
GetWorkflow retrieves a workflow by ID
func (*N8N) ListWorkflows ¶
ListWorkflows retrieves all workflows
type Node ¶
type Node struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
TypeVersion float64 `json:"typeVersion,omitempty"`
Position []float64 `json:"position,omitempty"`
Parameters map[string]any `json:"parameters,omitempty"`
Credentials map[string]any `json:"credentials,omitempty"`
Notes string `json:"notes,omitempty"`
NotesInFlow bool `json:"notesInFlow,omitempty"`
Disabled bool `json:"disabled,omitempty"`
ContinueOnFail bool `json:"continueOnFail,omitempty"`
AlwaysOutputData bool `json:"alwaysOutputData,omitempty"`
ExecuteOnce bool `json:"executeOnce,omitempty"`
RetryOnFail bool `json:"retryOnFail,omitempty"`
MaxTries int `json:"maxTries,omitempty"`
WaitBetweenTries int `json:"waitBetweenTries,omitempty"`
WebhookID string `json:"webhookId,omitempty"`
}
Node represents a node in an n8n workflow
type Tag ¶
type Tag struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
Tag represents a tag in n8n
type Workflow ¶
type Workflow struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Active bool `json:"active,omitempty"`
Nodes []Node `json:"nodes,omitempty"`
Connections map[string]any `json:"connections,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
Settings map[string]any `json:"settings,omitempty"`
StaticData map[string]any `json:"staticData,omitempty"`
Tags []Tag `json:"tags,omitempty"`
TriggerCount int `json:"triggerCount,omitempty"`
}
Workflow represents an n8n workflow
Click to show internal directories.
Click to hide internal directories.