Why would you want to be alerted when a Shopify store installs, subscribes or uninstalls your Shopify app?
Well when you’re finding some time off, enjoying a beer or just away from the laptop it’s always nice to see your app working for you.
On the flip side, knowing when a merchant uninstalls your app gives you a chance to immediately respond with a personalized message to try and win them back.
Sure, you can accomplish this functionality with coding directly within your app. It sounds easy right? Until you consider all of the steps:
- Install a Slack package in your app.
- Craft a message in JSON from Shopify’s API data.
- Upgrade the package with new updates.
- Create a new background queue for handling these notifications out of band so your app’s performance isn’t affected.
- Repeat for installs, uninstalls, subscriptions, deactivations, & reactivations.
Read on for detailed setup instructions, or just copy my Shopify App to Slack notifications workflow here and riff on your own:
Pipedream is the perfect solution for this kind of integration.
I wrote a Shopify Partner API Integration for Pipedream, it’s free and open source to use in your Pipedream workflows.
Or create your own workflows with one of the 500+ pre-built actions, or build one of your own with Node.js, Python, Go or Bash; all without opening your IDE.
Steal my workflow
Setting up the workflow doesn’t require any code, you just need a few copy pastes from your Shopify Partner dashboard to get started.
Here’s how to do it.
First, copy my workflow that already connects Shopify App events to Slack:
After your register, click Copy in the top right of the workflow to copy it to your Pipedream account:
Now you’ll have your own version of the workflow saved to your Pipedream account.
Creating a Shopify Parter API Key
In order to integrate with our new shiny Pipedream workflow with your Shopify Account, you’ll need to create an API key.
First login to your Shopify Partner account.
Then open your account settings, scroll to the bottom of the page and click on the Manage Partner API Clients button:
Then click the Create API Client button:
Awesome. Now you have an Shopify Partner API token you can use to authenticate your Pipedream workflow with:
Find your Shopify Partner Organization ID
This one is hidden in plain sight.
Opening up your Shopify Partner Settings reveals your Shopify Partner Organization ID:
Copy this number too so we can wire our workflow up to it.
Connecting your Shopify Partner account
Now armed with both your Shopify Partner Organization ID & API Key, we can return to your Pipedream workflow to finish the integration.
Now enter in your Shopify Partner ID we copied from before, your new Shopify Partner API key, and give this integration a name:
Connecting your Shopify App
The last integration step is to inform the workflow which of your Shopify Apps it should integrate with.
So let’s find your App’s ID and enter it into the workflow.
Find your App’s ID
Your App ID can be found by visiting your app details in the Shopify Partner Dashboard and viewing the URL.
It’s the number after the
/apps/ portion of the URL:
Entering your Shopify App ID into the workflow
Back in the workflow enter in the App ID in this format:
gid://partners/App/<your App ID here>
Click Save to finish the integration.
Connect to your Slack workspace
Congrats, the hard part is over. Connecting to Slack is a cinch with Pipedream. Scroll down to the last step in the workflow and click Connect account to authorize your Slack account:
Configuring the Slack message
This is the real final step. Enter in these values for the Slack action and click Save then Deploy in the top bar.
Here’s the values for each field to make it easier to copy & paste:
|Slack Channel||Choose from the dropdown menu|
Don’t forget to click Save then Deploy to make your Workflow live.
If all goes well, you’ll be getting updates in real time from your Shopify App.
This is just one example of the cool & useful things you can do with Pipedream.
Have a prosperous day!