Skip to content

Gong - Get Extensive Data Action #16106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions components/gong/actions/get-extensive-data/get-extensive-data.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import app from "../../gong.app.mjs";
import constants from "../../common/constants.mjs";

export default {
key: "gong-get-extensive-data",
name: "Get Extensive Data",
description: "Lists detailed call data. [See the documentation](https://us-66463.app.gong.io/settings/api/documentation#post-/v2/calls/extensive)",
version: "0.0.1",
type: "action",
props: {
app,
fromDateTime: {
propDefinition: [
app,
"fromDateTime",
],
optional: true,
},
toDateTime: {
propDefinition: [
app,
"toDateTime",
],
optional: true,
},
workspaceId: {
optional: true,
propDefinition: [
app,
"workspaceId",
],
},
callIds: {
propDefinition: [
app,
"callIds",
],
},
primaryUserIds: {
type: "string[]",
label: "Primary User IDs",
description: "An optional list of user identifiers, if supplied the API will return only the calls hosted by the specified users. The identifiers in this field match the primaryUserId field of the calls.",
propDefinition: [
app,
"userId",
],
optional: true,
},
maxResults: {
type: "integer",
label: "Max Results",
description: "The maximum number or results to return",
default: constants.DEFAULT_MAX,
optional: true,
},
},
methods: {
getExtensiveData(args = {}) {
return this.app.post({
path: "/calls/extensive",
...args,
});
},
},
async run({ $ }) {
const {
app,
getExtensiveData,
maxResults,
...filter
} = this;

const calls = await app.paginate({
resourceFn: getExtensiveData,
resourceFnArgs: {
$,
data: {
filter,
},
},
resourceName: "calls",
max: maxResults,
});

if (calls?.length) {
$.export("$summary", `Successfully retrieved data for ${calls.length} calls`);
}
return calls;
},
};
2 changes: 1 addition & 1 deletion components/gong/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/gong",
"version": "0.1.2",
"version": "0.2.0",
"description": "Pipedream Gong Components",
"main": "gong.app.mjs",
"keywords": [
Expand Down
17 changes: 7 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading