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
17 changes: 17 additions & 0 deletions components/codeqr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Overview

The CodeQR API enables you to create and manage dynamic QR Codes, shorten URLs, capture leads, and track engagement through powerful analytics. By integrating CodeQR with Pipedream, you can automate the generation of QR Codes and short links across a wide range of workflows — from marketing automation to customer support — and seamlessly connect these actions to over 2,500 apps. fileciteturn3file0

# Example Use Cases

- **Dynamic QR Code Generation for Marketing Campaigns**
Automatically generate campaign-specific QR Codes when a new campaign is launched in your CRM or marketing tool. Store the QR code image in your cloud drive (e.g., Google Drive or Dropbox), and attach it to your newsletters or printed materials.

- **URL Shortening with Pre-Redirect Lead Capture**
When a new record is added to Airtable or a Google Sheet with a destination URL, create a short link using CodeQR that optionally includes a lead capture page before redirection. Use this to qualify traffic before they reach your landing page.

- **Automated Feedback Collection**
Trigger the creation of a QR code linked to a feedback form after each customer interaction in platforms like Zendesk, Intercom, or HubSpot. Easily track which customers scanned the code and filled the form, and centralize the responses.

- **Analytics Monitoring and Reporting**
Use Pipedream workflows to pull scan and click analytics from CodeQR at regular intervals. Send the data to Slack, update a Google Sheet, or visualize trends on a custom dashboard.
197 changes: 197 additions & 0 deletions components/codeqr/actions/create-link/create-link.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
import codeqr from "../../codeqr.app.mjs";

export default {
key: "codeqr-create-link",
name: "Create a CodeQR Link",
description:
"Creates a short link in CodeQR using the CodeQR API. [See the documentation](https://codeqr.mintlify.app/api-reference/endpoint/create-a-link)",
version: "0.0.1",
type: "action",
props: {
codeqr,
url: {
type: "string",
label: "URL",
description: "The destination URL of the short link.",
},
key: {
type: "string",
label: "Key",
description:
"The short link slug. If not provided, a random 7-character slug will be generated.",
optional: true,
},
domain: {
type: "string",
label: "Domain",
description:
"The domain of the short link. If not provided, the default workspace domain will be used.",
optional: true,
},
externalId: {
type: "string",
label: "External ID",
description:
"This is the ID of the link in your database. Must be prefixed with ext_.",
optional: true,
},
password: {
type: "string",
label: "Password",
description: "The password required to access the destination URL.",
optional: true,
},
flexible: {
type: "boolean",
label: "Flexible Link",
description:
"Whether this is a flexible link with dynamic destination setting.",
optional: true,
},
title: {
type: "string",
label: "Title",
description: "The title displayed on the short link page.",
optional: true,
},
description: {
type: "string",
label: "Description",
description: "A description displayed on the short link page.",
optional: true,
},
image: {
type: "string",
label: "Image URL",
description: "URL of the image displayed on the short link page.",
optional: true,
},
video: {
type: "string",
label: "Video URL",
description: "URL of the video displayed on the short link page.",
optional: true,
},
proxy: {
type: "boolean",
label: "Proxy",
description: "Enable proxy settings.",
optional: true,
},
rewrite: {
type: "boolean",
label: "Rewrite Link",
description: "Enable link rewriting.",
optional: true,
},
ios: {
type: "string",
label: "iOS URL",
description: "The iOS destination URL for device-specific redirection.",
optional: true,
},
android: {
type: "string",
label: "Android URL",
description:
"The Android destination URL for device-specific redirection.",
optional: true,
},
doIndex: {
type: "boolean",
label: "Allow Indexing",
description: "Enable indexing of the short link.",
optional: true,
},
comments: {
type: "string",
label: "Comments",
description: "Comments or notes about the short link.",
optional: true,
},
expiresAt: {
type: "string",
label: "Expiration Date",
description:
"The date and time when the short link will expire (ISO 8601). E.g. `2025-06-13T05:31:56Z`",
optional: true,
},
expiredUrl: {
type: "string",
label: "Expired Redirect URL",
description: "The URL to redirect to when the short link has expired.",
optional: true,
},
geo: {
type: "object",
label: "Geo-Targeting",
description:
"Mapping of country codes to destination URLs (JSON format).",
optional: true,
},
publicStats: {
type: "boolean",
label: "Public Stats",
description: "Whether the short link's stats are publicly accessible.",
optional: true,
},
},

async run({ $ }) {
const {
url,
key,
domain,
externalId,
password,
flexible,
title,
description,
image,
video,
proxy,
rewrite,
ios,
android,
doIndex,
comments,
expiresAt,
expiredUrl,
publicStats,
} = this;

const geo = typeof this.geo === "string"
? JSON.parse(this.geo)
: this.geo;

const payload = {
url,
};
key && (payload.key = key);
domain && (payload.domain = domain);
externalId && (payload.externalId = externalId);
password && (payload.password = password);
flexible != null && (payload.flexible = flexible);
title && (payload.title = title);
description && (payload.description = description);
image && (payload.image = image);
video && (payload.video = video);
proxy != null && (payload.proxy = proxy);
rewrite != null && (payload.rewrite = rewrite);
ios && (payload.ios = ios);
android && (payload.android = android);
doIndex != null && (payload.doIndex = doIndex);
comments && (payload.comments = comments);
expiresAt && (payload.expiresAt = expiresAt);
expiredUrl && (payload.expiredUrl = expiredUrl);
geo && (payload.geo = geo);
publicStats != null && (payload.publicStats = publicStats);

const response = await this.codeqr.createLink({
$,
data: payload,
});
response && $.export("$summary", "Link created successfully");
return response;
},
};
128 changes: 128 additions & 0 deletions components/codeqr/actions/create-qrcode/create-qrcode.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
import codeqr from "../../codeqr.app.mjs";

export default {
key: "codeqr-create-qrcode",
name: "Create a QR Code",
description:
"Creates a new QR Code in CodeQR using the QR Codes API. [See the documentation](https://codeqr.mintlify.app/api-reference/endpoint/create-a-qrcode)",
version: "0.0.1",
type: "action",
props: {
codeqr,
type: {
type: "string",
label: "QR Code Type",
description: "Select the type of QR Code to generate.",
options: [
"url",
"text",
],
optional: false,
},
static: {
type: "boolean",
label: "Static/Dynamic",
description:
"Yes = Static QR Code (fixed content); No = Dynamic QR Code (editable content).",
optional: false,
default: true,
},
url: {
type: "string",
label: "URL",
description: "The destination URL of the QR Code.",
optional: true,
},
text: {
type: "string",
label: "Text",
description: "Text content stored in the QR Code.",
optional: true,
},
trackConversion: {
type: "boolean",
label: "Track Conversion",
description:
"Enable tracking of conversions for the QR Code. Only available for dynamic QR Codes.",
optional: true,
},
title: {
type: "string",
label: "Title",
description: "Title associated with the QR Code.",
optional: true,
},
bgColor: {
type: "string",
label: "Background Color",
description: "Background color of the QR Code.",
optional: true,
},
fgColor: {
type: "string",
label: "Foreground Color",
description: "Foreground color of the QR Code.",
optional: true,
},
showLogo: {
type: "boolean",
label: "Show Logo",
description: "Whether to display a logo in the QR Code.",
optional: true,
},
src: {
type: "string",
label: "Logo URL",
description:
"URL of the logo to display in the QR Code (only if Show Logo is true).",
optional: true,
},
comments: {
type: "string",
label: "Comments",
description: "Comments or notes about the QR Code.",
optional: true,
},
expiresAt: {
type: "string",
label: "Expiration Date",
description:
"The date and time when the short link will expire (ISO 8601). Only available for dynamic QR Codes. E.g. `2025-06-13T05:31:56Z`",
optional: true,
},
expiredUrl: {
type: "string",
label: "Expired Redirect URL",
description:
"The URL to redirect to when the short link has expired. Only available for dynamic QR Codes.",
optional: true,
},
},
async run({ $ }) {
const payload = {};
for (const key of [
"type",
"static",
"url",
"text",
"trackConversion",
"title",
"bgColor",
"fgColor",
"showLogo",
"src",
"comments",
"expiresAt",
"expiredUrl",
]) {
if (this[key] != null) payload[key] = this[key];
}

const response = await this.codeqr.createQrcode({
$,
data: payload,
});
$.export("$summary", "QR Code created successfully.");
return response;
},
};
51 changes: 51 additions & 0 deletions components/codeqr/actions/delete-link/delete-link.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { ConfigurationError } from "@pipedream/platform";
import codeqr from "../../codeqr.app.mjs";

export default {
key: "codeqr-delete-link",
name: "Delete a Link",
description: "Deletes a short link in CodeQR by linkId or externalId. [See the documentation](https://codeqr.mintlify.app/api-reference/endpoint/delete-a-link)",
version: "0.0.1",
type: "action",
props: {
codeqr,
linkId: {
propDefinition: [
codeqr,
"linkId",
],
description: "The unique ID of the link to delete.",
optional: true,
},
externalId: {
type: "string",
label: "External ID",
description:
"This is the ID of the link in your database. Must be prefixed with ext_.",
optional: true,
},
},
async run({ $ }) {
const {
linkId, externalId,
} = this;
if (!linkId && !externalId) {
throw new ConfigurationError(
"Please provide either linkId or externalId to delete the link.",
);
}

// Determine identifier to use
const identifier = linkId || externalId;

// Perform DELETE request to /links/{identifier}
await this.codeqr.deleteLink({
$,
identifier,
});
$.export("$summary", `Link deleted successfully (${identifier}).`);
return {
success: true,
};
},
};
Loading
Loading