Developer & DevOps

Execute Server Commands via Webhook with Conditional Responses

34 nodes 309 129 Webhook
Download

Workflow Description

A workflow that receives webhook requests, executes SSH commands on your servers based on conditional logic, processes results dynamically through switch and filter nodes, and returns reliable responses to the client with error handling.

How it works

  1. 1.Receive webhook request and parse incoming data parameters
  2. 2.Evaluate conditional logic to determine the correct execution path
  3. 3.Execute SSH commands on the target server and capture output
  4. 4.Route responses based on success or failure using switch nodes
  5. 5.Send the operation result or error message back to the client

Use cases

  • Manage production and development environments remotely without manual SSH access
  • Trigger maintenance scripts, backups, or deployments based on external events
  • Automate infrastructure operations across multiple servers from a single entry point

Requirements

  • Valid and encrypted SSH credentials for the target server
  • An accessible webhook endpoint that the client can reach

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

Ssh

Details

Trigger Webhook
Nodes 34
Apps 1
Views 309
Downloads 129

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (34)

/

If

If

#1

Parametrs

Set

#2

API

Webhook

#3

422-Invalid server domain

Webhook

#4

Code1

Code

#5

SSH

Ssh

#6

Container Actions

Switch

#7

Service Actions

Switch

#8

Container Stats

Switch

#9

API answer

Webhook

#10

Inspect

Set

#11

Stat

Set

#12

Start

Set

#13

Stop

Set

#14

Test Connection1

Set

#15

Deploy

Set

#16

Suspend

Set

#17

Terminated

Set

#18

Unsuspend

Set

#19

Mount Disk

Set

#20

Unmount Disk

Set

#21

Log

Set

#22

ChangePackage

Set

#23

Sticky Note

Sticky Note

#24

n8n

Switch

#25

Version

Set

#26

Users

Set

#27

Change Password

Set

#28

If1

If

#29

nginx

Set

#30

Deploy-docker-compose

Set

#31

GET ACL

Set

#32

SET ACL

Set

#33

GET NET

Set

#34