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.
Go to siteThe Shopify Admin REST & GraphQL API unleashes a myriad of possibilities to automate and enhance online store operations. It provides programmatic access to Shopify functionalities, allowing users to manage products, customers, orders, and more. Leveraging the Shopify Admin API within Pipedream, developers can create custom workflows that automate repetitive tasks, sync data across platforms, and respond dynamically to events in Shopify.
This integration can be used as a custom app on your store, or for automating actions on behalf of merchants through your Shopify app.
Looking for integrating into the Shopify Partner API for your apps, themes or referrals? Check out our Shopify Partner API integration.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
shopify_developer_app: {
type: "app",
app: "shopify_developer_app",
}
},
async run({steps, $}) {
const data = {
"query": `{
shop {
id
name
email
}
}`,
}
return await axios($, {
method: "post",
url: `https://${this.shopify_developer_app.$auth.shop_id}.myshopify.com/admin/api/2024-04/graphql.json`,
headers: {
"X-Shopify-Access-Token": `${this.shopify_developer_app.$auth.access_token}`,
"Content-Type": `application/json`,
},
data,
})
},
})
Automated Order Fulfillment Workflow: When a new order is received in Shopify, a Pipedream workflow can be triggered, automatically notifying a fulfillment service or updating an inventory management system. This ensures quick response times and keeps inventory levels accurate.
Customer Segmentation and Personalized Marketing: Pipedream can listen for customer creation events on Shopify. When a new customer is added, the workflow can segment them based on predefined criteria, such as order value or location, and add them to corresponding marketing campaigns in email marketing platforms like Mailchimp.
Real-time Stock Level Alerts: Set up a Pipedream workflow to monitor product stock levels on Shopify. When a product's stock falls below a certain threshold, trigger an alert that is sent out via Slack, SMS, or email to prompt immediate restocking actions, ensuring that popular products are always available to customers.
By creating a custom app on Shopify, you will be able to configure the exact scopes that you require to build the workflows that you need.
To get started, you will need to create a custom Shopify app in the Shopify Admin UI. The steps are outlined below:
At this point, you should have a Pipedream App connected to your Shopify store, and a long-lived access token.
As a Shopify App Developer, you can use Pipedream to automate actions on behalf of merchants by leveraging the merchants offline access token.
First, you'll need to connect your app's database to Pipedream. Pipedream connects to SQL and No-SQL databases. Here's a list of popular options in Pipedream:
Once your database is connected to Pipedream, you'll be able to query the database for a specific merchant's token.
In an HTTP triggered workflow, you can use a body parameter to reference a shop by it's myshopify.com
domain, or unique Shop ID.
Pass the shop ID to your database query step to retrieve the corresponding record of the shop to retrieve the shop's access token.
Then pass the shop's access token to a no-code Shopify Developer App action, or use Node.js/Python code to perform a raw HTTP request against the Shopify Admin GraphQL or REST API.
For example, in a pre-built action like Add Tags, click use external authentication to pass in your database stored access token:
This will switch the action to allow you to pass in the merchants access token from your database query step:
Emit new event each time a new order is cancelled.
Emit new event for each new customer added to a store.
Emit new event for each new draft order submitted to a store.
Shopify uses API keys for authentication. When you connect your Shopify account, Pipedream securely stores the keys so you can easily authenticate to Shopify APIs in both code and no-code steps.
Create a custom app in Shopify to obtain your Admin API access token. See our detailed instructions here.
Enter your Admin API access token below, and save it in a secure location (we recommend using a password manager such as 1Password)