Changelog #45

·

Shopify Integration

Eric Allam

Eric Allam

CTO, Trigger.dev

Image for Shopify Integration

Shopify is an e-commerce platform that needs no introduction.

You can now use our new Shopify Integration to easily add webhook triggers and perform tasks on Shopify resources:


_23
client.defineJob({
_23
id: "shopify-create-customized-product",
_23
name: "Shopify - Create Customized Product",
_23
version: "1.0.0",
_23
integrations: {
_23
shopify,
_23
},
_23
trigger: shopify.on("customers/create"),
_23
run: async (payload, io, ctx) => {
_23
const firstName = payload.first_name;
_23
_23
// Create a customized product
_23
const product = await io.shopify.rest.Product.save("teapot", {
_23
fromData: {
_23
title: `${firstName}'s Teapot`,
_23
},
_23
});
_23
_23
return {
_23
message: `Hi, ${firstName}! Bet you'll love this: ${product.title}`,
_23
};
_23
},
_23
});

This is the first integration to use our updated Webhook Triggers which come with a new UI. The dashboard can be found under Triggers -> Webhook Triggers. You can now see both webhook registrations and deliveries!

image

See more details in the Shopify integration docs.

Ready to start building?

Build and deploy your first task in 3 minutes.

Get started now
,