Trusted by 250,000+ developers from startups to Fortune 500 companies:
This is a pre-built, open source component from Pipedream's GitHub repo. The component is 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.
New Companies on Intercom
Description:Emit new event each time a new company is added.
Version:0.0.2
Key:intercom-new-company
import common from "../common.mjs";
export default {
...common,
key: "intercom-new-company",
name: "New Companies",
description: "Emit new event each time a new company is added.",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
...common.methods,
generateMeta({
id, name, created_at: createdAt,
}) {
return {
id,
summary: name,
ts: createdAt,
};
},
},
async run() {
let lastCompanyCreatedAt = this._getLastUpdate();
const companies = await this.intercom.getCompanies(lastCompanyCreatedAt);
for (const company of companies) {
if (company.created_at > lastCompanyCreatedAt)
lastCompanyCreatedAt = company.created_at;
const meta = this.generateMeta(company);
this.$emit(company, meta);
}
this._setLastUpdate(lastCompanyCreatedAt);
},
};
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.
Label | Prop | Type | Description |
---|
Intercom | intercom | app | This component uses the Intercom app. |
N/A | db | $.service.db | This component uses $.service.db to maintain state between component invocations. |
Polling Interval | timer | $.interface.timer | Pipedream will poll the API on this schedule
|
Intercom uses OAuth authentication. When you connect your Intercom account, Pipedream will open a popup window where you can sign into Intercom and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Intercom API.
Pipedream requests the following authorization scopes when you connect your account:
Customer messaging platform