Examples
Signup Alert
This example posts a Slack alert when a new user signs up and matches your ideal customer profile (ICP).
The pipeline runs in one request:
email:iswork@1— is the signup using a work email?company:domain:workemail@1— resolve the company domain (only for work emails).company:overview@3— enrich the company.prompt:run@1— score the company against our ICP.message:write@1— draft the alert (only for ICP matches).message:send:slack@1— post the drafted message to Slack.
import { Pipe0 } from "@pipe0/client";
const pipe0 = new Pipe0({ apiKey: process.env.PIPE0_API_KEY });
const result = await pipe0.pipes.pipe({
config: {
environment: "production",
},
pipes: [
{
pipe_id: "email:iswork@1",
},
{
pipe_id: "company:domain:workemail@1",
run_if: {
action: "run",
when: {
logic: "and",
conditions: [
{
field_name: "is_work_email",
operator: "eq",
property: "value",
value: true,
},
],
},
},
config: {
input_fields: {
work_email: {
alias: "email",
},
},
},
},
{
pipe_id: "company:overview@3",
},
{
pipe_id: "prompt:run@1",
config: {
model: "gemini-flash-latest",
prompt: {
template: `
Your task is to determine if the user's current employer aligns with the ideal customer profile for our business, pipe0.
[Business Description]
pipe0 is an enrichment framework designed to help businesses add features around data enrichment into their own software applications.
[Ideal Customer Attributes]
The company either offers or is involved in developing products that can benefit from data enrichment.
Such companies often target use cases around: AI agents, customer relationship management, applicant tracking, account research, investor intelligence, or
workflow automation.
Alternatively, the user can be a go-to-market professional using workflow enrichment in their own workflows for automating
go-to-market workflows.
The user's employer should have a need for prospecting, lead generation, or sales intelligence tools.
[Available Information]
To make your assessment, use the following information:
Company description: {{ company_description | default: "" }}
Company industry: {{ company_industry | default: "" }}
Company headcount: {{ headcount | default: "" }}
Estimated revenue: {{ estimated_revenue | default: "" }}
[Output]
{% output is_icp_fit, type: "boolean", description: "A boolean flag indicating if the latest employer matches the ICP profile of the business. If no information is found or the user has no current employer, set to false." %}
{% output reason, type: "string", description: "An explanation of how you arrived at your conclusion." %}
`,
},
},
},
{
pipe_id: "message:write@1",
run_if: {
action: "run",
when: {
logic: "and",
conditions: [
{
field_name: "is_icp_fit",
property: "value",
operator: "eq",
value: true,
},
],
},
},
config: {
model: "gemini-flash-latest",
template: `
Notify the pipe0 team that a high value customer signed up to the platform.
Give the team the following information:
Name of the user: {{ name | default: "" }}
Company the user works for: {{ company_domain | default: "" }}
Reason why it is a high value customer: {{ reason | default: "" }}
`,
},
},
{
pipe_id: "message:send:slack@1",
run_if: {
action: "run",
when: {
logic: "and",
conditions: [
{
field_name: "is_icp_fit",
property: "value",
operator: "eq",
value: true,
},
],
},
},
connector: {
strategy: "first",
connections: [
{
type: "vault",
connection: "<ADD_YOUR_CONNECTION>",
},
],
},
config: {
channel_id: "<ADD_SLACK_CHANNEL_ID>",
message: "{{ message }}",
},
},
],
input: [
{
id: 1,
name: "<NAME>",
email: "<EMAIL>",
},
],
});
console.log(result);import requests
response = requests.post(
"https://api.pipe0.com/v1/pipes/run/sync",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"config": {
"environment": "production",
},
"pipes": [
{
"pipe_id": "email:iswork@1",
},
{
"pipe_id": "company:domain:workemail@1",
"run_if": {
"action": "run",
"when": {
"logic": "and",
"conditions": [
{
"field_name": "is_work_email",
"operator": "eq",
"property": "value",
"value": True,
},
],
},
},
"config": {
"input_fields": {
"work_email": {
"alias": "email",
},
},
},
},
{
"pipe_id": "company:overview@3",
},
{
"pipe_id": "prompt:run@1",
"config": {
"model": "gemini-flash-latest",
"prompt": {
"template": """
Your task is to determine if the user's current employer aligns with the ideal customer profile for our business, pipe0.
[Business Description]
pipe0 is an enrichment framework designed to help businesses add features around data enrichment into their own software applications.
[Ideal Customer Attributes]
The company either offers or is involved in developing products that can benefit from data enrichment.
Such companies often target use cases around: AI agents, customer relationship management, applicant tracking, account research, investor intelligence, or
workflow automation.
Alternatively, the user can be a go-to-market professional using workflow enrichment in their own workflows for automating
go-to-market workflows.
The user's employer should have a need for prospecting, lead generation, or sales intelligence tools.
[Available Information]
To make your assessment, use the following information:
Company description: {{ company_description | default: "" }}
Company industry: {{ company_industry | default: "" }}
Company headcount: {{ headcount | default: "" }}
Estimated revenue: {{ estimated_revenue | default: "" }}
[Output]
{% output is_icp_fit, type: "boolean", description: "A boolean flag indicating if the latest employer matches the ICP profile of the business. If no information is found or the user has no current employer, set to false." %}
{% output reason, type: "string", description: "An explanation of how you arrived at your conclusion." %}
""",
},
},
},
{
"pipe_id": "message:write@1",
"run_if": {
"action": "run",
"when": {
"logic": "and",
"conditions": [
{
"field_name": "is_icp_fit",
"property": "value",
"operator": "eq",
"value": True,
},
],
},
},
"config": {
"model": "gemini-flash-latest",
"template": """
Notify the pipe0 team that a high value customer signed up to the platform.
Give the team the following information:
Name of the user: {{ name | default: "" }}
Company the user works for: {{ company_domain | default: "" }}
Reason why it is a high value customer: {{ reason | default: "" }}
""",
},
},
{
"pipe_id": "message:send:slack@1",
"run_if": {
"action": "run",
"when": {
"logic": "and",
"conditions": [
{
"field_name": "is_icp_fit",
"property": "value",
"operator": "eq",
"value": True,
},
],
},
},
"connector": {
"strategy": "first",
"connections": [
{
"type": "vault",
"connection": "<ADD_YOUR_CONNECTION>",
},
],
},
"config": {
"channel_id": "<ADD_SLACK_CHANNEL_ID>",
"message": "{{ message }}",
},
},
],
"input": [
{
"id": 1,
"name": "<NAME>",
"email": "<EMAIL>",
},
],
},
)
print(response.json())curl -X POST "https://api.pipe0.com/v1/pipes/run/sync" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"config": {
"environment": "production"
},
"pipes": [
{
"pipe_id": "email:iswork@1"
},
{
"pipe_id": "company:domain:workemail@1",
"run_if": {
"action": "run",
"when": {
"logic": "and",
"conditions": [
{
"field_name": "is_work_email",
"operator": "eq",
"property": "value",
"value": true
}
]
}
},
"config": {
"input_fields": {
"work_email": {
"alias": "email"
}
}
}
},
{
"pipe_id": "company:overview@3"
},
{
"pipe_id": "prompt:run@1",
"config": {
"model": "gemini-flash-latest",
"prompt": {
"template": "\nYour task is to determine if the user'\''s current employer aligns with the ideal customer profile for our business, pipe0.\n\n[Business Description]\npipe0 is an enrichment framework designed to help businesses add features around data enrichment into their own software applications.\n\n[Ideal Customer Attributes]\n\nThe company either offers or is involved in developing products that can benefit from data enrichment.\n\nSuch companies often target use cases around: AI agents, customer relationship management, applicant tracking, account research, investor intelligence, or\nworkflow automation.\n\nAlternatively, the user can be a go-to-market professional using workflow enrichment in their own workflows for automating\ngo-to-market workflows.\n\nThe user'\''s employer should have a need for prospecting, lead generation, or sales intelligence tools.\n\n[Available Information]\nTo make your assessment, use the following information:\nCompany description: {{ company_description | default: \"\" }}\nCompany industry: {{ company_industry | default: \"\" }}\nCompany headcount: {{ headcount | default: \"\" }}\nEstimated revenue: {{ estimated_revenue | default: \"\" }}\n\n[Output]\n{% output is_icp_fit, type: \"boolean\", description: \"A boolean flag indicating if the latest employer matches the ICP profile of the business. If no information is found or the user has no current employer, set to false.\" %}\n{% output reason, type: \"string\", description: \"An explanation of how you arrived at your conclusion.\" %}\n "
}
}
},
{
"pipe_id": "message:write@1",
"run_if": {
"action": "run",
"when": {
"logic": "and",
"conditions": [
{
"field_name": "is_icp_fit",
"property": "value",
"operator": "eq",
"value": true
}
]
}
},
"config": {
"model": "gemini-flash-latest",
"template": "\nNotify the pipe0 team that a high value customer signed up to the platform.\n\nGive the team the following information:\nName of the user: {{ name | default: \"\" }}\nCompany the user works for: {{ company_domain | default: \"\" }}\nReason why it is a high value customer: {{ reason | default: \"\" }}\n "
}
},
{
"pipe_id": "message:send:slack@1",
"run_if": {
"action": "run",
"when": {
"logic": "and",
"conditions": [
{
"field_name": "is_icp_fit",
"property": "value",
"operator": "eq",
"value": true
}
]
}
},
"connector": {
"strategy": "first",
"connections": [
{
"type": "vault",
"connection": "<ADD_YOUR_CONNECTION>"
}
]
},
"config": {
"channel_id": "<ADD_SLACK_CHANNEL_ID>",
"message": "{{ message }}"
}
}
],
"input": [
{
"id": 1,
"name": "<NAME>",
"email": "<EMAIL>"
}
]
}'Replace <ADD_YOUR_CONNECTION> with your Slack vault connection ID and <ADD_SLACK_CHANNEL_ID>
with the target channel (see Connections).