Cookbook
Practical, end-to-end recipes for common Shop Vector destinations. Each recipe assumes you have already installed the app and chosen a plan — see Getting Started if not. (Webhooks are registered automatically when you create a pipeline.)
Slack
Slack is the quickest destination to set up. A Slack Incoming Webhook URL is self-authenticating — the secret is baked into the URL — so you can point a pipeline straight at it with no extra credentials, headers, or signing.
This recipe covers three stages:
- Create a Slack incoming webhook to receive the message.
- Send a simple, single-field message.
- Send a rich, formatted message with Block Kit.
1. Create a Slack incoming webhook
You first need a URL in Slack for Shop Vector to post to.
- Create (or open) a Slack app for your workspace at api.slack.com/apps.
- In the app, open Incoming Webhooks.
- Enable Activate Incoming Webhooks.
- Click Add New Webhook to Workspace.
- Select the workspace and the channel to post to, then click Allow.
- Copy the Webhook URL. This is the Destination URL for your Shop Vector pipeline.
TIP
Each Slack webhook URL is tied to one channel. To post to several channels, create one webhook URL per channel and one Shop Vector pipeline per URL.
2. Send a simple message
Slack renders a message from a JSON body with a single top-level text field. The goal is to reshape the Shopify payload so the only field delivered is text.
In Shop Vector, create a pipeline for the event you want to be notified about (e.g.
orders/create).Set the Destination URL to the Slack Webhook URL you copied above.
Enable Remap Fields and map a single source field to an output field named
text:Input path Output path nametext
This delivers the following body to Slack, which posts the order name as a plain message:
{
"text": "#9999"
}Mapping a raw field like this is available on every plan, but the message is only as descriptive as that one value.
A better simple message (Scale and Enterprise)
On the Scale and Enterprise plans you can make even the single-text message far more useful with a templated field, which composes one string from several Shopify fields plus Slack mrkdwn formatting — no Block Kit required.
In the output path box enter
textand click Add Templated Field.Click the field's value box and build your message, inserting Shopify fields as
${field}placeholders:text:tada: *New order ${name}* from ${customer.first_name} — total *${total_price}*
This delivers:
{
"text": ":tada: *New order #9999* from John — total *404.95*"
}which Slack renders with a bold order name, an emoji, and inline totals. For a laid-out message with distinct header and section blocks, build a Block Kit message instead.
3. Send a rich message with Block Kit
Requires Scale or Enterprise
This recipe relies on templated fields, which are available on the Scale and Enterprise plans. They are needed both to set the static block scaffolding (the literal type keys) and to compose the message text from several Shopify fields. On the Growth plan, use the simple message recipe above.
Slack's Block Kit renders a message from a blocks array, where each block is a positioned object with a type and its content. Because Block Kit uses a fixed layout rather than a list that grows with your data, you build it with numeric array indices — blocks[0], blocks[1], and so on — targeting each field by its exact position. See Writing to a specific array position for the underlying notation.
The message below has a header block and a section block:
{
"blocks": [
{
"type": "header",
"text": { "type": "plain_text", "text": "New order #9999" }
},
{
"type": "section",
"text": { "type": "mrkdwn", "text": "*Customer:* John\n*Total:* 404.95" }
}
]
}To produce it, target each field of each block by its index. The block scaffolding (type keys and Slack's inner text type) is static, so set those with templated fields whose value is just the literal text; the message content is composed from Shopify fields with templated fields too.
| Output path | Value |
|---|---|
blocks[0].type | header |
blocks[0].text.type | plain_text |
blocks[0].text.text | New order ${name} |
blocks[1].type | section |
blocks[1].text.type | mrkdwn |
blocks[1].text.text | *Customer:* ${customer.first_name}\n*Total:* ${total_price} |
To build these in the pipeline editor:
- Enable Remap Fields.
- For each row above, type the output path into the output path box and click Add Templated Field.
- Click inside the field's value box on the canvas and enter the value. For the static scaffolding, type the literal text (e.g.
header). For the content fields, type your text and insert Shopify fields as${field}placeholders — pick a source property from the dropdown and click Insert, or type the placeholder by hand.
Because each block field is addressed by its own index, you can extend the layout — add blocks[2], a divider, more sections — without disturbing the blocks you have already mapped.
Paste a complete mapping
Instead of adding each field by hand, you can paste a whole mapping as JSON. Each key is an output path and each value is a templated field. The mapping below builds a title section, a divider, and a details section:
{
"blocks[0].type": {
"type": "template",
"value": "section"
},
"blocks[0].text.text": {
"type": "template",
"value": ":moneybag: *New Order: #${order_number}*"
},
"blocks[0].text.type": {
"type": "template",
"value": "mrkdwn"
},
"blocks[1].type": {
"type": "template",
"value": "divider"
},
"blocks[2].type": {
"type": "template",
"value": "section"
},
"blocks[2].text.text": {
"type": "template",
"value": "Order placed by ${customer.first_name} ${customer.last_name} for ${currency}${total_price}"
},
"blocks[2].text.type": {
"type": "template",
"value": "mrkdwn"
}
}Applied to the example order, this delivers the following Block Kit body to Slack:
{
"blocks": [
{ "type": "section", "text": { "type": "mrkdwn", "text": ":moneybag: *New Order: #1234*" } },
{ "type": "divider" },
{ "type": "section", "text": { "type": "mrkdwn", "text": "Order placed by John Smith for USD404.95" } }
]
}The text.text fields of a section block accept mrkdwn, Slack's lightweight markup:
| You want | Type this |
|---|---|
| Bold | *bold* |
| Italic | _italic_ |
| A clickable link | <https://example.com|link text> |
| A new line | press Enter inside the value box |
| An emoji | :tada:, :package:, :warning: |
Line items and other arrays
Block Kit built this way uses fixed positions, so it suits a set number of blocks. To fold a variable-length Shopify array such as line_items[] into a single block, map or summarise it into one mrkdwn string rather than expecting one block per line item — a fixed layout doesn't grow with the array.
