@pipedream/printautopilot 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
The PrintAutopilot API facilitates the automation of print-on-demand services, allowing you to seamlessly create, manage, and track custom print orders right from within your Pipedream workflows. With this API, you can trigger printing and shipping of products like t-shirts, mugs, and posters as soon as a customer places an order, or batch process orders to optimize fulfillment. In Pipedream, harness these capabilities to build integrated workflows that connect PrintAutopilot with eCommerce platforms, CRM systems, or customer support tools to streamline your print-on-demand business.
|
|
4
|
+
|
|
5
|
+
# Example Use Cases
|
|
6
|
+
|
|
7
|
+
- **Order Processing Automation**: Trigger a workflow in Pipedream when a new order is received on Shopify. Validate the order details, then use the PrintAutopilot API to submit the order for printing. Finally, update the order status in Shopify and notify the customer via email.
|
|
8
|
+
|
|
9
|
+
- **Customer Support Ticket Printing**: On receiving a support ticket in Zendesk that requires printed material as a resolution, automatically process the request using the PrintAutopilot API. Once the printing job is completed and shipped, update the ticket in Zendesk with the tracking information.
|
|
10
|
+
|
|
11
|
+
- **Inventory and Sales Reporting**: Combine data from PrintAutopilot and Stripe to generate a daily sales and inventory report. Set up a Pipedream workflow that fetches new transactions from Stripe, checks product availability via PrintAutopilot, and compiles a report that's emailed to your team daily.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import printAutopilot from "../../printautopilot.app.mjs";
|
|
2
|
-
import
|
|
2
|
+
import { getFileStream } from "@pipedream/platform";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
key: "printautopilot-add-pdf-to-queue",
|
|
6
6
|
name: "Add PDF to Print Autopilot Queue",
|
|
7
7
|
description: "Uploads a PDF document to the print-autopilot queue. [See the documentation](https://documenter.getpostman.com/view/1334461/TW6wJonb#53f82327-4f23-416d-b2f0-ce17b8037933)",
|
|
8
|
-
version: "0.
|
|
8
|
+
version: "0.1.1",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
printAutopilot,
|
|
12
12
|
filePath: {
|
|
13
13
|
type: "string",
|
|
14
|
-
label: "File Path",
|
|
15
|
-
description: "The
|
|
14
|
+
label: "File Path or URL",
|
|
15
|
+
description: "The file to upload. Provide either a file URL or a path to a file in the `/tmp` directory (for example, `/tmp/myFile.pdf`)",
|
|
16
16
|
},
|
|
17
17
|
fileName: {
|
|
18
18
|
type: "string",
|
|
@@ -25,12 +25,21 @@ export default {
|
|
|
25
25
|
description: "An API Token associated with the intended print queue",
|
|
26
26
|
secret: true,
|
|
27
27
|
},
|
|
28
|
+
syncDir: {
|
|
29
|
+
type: "dir",
|
|
30
|
+
accessMode: "read",
|
|
31
|
+
sync: true,
|
|
32
|
+
optional: true,
|
|
33
|
+
},
|
|
28
34
|
},
|
|
29
35
|
async run({ $ }) {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
const stream = await getFileStream(this.filePath);
|
|
37
|
+
const chunks = [];
|
|
38
|
+
for await (const chunk of stream) {
|
|
39
|
+
chunks.push(chunk);
|
|
40
|
+
}
|
|
41
|
+
const fileContent = Buffer.concat(chunks).toString("base64");
|
|
42
|
+
|
|
34
43
|
const response = await this.printAutopilot.addDocumentToQueue({
|
|
35
44
|
token: this.token,
|
|
36
45
|
data: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/printautopilot",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Pipedream PrintAutopilot Components",
|
|
5
5
|
"main": "printautopilot.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@pipedream/platform": "^1.
|
|
16
|
+
"@pipedream/platform": "^3.1.0"
|
|
17
17
|
}
|
|
18
18
|
}
|