Skip to content

Send a notification ​

Let people know when something happens: post to a Slack channel, message someone on LINE, or send an email. This guide uses a new CRM record as the example event, but the notification steps work after any trigger.

You'll need: a credential for the service you want to notify through. Each section below says which one.

1. Start the flow from the event ​

  1. Create a flow and click Add trigger.
  2. Open DECA Cloud, choose CRM, then the Record Created event.

The trigger only says which record was created: its recordId, objectId and workspaceId, plus the user who created it. To put the record's details in the message, fetch it:

  1. Click Add Step, open DECA Cloud, choose CRM, then Get Record.
  2. Set Workspace ID, Object ID and Record ID from Current Trigger.

The record's fields are in the step's data. Run the flow once and open the step in Executions to see the field names your object uses.

Only some objects?

Record Created fires for every object in the workspace. To notify only about, say, new companies, add a Path that checks objectId before the notification.

2. Add the notification ​

Pick the service your team reads. Type $ in any text field to insert values from the trigger or the Get Record step.

Slack ​

  1. Click Add Step, open Apps, choose Slack, then Send Message.

  2. Credential: a Slack API Token credential with your Slack app's bot token.

  3. Channel ID: the ID of the channel, such as C0123ABCD. In Slack, open the channel details; the ID is at the bottom. A user ID sends a direct message instead.

  4. Message Text, for example:

    New customer in CRM: Get Record.data.name, added by Current Trigger.user.name

The Slack app must be a member of the channel. If the step fails with not_in_channel, invite the app with /invite @your-app in that channel.

For richer layouts, set Message Type to Blocks and paste Block Kit JSON into Blocks.

LINE ​

  1. Click Add Step, open Apps, choose LINE, then Send Message.
  2. Credential: a LINE Access Token credential with your channel's long-lived channel access token.
  3. To: the LINE user ID or group ID to message. LINE IDs are not the same as display names. They usually come from a LINE event, or from a CRM record that stores the customer's LINE ID.
  4. Message: the text to send.

LINE counts each message against your channel's monthly quota. LINE › Get Quota shows how much is left.

Email ​

  1. Click Add Step, open Built-in, choose Mail, then Send Mail.
  2. Credential: an SMTP credential for your mail server, or an OCS credential to send through a DECA messaging channel.
  3. Fill in To, Subject and Text. Set Format to HTML to send a formatted body.
  4. Optionally add CC, BCC and up to 10 Attachments of 3 MB each. See Work with files.

To send from a Gmail account instead, use Apps › Gmail.

3. Test without notifying everyone ​

Each test run sends a real message. While you build, either point the step at a test channel or your own address, or give it a Sample Payload in Nodes Setting so Run skips it. See Testing while you build.

Then click Publish. CRM events start the published version of a flow.

Notify only when it matters ​

A notification for every event soon gets ignored. Some ways to cut the noise:

  • Add a Path so only important events notify, such as deals over a certain amount.
  • Notify about failures from another flow by putting the notification on its error branch. See Handle errors and retries.
  • Collect events and send one summary a day: save them with a shared variable list, and send the summary from a scheduled flow.