← Printful (OAuth) + Mapbox integrations

Create Tileset with Mapbox API on New Order (Instant) from Printful (OAuth) API

Pipedream makes it easy to connect APIs for Mapbox, Printful (OAuth) and 3,000+ other apps remarkably fast.

Trigger workflow on
New Order (Instant) from the Printful (OAuth) API
Next, do this
Create Tileset with the Mapbox API
No credit card required
Intro to Pipedream
Watch us build a workflow
Watch us build a workflow
8 min
Watch now ➜

Trusted by 1,000,000+ developers from startups to Fortune 500 companies

Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo
Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo

Developers Pipedream

Getting Started

This integration creates a workflow with a Printful (OAuth) trigger and Mapbox action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Order (Instant) trigger
    1. Connect your Printful (OAuth) account
  3. Configure the Create Tileset action
    1. Connect your Mapbox account
    2. Configure Username
    3. Configure Tileset Name
    4. Configure File Path or URL
    5. Configure Recipe
    6. Optional- Configure Description
    7. Optional- Configure Private
    8. Optional- Configure syncDir
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are 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.

Trigger

Description:Emit new event on each created order.
Version:0.0.1
Key:printful_oauth-new-order

Printful (OAuth) Overview

The Printful (OAuth) API on Pipedream allows you to automate and integrate Printful's on-demand printing and warehousing services into your custom workflows. From syncing e-commerce orders to generating custom notifications on order status updates, you can tailor the Printful API to fit seamlessly into your business processes. This integration is ideal for e-commerce businesses looking to streamline their operations, especially for those who want to synchronize their storefronts with Printful's production pipeline without extensive manual oversight.

Trigger Code

import common from "../common/common.mjs";

export default {
  ...common,
  name: "New Order (Instant)",
  version: "0.0.1",
  key: "printful_oauth-new-order",
  description: "Emit new event on each created order.",
  type: "source",
  dedupe: "unique",
  methods: {
    ...common.methods,
    getWebhookEventType() {
      return "order_created";
    },
    async deploy() {
      const orders = await this.printful_oauth.getOrders({
        params: {
          limit: 10,
        },
      });

      orders.reverse().forEach(this.emitEvent);
    },
    emitEvent(body) {
      const data = body?.data?.order ?? body;

      this.$emit(data, {
        id: data.id,
        summary: `New order created with id ${data.id}`,
        ts: Date.parse(data.created),
      });
    },
  },
};

Trigger Configuration

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.
LabelPropTypeDescription
Printful (OAuth)printful_oauthappThis component uses the Printful (OAuth) app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
N/Ahttp$.interface.httpThis component uses $.interface.http to generate a unique URL when the component is first instantiated. Each request to the URL will trigger the run() method of the component.

Trigger Authentication

Printful (OAuth) uses OAuth authentication. When you connect your Printful (OAuth) account, Pipedream will open a popup window where you can sign into Printful (OAuth) and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Printful (OAuth) API.

Pipedream requests the following authorization scopes when you connect your account:

ordersstores_listsync_productsfile_librarywebhooks

About Printful (OAuth)

Easy print-on-demand drop shipping and fulfillment warehouse services. Connect your account using OAuth.

Action

Description:Uploads and creates a new tileset from a data source. [See the documentation](https://docs.mapbox.com/api/maps/mapbox-tiling-service/)
Version:0.1.2
Key:mapbox-create-tileset

Mapbox Overview

The Mapbox API offers a suite of tools for developers to integrate location-based services into their applications. With Pipedream, you can leverage Mapbox's capabilities to create complex automations and workflows, like real-time mapping, geocoding, and route optimization. Whether you're managing delivery routes, analyzing spatial data, or personalizing user experiences based on location, Mapbox provides the geographical intelligence that, when combined with Pipedream's serverless platform, can turn these ideas into efficient, automated processes.

Action Code

import mapbox from "../../mapbox.app.mjs";
import { getFileStreamAndMetadata } from "@pipedream/platform";
import FormData from "form-data";

export default {
  key: "mapbox-create-tileset",
  name: "Create Tileset",
  description: "Uploads and creates a new tileset from a data source. [See the documentation](https://docs.mapbox.com/api/maps/mapbox-tiling-service/)",
  version: "0.1.2",
  annotations: {
    destructiveHint: false,
    openWorldHint: true,
    readOnlyHint: false,
  },
  type: "action",
  props: {
    mapbox,
    username: {
      type: "string",
      label: "Username",
      description: "The Mapbox username of the account for which to create a tileset source",
    },
    tilesetName: {
      type: "string",
      label: "Tileset Name",
      description: "A unique name for the tileset source to be created. Limited to 32 characters. The only allowed special characters are `-` (hyphen) and `_` (underscore)",
    },
    filePath: {
      type: "string",
      label: "File Path or URL",
      description: "A tileset source file. Provide either a file URL or a path to a file in the `/tmp` directory (for example, `/tmp/myFile.txt`)",
    },
    recipe: {
      type: "object",
      label: "Recipe",
      description: "A recipe that describes how the GeoJSON data you uploaded should be transformed into tiles. A tileset source is raw geographic data formatted as [line-delimited GeoJSON](https://en.wikipedia.org/wiki/JSON_streaming#Line-delimited_JSON), or a supported [raster file format](https://docs.mapbox.com/mapbox-tiling-service/raster/supported-file-formats/). For more information on how to create and format recipes, see the [Recipe reference](https://docs.mapbox.com/mapbox-tiling-service/reference/) and [Recipe examples](https://docs.mapbox.com/mapbox-tiling-service/examples/).",
    },
    description: {
      type: "string",
      label: "Description",
      description: "A description of the tileset",
      optional: true,
    },
    private: {
      type: "boolean",
      label: "Private",
      description: "Describes whether the tileset must be used with an access token from your Mapbox account. Default is `true`.",
      optional: true,
    },
    syncDir: {
      type: "dir",
      accessMode: "read",
      sync: true,
      optional: true,
    },
  },
  async run({ $ }) {
    // Create Tileset Source
    try {
      const fileData = new FormData();
      const {
        stream, metadata,
      } = await getFileStreamAndMetadata(this.filePath);
      fileData.append("file", stream, {
        contentType: metadata.contentType,
        knownLength: metadata.size,
        filename: metadata.name,
      });

      await this.mapbox.createTilesetSource({
        $,
        username: this.username,
        id: this.tilesetName,
        data: fileData,
        headers: fileData.getHeaders(),
      });
    } catch (e) {
      throw new Error(`Error uploading file: \`${this.filePath}\`. Error: ${e}`);
    }

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

    // Validate Recipe
    const {
      valid, errors,
    } = await this.mapbox.validateRecipe({
      $,
      data: recipe,
    });

    if (!valid) {
      throw new Error(`Error validating recipe: ${errors}`);
    }

    // Create Tileset
    const response = await this.mapbox.createTileset({
      $,
      tilesetId: `${this.username}.${this.tilesetName}`,
      data: {
        recipe,
        name: this.tilesetName,
        description: this.description,
        private: this.private,
      },
    });

    $.export("$summary", `Created tileset ${this.tilesetName}`);
    return response;
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
MapboxmapboxappThis component uses the Mapbox app.
Usernameusernamestring

The Mapbox username of the account for which to create a tileset source

Tileset NametilesetNamestring

A unique name for the tileset source to be created. Limited to 32 characters. The only allowed special characters are - (hyphen) and _ (underscore)

File Path or URLfilePathstring

A tileset source file. Provide either a file URL or a path to a file in the /tmp directory (for example, /tmp/myFile.txt)

Reciperecipeobject

A recipe that describes how the GeoJSON data you uploaded should be transformed into tiles. A tileset source is raw geographic data formatted as line-delimited GeoJSON, or a supported raster file format. For more information on how to create and format recipes, see the Recipe reference and Recipe examples

Descriptiondescriptionstring

A description of the tileset

Privateprivateboolean

Describes whether the tileset must be used with an access token from your Mapbox account. Default is true.

syncDirsyncDirdir

Action Authentication

Mapbox uses API keys for authentication. When you connect your Mapbox account, Pipedream securely stores the keys so you can easily authenticate to Mapbox APIs in both code and no-code steps.

Generate and copy your Access Toke from your Mapbox dashboard.

About Mapbox

Mapbox powers navigation for people, packages, and vehicles everywhere.

More Ways to Connect Mapbox + Printful (OAuth)

Create Tileset with Mapbox API on New Canceled Order (Instant) from Printful (OAuth) API
Printful (OAuth) + Mapbox
 
Try it
Create Tileset with Mapbox API on New Fulfilled Order (Instant) from Printful (OAuth) API
Printful (OAuth) + Mapbox
 
Try it
Generate Directions with Mapbox API on New Canceled Order (Instant) from Printful (OAuth) API
Printful (OAuth) + Mapbox
 
Try it
Generate Directions with Mapbox API on New Fulfilled Order (Instant) from Printful (OAuth) API
Printful (OAuth) + Mapbox
 
Try it
Generate Directions with Mapbox API on New Order (Instant) from Printful (OAuth) API
Printful (OAuth) + Mapbox
 
Try it
New Canceled Order (Instant) from the Printful (OAuth) API

Emit new event on each canceled order.

 
Try it
New Fulfilled Order (Instant) from the Printful (OAuth) API

Emit new event on each fulfilled order.

 
Try it
New Order (Instant) from the Printful (OAuth) API

Emit new event on each created order.

 
Try it
Create Order with the Printful (OAuth) API

Creates an order. See docs here

 
Try it
Create Tileset with the Mapbox API

Uploads and creates a new tileset from a data source. See the documentation

 
Try it
Generate Directions with the Mapbox API

Generates directions between two or more locations using Mapbox API. See the documentation

 
Try it
Geocode Address with the Mapbox API

Retrieves the geocoded location for a given address. See the documentation

 
Try it

Explore Other Apps

1
-
24
of
3,000+
apps by most popular

Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
Notion
Notion
Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular models like ChatGPT, DALL-E, and Whisper.
Anthropic (Claude)
Anthropic (Claude)
AI research and products that put safety at the frontier. Introducing Claude, a next-generation AI assistant for your tasks, no matter the scale.
Google Sheets
Google Sheets
Use Google Sheets to create and edit online spreadsheets. Get insights together with secure sharing in real-time and from any device.
Telegram
Telegram
Telegram, is a cloud-based, cross-platform, encrypted instant messaging (IM) service.
Google Drive
Google Drive
Google Drive is a file storage and synchronization service which allows you to create and share your work online, and access your documents from anywhere.
HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Google Calendar
Google Calendar
With Google Calendar, you can quickly schedule meetings and events and get reminders about upcoming activities, so you always know what’s next.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
Pipedream Utils
Pipedream Utils
Utility functions to use within your Pipedream workflows
Shopify
Shopify
Shopify is a complete commerce platform that lets anyone start, manage, and grow a business. You can use Shopify to build an online store, manage sales, market to customers, and accept payments in digital and physical locations.
Supabase
Supabase
Supabase is an open source Firebase alternative.
MySQL
MySQL
MySQL is an open-source relational database management system.
PostgreSQL
PostgreSQL
PostgreSQL is a free and open-source relational database management system emphasizing extensibility and SQL compliance.
AWS
AWS
Premium
Amazon Web Services (AWS) offers reliable, scalable, and inexpensive cloud computing services.
Twilio SendGrid
Twilio SendGrid
Premium
Send marketing and transactional email through the Twilio SendGrid platform with the Email API, proprietary mail transfer agent, and infrastructure for scalable delivery.
Amazon SES
Amazon SES
Amazon SES is a cloud-based email service provider that can integrate into any application for high volume email automation
Klaviyo
Klaviyo
Premium
Klaviyo unifies your data, channels, and AI agents in one platform—text, WhatsApp, email marketing, and more—driving growth with every interaction.
Zendesk
Zendesk
Premium
Zendesk is award-winning customer service software trusted by 200K+ customers. Make customers happy via text, mobile, phone, email, live chat, social media.
ServiceNow
ServiceNow
Premium
Beta
The smarter way to workflow
Slack
Slack
Slack is the AI-powered platform for work bringing all of your conversations, apps, and customers together in one place. Around the world, Slack is helping businesses of all sizes grow and send productivity through the roof.
Microsoft Teams
Microsoft Teams
Microsoft Teams has communities, events, chats, channels, meetings, storage, tasks, and calendars in one place.