← Slack + Clearbit integrations

Company Name to Domain with Clearbit API on New Direct Message (Instant) from Slack API

Pipedream makes it easy to connect APIs for Clearbit, Slack and 1000+ other apps remarkably fast.

Trigger workflow on
New Direct Message (Instant) from the Slack API
Next, do this
Company Name to Domain with the Clearbit API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜

Trusted by 500,000+ developers from startups to Fortune 500 companies

Adyen logo
Brex logo
Carta logo
Checkr logo
Chameleon logo
DevRev logo
LinkedIn logo
Netflix logo
New Relic logo
OnDeck logo
Replicated logo
Scale AI logo
Teamwork logo
Warner Bros. logo
Xendit logo

Developers Pipedream

Getting Started

This integration creates a workflow with a Slack trigger and Clearbit action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Direct Message (Instant) trigger
    1. Connect your Slack account
    2. Configure slackApphook
    3. Optional- Configure Ignore Bots
  3. Configure the Company Name to Domain action
    1. Connect your Clearbit account
    2. Configure Company Name
    3. Optional- Configure Handle lack of records found as an error?
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Emit new event when a message was posted in a direct message channel
Version:1.0.8
Key:slack-new-direct-message

Slack Overview

With the Slack API, you can build all sorts of integrations and applications to
make your work life easier. Here are just a few examples:

  • Automate posting updates to your team channel
  • Create a bot to answer common questions
  • Integrate with your existing tools and services
  • Build a custom dashboard to track your team's progress
  • Create a bot to handle scheduling and meeting requests
  • And much more!

Trigger Code

import common from "../common/base.mjs";

export default {
  ...common,
  key: "slack-new-direct-message",
  name: "New Direct Message (Instant)",
  version: "1.0.8",
  description: "Emit new event when a message was posted in a direct message channel",
  type: "source",
  dedupe: "unique",
  props: {
    ...common.props,
    // eslint-disable-next-line pipedream/props-description,pipedream/props-label
    slackApphook: {
      type: "$.interface.apphook",
      appProp: "slack",
      async eventNames() {
        return [
          "message.im",
        ];
      },
    },
    ignoreBot: {
      propDefinition: [
        common.props.slack,
        "ignoreBot",
      ],
    },
  },
  methods: {
    ...common.methods,
    getSummary() {
      return "New direct message received";
    },
    processEvent(event) {
      if (event.user == this.slack.mySlackId()) {
        return;
      }
      if ((this.ignoreBot) && (event.subtype == "bot_message" || event.bot_id)) {
        return;
      }
      return event;
    },
  },
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
SlackslackappThis component uses the Slack app.
N/AnameCache$.service.dbThis component uses $.service.db to maintain state between executions.
slackApphook$.interface.apphook
Ignore BotsignoreBotboolean

Ignore messages from bots

Trigger Authentication

Slack uses OAuth authentication. When you connect your Slack account, Pipedream will open a popup window where you can sign into Slack and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Slack API.

Pipedream requests the following authorization scopes when you connect your account:

bookmarks:writecalls:readcalls:writechannels:historychannels:readchannels:writednd:readdnd:writeemoji:readfiles:readgroups:historygroups:readgroups:writeim:historyim:readim:writelinks:readlinks:writempim:historympim:readmpim:writepins:readpins:writereactions:readreactions:writereminders:readreminders:writeremote_files:readremote_files:sharestars:readstars:writeteam:readusergroups:readusergroups:writeusers:readusers:read.emailusers:writechat:write:botchat:write:usercommandsfiles:write:userusers.profile:writeusers.profile:readsearch:read

About Slack

Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.

Action

Description:The Company Name to Domain action lets you convert the exact name of a company to a website domain, and a logo. [See the docs here](https://dashboard.clearbit.com/docs?javascript#name-to-domain-api).
Version:0.2.0
Key:clearbit-company-name-to-domain

Clearbit Overview

Clearbit provides APIs that allow you to retrieve information about companies
and people. This information can be used to build applications that perform
functions such as identifying potential customers, conducting due diligence, or
fraud prevention.

Action Code

import app from "../../clearbit.app.mjs";

export default {
  key: "clearbit-company-name-to-domain",
  name: "Company Name to Domain",
  description: "The Company Name to Domain action lets you convert the exact name of a company to a website domain, and a logo. [See the docs here](https://dashboard.clearbit.com/docs?javascript#name-to-domain-api).",
  version: "0.2.0",
  type: "action",
  props: {
    app,
    companyName: {
      propDefinition: [
        app,
        "companyName",
      ],
    },
    errorIfNoRecords: {
      propDefinition: [
        app,
        "errorIfNoRecords",
      ],
    },
  },
  async run({ $ }) {
    try {
      const res = await this.app.companyNameToDomain($, this.companyName);
      $.export("$summary", "Successfully converted company name to domain.");
      return res;
    } catch (err) {
      if (!this.errorIfNoRecords && err.response?.status == 404) {
        $.export("$summary", "No domain found.");
      } else {
        throw err;
      }
    }
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
ClearbitappappThis component uses the Clearbit app.
Company NamecompanyNamestring

The name of the company.

Handle lack of records found as an error?errorIfNoRecordsboolean

Defaults to false. If false and no records are found, the step will still be considered a success. If true and no records are found, the step will return an error and workflow execution will stop.

Action Authentication

Clearbit uses API keys for authentication. When you connect your Clearbit account, Pipedream securely stores the keys so you can easily authenticate to Clearbit APIs in both code and no-code steps.

Copy your "secret API key" from your Clearbit account here and paste it below.

About Clearbit

B2B Lead Data Enrichment, Qualification & Scoring

More Ways to Connect Clearbit + Slack

Company Name to Domain with Clearbit API on New Message In Channels from Slack API
Slack + Clearbit
 
Try it
Domain lookup with Clearbit API on New Message In Channels from Slack API
Slack + Clearbit
 
Try it
Find Companies with Clearbit API on New Message In Channels from Slack API
Slack + Clearbit
 
Try it
Email lookup with Clearbit API on New Message In Channels from Slack API
Slack + Clearbit
 
Try it
Find Contacts with Clearbit API on New Message In Channels from Slack API
Slack + Clearbit
 
Try it
New Message In Channels (Instant) from the Slack API

Emit new event when a new message is posted to one or more channels

 
Try it
New Direct Message (Instant) from the Slack API

Emit new event when a message was posted in a direct message channel

 
Try it
New Mention (Instant) from the Slack API

Emit new event when a username or specific keyword is mentioned in a channel

 
Try it
New Reaction Added (Instant) from the Slack API

Emit new event when a member has added an emoji reaction to a message

 
Try it
New Star Added (Instant) from the Slack API

Emit new event when a star is added to an item

 
Try it
Send Message to a Public Channel with the Slack API

Send a message to a public channel and customize the name and avatar of the bot that posts the message. See postMessage or scheduleMessage docs here

 
Try it
Send Message to a Private Channel with the Slack API

Send a message to a private channel and customize the name and avatar of the bot that posts the message. See postMessage or scheduleMessage docs here

 
Try it
Send a Direct Message with the Slack API

Send a direct message to a single user. See postMessage or scheduleMessage docs here

 
Try it
Send Message Using Block Kit with the Slack API

Send a message using Slack's Block Kit UI framework to a channel, group or user. See postMessage or scheduleMessage docs here

 
Try it
Reply to a Message Thread with the Slack API

Send a message as a threaded reply. See postMessage or scheduleMessage docs here

 
Try it