At the execution of this sample, the detailed summary of all the new opportunities lost in CapsuleCRM within a particular day will be sent as a Slack channel message.
- CapsuleCRM account
- Slack account
- Visit Capsule CRM and create a Capsule CRM account.
- Obtain tokens by following this guide
- Create a Slack account.
- Visit https://slack.com/get-started#/createnew and create a Slack account.
- Obtain Slack User OAuth Token.
- Visit https://api.slack.com/apps and create a Slack App.
- In the
Add features and functionality
section, ClickPermissions
. - Go to the
Scopes
section and add necessary OAuth scopes inUser Token Scopes
section. (For example: "channels:history", "channels:read", "channels:write", "chat:write", "emoji:read", files:read", "files:write", "groups:read", "reactions:read", "users:read", "users:read.email") - Go back to
Basic Information
section of your Slack App. Then go toInstall your app
section and install the app to the workspace by clickingInstall to Workspace
button. - Get your User OAuth token starting with
xoxp-
from theOAuth & Permissions
section in App settings of your Slack App.
Create a file called Config.toml
at the root of the project.
[<ORG_NAME>.capsulecrm_opportunities_lost_to_slack_channel_message]
channelName= "<SLACK_CHANNEL_NAME>"
[<ORG_NAME>.capsulecrm_opportunities_lost_to_slack_channel_message.capsulecrmAuthConfig]
token = "<CAPSULECRM_ACCESS_TOKEN>"
[<ORG_NAME>.capsulecrm_opportunities_lost_to_slack_channel_message.slackAuthConfig]
token = "<SLACK_USER_OAUTH_TOKEN>"
- Obtain the
channelName
. - The
channelName
is the name of the Slack channel. - Once you obtained all configurations, Create
Config.toml
in root directory. - Replace the necessary fields in the
Config.toml
file with your data.
Run the Ballerina project created by the integration sample by executing bal run
from the root.
The detailed summary of all the new opportunities lost in CapsuleCRM within a particular day will be sent as a Slack channel message.