Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "trustpilot-fetch-product-review-by-id",
name: "Fetch Product Review by ID",
description: "Retrieves detailed information about a specific product review on Trustpilot. Use this action to get comprehensive data about a single product review, including customer feedback, star rating, review text, and metadata. Perfect for analyzing individual customer experiences, responding to specific feedback, or integrating review data into your customer service workflows. [See the documentation](https://developers.trustpilot.com/product-reviews-api#get-private-product-review)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
trustpilot,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "trustpilot-fetch-product-reviews",
name: "Fetch Product Reviews",
description: "Retrieves a list of product reviews for a specific business unit on Trustpilot. This action enables you to fetch multiple product reviews with powerful filtering options including star ratings, language, tags, and sorting preferences. Ideal for monitoring product feedback trends, generating reports, analyzing customer sentiment across your product catalog, or building review dashboards. Supports pagination for handling large review volumes. [See the documentation](https://developers.trustpilot.com/product-reviews-api#get-private-product-reviews)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
trustpilot,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "trustpilot-fetch-service-review-by-id",
name: "Fetch Service Review by ID",
description: "Retrieves detailed information about a specific service review for your business on Trustpilot. Use this action to access comprehensive data about an individual service review, including the customer's rating, review content, date, and any responses. Essential for customer service teams to analyze specific feedback, track review history, or integrate individual review data into CRM systems and support tickets. [See the documentation](https://developers.trustpilot.com/business-units-api#get-business-unit-review)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
trustpilot,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "trustpilot-fetch-service-reviews",
name: "Fetch Service Reviews",
description: "Fetches service reviews for a specific business unit from Trustpilot with support for filtering by star rating, tags, language, and more. [See the documentation](https://developers.trustpilot.com/business-units-api#get-business-unit-reviews)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
trustpilot,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import trustpilot from "../../trustpilot.app.mjs";
import { ConfigurationError } from "@pipedream/platform";
import trustpilot from "../../trustpilot.app.mjs";

export default {
key: "trustpilot-reply-to-product-review",
name: "Reply to Product Review",
description: "Posts a public reply to a product review on Trustpilot on behalf of your business. This action allows you to respond to customer feedback, address concerns, thank customers for positive reviews, or provide additional information about products. Replies help demonstrate your commitment to customer satisfaction and can improve your overall reputation. Note that replies are publicly visible and cannot be edited once posted. [See the documentation](https://developers.trustpilot.com/product-reviews-api#reply-to-product-review)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
trustpilot,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import trustpilot from "../../trustpilot.app.mjs";
import { ConfigurationError } from "@pipedream/platform";
import trustpilot from "../../trustpilot.app.mjs";

export default {
key: "trustpilot-reply-to-service-review",
name: "Reply to Service Review",
description: "Posts a public reply to a service review on Trustpilot on behalf of your business. This action enables you to engage with customers who have reviewed your services, allowing you to address complaints, clarify misunderstandings, express gratitude for positive feedback, or provide updates on how you're improving based on their input. Professional responses to reviews can significantly impact your business reputation and show potential customers that you value feedback. Remember that all replies are permanent and publicly visible. [See the documentation](https://developers.trustpilot.com/business-units-api#reply-to-review)",
version: "0.0.1",
version: "0.0.2",
type: "action",
props: {
trustpilot,
Expand Down
2 changes: 1 addition & 1 deletion components/trustpilot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/trustpilot",
"version": "0.1.0",
"version": "0.1.1",
"description": "Pipedream Trustpilot Components",
"main": "trustpilot.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import common from "../common/polling.mjs";
import {
SOURCE_TYPES, SORT_OPTIONS,
SORT_OPTIONS,
SOURCE_TYPES,
} from "../../common/constants.mjs";
import common from "../common/polling.mjs";

export default {
...common,
key: "trustpilot-new-conversations",
name: "New Conversations",
description: "Emit new event when a new conversation is started on Trustpilot. This source periodically polls the Trustpilot API to detect new customer-business conversations. Each event contains conversation details including participants, subject, business unit, and creation timestamp. Useful for tracking customer inquiries, support requests, and maintaining real-time communication with customers.",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import common from "../common/polling.mjs";
import {
SOURCE_TYPES, SORT_OPTIONS,
SORT_OPTIONS,
SOURCE_TYPES,
} from "../../common/constants.mjs";
import common from "../common/polling.mjs";

export default {
...common,
key: "trustpilot-new-product-review-replies",
name: "New Product Review Replies",
description: "Emit new event when a business replies to a product review on Trustpilot. This source periodically polls the Trustpilot API to detect new replies to product reviews. Each event includes the reply text, creation timestamp, and associated review details (product name, star rating, consumer info). Ideal for monitoring business responses to customer feedback, tracking customer service performance, and ensuring timely engagement with product reviews.",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import common from "../common/polling.mjs";
import {
SOURCE_TYPES, SORT_OPTIONS,
SORT_OPTIONS,
SOURCE_TYPES,
} from "../../common/constants.mjs";
import common from "../common/polling.mjs";

export default {
...common,
key: "trustpilot-new-product-reviews",
name: "New Product Reviews",
description: "Emit new event when a customer posts a new product review on Trustpilot. This source periodically polls the Trustpilot API to detect new product reviews. Each event contains the complete review data including star rating, review text, product information, consumer details, and timestamps. Perfect for monitoring product feedback, analyzing customer satisfaction trends, and triggering automated responses or alerts for specific products.",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import common from "../common/polling.mjs";
import {
SOURCE_TYPES, SORT_OPTIONS,
SORT_OPTIONS,
SOURCE_TYPES,
} from "../../common/constants.mjs";
import common from "../common/polling.mjs";

export default {
...common,
key: "trustpilot-new-service-review-replies",
name: "New Service Review Replies",
description: "Emit new event when a business replies to a service review on Trustpilot. This source periodically polls the Trustpilot API to detect new replies to service reviews. Each event includes the reply text, creation timestamp, and associated review details (star rating, review title, consumer info). Essential for tracking business engagement with customer feedback, monitoring response times, and ensuring all service reviews receive appropriate attention.",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import common from "../common/polling.mjs";
import {
SOURCE_TYPES, SORT_OPTIONS,
SORT_OPTIONS,
SOURCE_TYPES,
} from "../../common/constants.mjs";
import common from "../common/polling.mjs";

export default {
...common,
key: "trustpilot-new-service-reviews",
name: "New Service Reviews",
description: "Emit new event when a customer posts a new service review on Trustpilot. This source periodically polls the Trustpilot API to detect new service reviews, combining both public and private reviews for comprehensive coverage. Each event contains the complete review data including star rating, review text, consumer details, business unit info, and timestamps. Ideal for monitoring overall business reputation, tracking customer satisfaction metrics, and triggering workflows based on review ratings or content.",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import common from "../common/polling.mjs";
import {
SOURCE_TYPES, SORT_OPTIONS,
SORT_OPTIONS,
SOURCE_TYPES,
} from "../../common/constants.mjs";
import common from "../common/polling.mjs";

export default {
...common,
key: "trustpilot-updated-conversations",
name: "New Updated Conversations",
description: "Emit new event when an existing conversation is updated with new messages on Trustpilot. This source periodically polls the Trustpilot API to detect conversations that have received new messages. Each event contains updated conversation details including participants, subject, message count, and latest update timestamp. Useful for tracking ongoing customer interactions, ensuring timely responses to follow-up messages, and maintaining conversation continuity.",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import common from "../common/polling.mjs";
import {
SOURCE_TYPES, SORT_OPTIONS,
SORT_OPTIONS,
SOURCE_TYPES,
} from "../../common/constants.mjs";
import common from "../common/polling.mjs";

export default {
...common,
key: "trustpilot-updated-product-reviews",
name: "New Updated Product Reviews",
description: "Emit new event when an existing product review is updated or revised on Trustpilot. This source periodically polls the Trustpilot API to detect product reviews that have been modified. Each event contains the updated review data including any changes to star rating, review text, or other review attributes. Perfect for tracking review modifications, monitoring changes in customer sentiment, and ensuring product feedback accuracy over time.",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import common from "../common/polling.mjs";
import {
SOURCE_TYPES, SORT_OPTIONS,
SORT_OPTIONS,
SOURCE_TYPES,
} from "../../common/constants.mjs";
import common from "../common/polling.mjs";

export default {
...common,
key: "trustpilot-updated-service-reviews",
name: "New Updated Service Reviews",
description: "Emit new event when an existing service review is updated or revised on Trustpilot. This source periodically polls the Trustpilot API to detect service reviews that have been modified. Each event contains the updated review data including any changes to star rating, review text, or other review attributes. Essential for tracking review modifications, monitoring evolving customer feedback, and identifying patterns in review updates.",
version: "0.0.1",
version: "0.0.2",
type: "source",
dedupe: "unique",
methods: {
Expand Down
24 changes: 13 additions & 11 deletions components/trustpilot/trustpilot.app.mjs
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import { defineApp } from "@pipedream/types";
import { axios } from "@pipedream/platform";
import { defineApp } from "@pipedream/types";
import * as crypto from "crypto";
import {
BASE_URL,
ENDPOINTS,
DEFAULT_LIMIT,
ENDPOINTS,
HTTP_STATUS,
MAX_LIMIT,
SORT_OPTIONS,
RATING_SCALE,
RETRY_CONFIG,
HTTP_STATUS,
SORT_OPTIONS,
} from "./common/constants.mjs";
import {
buildUrl,
parseReview,
formatQueryParams,
parseBusinessUnit,
parseReview,
parseWebhookPayload,
sanitizeInput,
sleep,
validateBusinessUnitId,
validateReviewId,
formatQueryParams,
sleep,
sanitizeInput,
} from "./common/utils.mjs";

export default defineApp({
Expand All @@ -37,9 +37,11 @@ export default defineApp({
query: "",
limit: 20,
});
return businessUnits.map((unit) => ({
label: unit.displayName,
value: unit.id,
return businessUnits.map(({
id, displayName, name: { identifying },
}) => ({
label: `${identifying || displayName}`,
value: id,
}));
} catch (error) {
console.error("Error fetching business units:", error);
Expand Down
5 changes: 3 additions & 2 deletions pnpm-lock.yaml

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

Loading