277 lines
7.0 KiB
JSON
277 lines
7.0 KiB
JSON
{
|
|
"name": "Slack",
|
|
"key": "slack",
|
|
"iconUrl": "{BASE_URL}/apps/slack/assets/favicon.svg",
|
|
"docUrl": "https://automatisch.io/docs/slack",
|
|
"authDocUrl": "https://automatisch.io/docs/connections/slack",
|
|
"primaryColor": "2DAAE1",
|
|
"supportsConnections": true,
|
|
"fields": [
|
|
{
|
|
"key": "accessToken",
|
|
"label": "Access Token",
|
|
"type": "string",
|
|
"required": true,
|
|
"readOnly": false,
|
|
"value": null,
|
|
"placeholder": null,
|
|
"description": "Access token of slack that Automatisch will connect to.",
|
|
"clickToCopy": false
|
|
}
|
|
],
|
|
"authenticationSteps": [
|
|
{
|
|
"step": 1,
|
|
"type": "mutation",
|
|
"name": "createConnection",
|
|
"arguments": [
|
|
{
|
|
"name": "key",
|
|
"value": "{key}"
|
|
},
|
|
{
|
|
"name": "formattedData",
|
|
"value": null,
|
|
"properties": [
|
|
{
|
|
"name": "accessToken",
|
|
"value": "{fields.accessToken}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"step": 2,
|
|
"type": "mutation",
|
|
"name": "verifyConnection",
|
|
"arguments": [
|
|
{
|
|
"name": "id",
|
|
"value": "{createConnection.id}"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"reconnectionSteps": [
|
|
{
|
|
"step": 1,
|
|
"type": "mutation",
|
|
"name": "resetConnection",
|
|
"arguments": [
|
|
{
|
|
"name": "id",
|
|
"value": "{connection.id}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"step": 2,
|
|
"type": "mutation",
|
|
"name": "updateConnection",
|
|
"arguments": [
|
|
{
|
|
"name": "id",
|
|
"value": "{connection.id}"
|
|
},
|
|
{
|
|
"name": "formattedData",
|
|
"value": null,
|
|
"properties": [
|
|
{
|
|
"name": "accessToken",
|
|
"value": "{fields.accessToken}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"step": 3,
|
|
"type": "mutation",
|
|
"name": "verifyConnection",
|
|
"arguments": [
|
|
{
|
|
"name": "id",
|
|
"value": "{connection.id}"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"triggers": [
|
|
{
|
|
"name": "New message posted to a channel",
|
|
"key": "newMessageToChannel",
|
|
"description": "Triggers when a new message is posted to a channel",
|
|
"substeps": [
|
|
{
|
|
"key": "chooseConnection",
|
|
"name": "Choose connection"
|
|
},
|
|
{
|
|
"key": "chooseTrigger",
|
|
"name": "Set up a trigger",
|
|
"arguments": [
|
|
{
|
|
"label": "Channel",
|
|
"key": "channel",
|
|
"type": "dropdown",
|
|
"required": true,
|
|
"variables": false,
|
|
"source": {
|
|
"type": "query",
|
|
"name": "getData",
|
|
"arguments": [
|
|
{
|
|
"name": "key",
|
|
"value": "listChannels"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"label": "Trigger for Bot Messages?",
|
|
"key": "triggerForBotMessages",
|
|
"type": "dropdown",
|
|
"description": "Should this flow trigger for bot messages?",
|
|
"required": true,
|
|
"value": true,
|
|
"variables": false,
|
|
"options": [
|
|
{
|
|
"label": "Yes",
|
|
"value": true
|
|
},
|
|
{
|
|
"label": "No",
|
|
"value": false
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"key": "testStep",
|
|
"name": "Test trigger"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"actions": [
|
|
{
|
|
"name": "Send a message to channel",
|
|
"key": "sendMessageToChannel",
|
|
"description": "Send a message to a specific channel you specify.",
|
|
"substeps": [
|
|
{
|
|
"key": "chooseConnection",
|
|
"name": "Choose connection"
|
|
},
|
|
{
|
|
"key": "setupAction",
|
|
"name": "Set up action",
|
|
"arguments": [
|
|
{
|
|
"label": "Channel",
|
|
"key": "channel",
|
|
"type": "dropdown",
|
|
"required": true,
|
|
"description": "Pick a channel to send the message to.",
|
|
"variables": false,
|
|
"source": {
|
|
"type": "query",
|
|
"name": "getData",
|
|
"arguments": [
|
|
{
|
|
"name": "key",
|
|
"value": "listChannels"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"label": "Message text",
|
|
"key": "message",
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "The content of your new message.",
|
|
"variables": true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"key": "testStep",
|
|
"name": "Test action"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Find message",
|
|
"key": "findMessage",
|
|
"description": "Find a Slack message using the Slack Search feature.",
|
|
"substeps": [
|
|
{
|
|
"key": "chooseConnection",
|
|
"name": "Choose connection"
|
|
},
|
|
{
|
|
"key": "setupAction",
|
|
"name": "Set up action",
|
|
"arguments": [
|
|
{
|
|
"label": "Search Query",
|
|
"key": "query",
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "Search query to use for finding matching messages. See the Slack Search Documentation for more information on constructing a query.",
|
|
"variables": true
|
|
},
|
|
{
|
|
"label": "Sort by",
|
|
"key": "sortBy",
|
|
"type": "dropdown",
|
|
"description": "Sort messages by their match strength or by their date. Default is score.",
|
|
"required": true,
|
|
"value": "score",
|
|
"variables": false,
|
|
"options": [
|
|
{
|
|
"label": "Match strength",
|
|
"value": "score"
|
|
},
|
|
{
|
|
"label": "Message date time",
|
|
"value": "timestamp"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"label": "Sort direction",
|
|
"key": "sortDirection",
|
|
"type": "dropdown",
|
|
"description": "Sort matching messages in ascending or descending order. Default is descending.",
|
|
"required": true,
|
|
"value": "desc",
|
|
"variables": false,
|
|
"options": [
|
|
{
|
|
"label": "Descending (newest or best match first)",
|
|
"value": "desc"
|
|
},
|
|
{
|
|
"label": "Ascending (oldest or worst match first)",
|
|
"value": "asc"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"key": "testStep",
|
|
"name": "Test action"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|