Saleor application to send Slack messages based on order_created
events.
- Connection between Saleor and Slack using webhook
- Example
order_created
webhook that triggers Slack bot to send message
Slack app is based on App Template - you can check it here
If you want to develop single tenant application - use already configured FileAPL
for local development.
If you need to support multiple tenants application or you want to deploy your application - use UpstashAPL
. Follow How to configure Upstash for more info.
To read more about storing auth data, read the APL documentation
Saleor CLI is designed to save you from the repetitive chores around Saleor development, including creating Apps. It will take the burden of spawning new apps locally, connecting them with Saleor environments, and establishing a tunnel for local development in seconds.
If you don't have (free developer) Saleor Cloud account create one with the following command:
saleor register
Now you're ready to run this application in development mode:
pnpm run dev
Having your app running, the final thing you want to establish is a tunnel with your Saleor environment. Go to your app's directory first and run:
saleor app tunnel
Your local application should be available now to the outside world (Saleor instance) for accepting all the events via webhooks.
A quick note: the next time you come back to your project, it is enough to launch your app in a standard way (and then launch your tunnel as described earlier):
pnpm dev
Add URL of your Saleor instance to the .env
file:
NEXT_PUBLIC_SALEOR_HOST_URL=https://your-saleor-instance.com
Install dependencies pnpm install
Start local server pnpm run dev
Follow the guide how install your app and use tunneling tools like localtunnel or ngrok in order to expose your local server.
If you use saleor-dashboard and your local server is exposed, you can install your app by following this link:
[YOUR_SALEOR_DASHBOARD_URL]/apps/install?manifestUrl=[YOUR_APPS_MANIFEST_URL]
Read how to connect the app with the Slack here
Commands build
and dev
would generate schema and typed functions using Saleor's GraphQL endpoint. Commit generated
folder to your repo as they are necessary for queries and keeping track of the schema changes.
Learn more about GraphQL code generation.