Hi!
First of all: I am using n8n on the cloud, and I am new here.
I have written a workflow that listens to a webhook for my Slack Commands, and verifies the signature.
From this workflow I’d like to “switch” and execute other workflows depending on what command was sent.
- Is it possible to use the Execute Workflow on the cloud app?
- How is it supposed to work?
- How do I test run it? Do both workflow have to be in test mode or can the initial one be activated in production whereas it triggers other workflows in test mode?
My other option would be to create a unique workflow and webhook url for each command, but that would mean that I have to copy paste Slack signature verification stuff into each flow.
Thanks for any insight and other suggestions!
/Einar
Please share the workflow
{
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": ***REDACTED***,
"responseMode": "responseNode",
"options": {
"rawBody": true
}
},
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
380,
420
],
"webhookId": ***REDACTED***
},
{
"parameters": {
"action": "hmac",
"type": "SHA256",
"value": "=v0:{{$node[\"Webhook\"].json[\"headers\"][\"x-slack-request-timestamp\"]}}:{{$node[\"Move Binary Data\"].json[\"raw_data\"]}}",
"dataPropertyName": "my_signature",
"secret": ***REDACTED***
},
"name": "Crypto",
"type": "n8n-nodes-base.crypto",
"typeVersion": 1,
"position": [
980,
420
]
},
{
"parameters": {
"setAllData": false,
"destinationKey": "raw_data",
"options": {}
},
"name": "Move Binary Data",
"type": "n8n-nodes-base.moveBinaryData",
"typeVersion": 1,
"position": [
800,
420
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$node[\"Webhook\"].json[\"headers\"][\"x-slack-signature\"]}}",
"value2": "=v0={{$node[\"Crypto\"].json[\"my_signature\"]}}"
}
]
}
},
"name": "IF",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
1160,
420
]
},
{
"parameters": {
"errorMessage": "Invalid signature!"
},
"name": "Stop And Error",
"type": "n8n-nodes-base.stopAndError",
"typeVersion": 1,
"position": [
1380,
580
]
},
{
"parameters": {
"respondWith": "text",
"responseBody": "=You wrote: {{$node[\"Webhook\"].json[\"body\"][\"command\"]}} {{$json[\"body\"][\"text\"]}}",
"options": {}
},
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
600,
420
]
},
{
"parameters": {
"source": "url",
"workflowUrl": ***REDACTED***
},
"name": "Execute Workflow",
"type": "n8n-nodes-base.executeWorkflow",
"typeVersion": 1,
"position": [
1380,
360
]
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Crypto": {
"main": [
[
{
"node": "IF",
"type": "main",
"index": 0
}
]
]
},
"Move Binary Data": {
"main": [
[
{
"node": "Crypto",
"type": "main",
"index": 0
}
]
]
},
"IF": {
"main": [
[
{
"node": "Execute Workflow",
"type": "main",
"index": 0
}
],
[
{
"node": "Stop And Error",
"type": "main",
"index": 0
}
]
]
},
"Respond to Webhook": {
"main": [
[
{
"node": "Move Binary Data",
"type": "main",
"index": 0
}
]
]
}
}
}





