how do I get the start time and end time of a workflow exercise and send it to slack?
Example message:
start: 37 minutes and 9 seconds
end: 37 minutes and 14 seconds
how do I get the start time and end time of a workflow exercise and send it to slack?
Example message:
start: 37 minutes and 9 seconds
end: 37 minutes and 14 seconds
Check the example below:
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"functionCode": "return [{ json: { start: new Date().toISOString() } }]\n"
},
"name": "Function",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
480,
300
],
"notesInFlow": true,
"notes": "Get Start"
},
{
"parameters": {},
"name": "NoOp",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
750,
300
],
"notesInFlow": true,
"notes": "Do Your Thing"
},
{
"parameters": {
"functionCode": "return [{ json: { end: new Date().toISOString() } }]\n"
},
"name": "Function1",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
1000,
300
],
"notesInFlow": true,
"notes": "Get End"
},
{
"parameters": {
"attachments": [],
"otherOptions": {}
},
"name": "Slack",
"type": "n8n-nodes-base.slack",
"typeVersion": 1,
"position": [
1240,
300
]
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "Function",
"type": "main",
"index": 0
}
]
]
},
"Function": {
"main": [
[
{
"node": "NoOp",
"type": "main",
"index": 0
}
]
]
},
"NoOp": {
"main": [
[
{
"node": "Function1",
"type": "main",
"index": 0
}
]
]
},
"Function1": {
"main": [
[
{
"node": "Slack",
"type": "main",
"index": 0
}
]
]
}
}
}