logo-darkPipe0

Email writer

An AI agent specialized in composing emails.

ProviderBilling Mode
Docs
Connection
Docs
Cost per operation
Docs
Event
P
Gemini
Always
Managed, User

0.50 credits

gemini-flash-latest-write-email
P
OpenAI
Always
Managed, User

1.00 credits

openai-gpt-latest-write-email
P
OpenAI
Always
Managed, User

0.50 credits

openai-gpt-mini-latest-write-email

Output Fields

string
email_body
string
email_subject

Code Examples

const options = {
  method: 'POST',
  headers: {'content-type': 'application/json', authorization: 'Bearer <TOKEN>'},
  body: JSON.stringify({
    config: {environment: 'production'},
    pipes: [
      {
        pipe_id: 'email:write@1',
        config: {
          model: 'openai-gpt-latest',
          persona: 'customer_success',
          signature: '\nJohn Doe\nHead of Customer Success\n[LinkedIn](https://https://linkedin.com/li/john-doe)\n          ',
          template: '\nWrite a welcome message for new users of my app Pipe0.\n\nPipe0 is a data enrichment framework that serves both software engineers working on products that \nuse data enrichment and GTM professionals.\n\nUse the job title of the user to figure out which function the new user has: {{ input job_title type="string" required="true" }}.\n\nCustomize the message using the name of the user: {{ input name type="string" required="true" }}.\n            '
        }
      }
    ],
    input: [{id: '1', job_title: 'GTM Engineer', name: 'Pipe Piper'}]
  })
};

fetch('https://api.pipe0.com/v1/pipes/run', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
import requests

url = "https://api.pipe0.com/v1/pipes/run"

payload = {
    "config": { "environment": "production" },
    "pipes": [
        {
            "pipe_id": "email:write@1",
            "config": {
                "model": "openai-gpt-latest",
                "persona": "customer_success",
                "signature": "
John Doe
Head of Customer Success
[LinkedIn](https://https://linkedin.com/li/john-doe)
          ",
                "template": "
Write a welcome message for new users of my app Pipe0.

Pipe0 is a data enrichment framework that serves both software engineers working on products that 
use data enrichment and GTM professionals.

Use the job title of the user to figure out which function the new user has: {{ input job_title type=\"string\" required=\"true\" }}.

Customize the message using the name of the user: {{ input name type=\"string\" required=\"true\" }}.
            "
            }
        }
    ],
    "input": [
        {
            "id": "1",
            "job_title": "GTM Engineer",
            "name": "Pipe Piper"
        }
    ]
}
headers = {
    "content-type": "application/json",
    "authorization": "Bearer <TOKEN>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
curl --request POST \
     --url https://api.pipe0.com/v1/pipes/run \
     --header 'authorization: Bearer <TOKEN>' \
     --header 'content-type: application/json' \
     --data '
{
  "config": {
    "environment": "production"
  },
  "pipes": [
    {
      "pipe_id": "email:write@1",
      "config": {
        "model": "openai-gpt-latest",
        "persona": "customer_success",
        "signature": "\nJohn Doe\nHead of Customer Success\n[LinkedIn](https://https://linkedin.com/li/john-doe)\n          ",
        "template": "\nWrite a welcome message for new users of my app Pipe0.\n\nPipe0 is a data enrichment framework that serves both software engineers working on products that \nuse data enrichment and GTM professionals.\n\nUse the job title of the user to figure out which function the new user has: {{ input job_title type=\"string\" required=\"true\" }}.\n\nCustomize the message using the name of the user: {{ input name type=\"string\" required=\"true\" }}.\n            "
      }
    }
  ],
  "input": [
    {
      "id": "1",
      "job_title": "GTM Engineer",
      "name": "Pipe Piper"
    }
  ]
}
'
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.pipe0.com/v1/pipes/run"

	payload := strings.NewReader("{\"config\":{\"environment\":\"production\"},\"pipes\":[{\"pipe_id\":\"email:write@1\",\"config\":{\"model\":\"openai-gpt-latest\",\"persona\":\"customer_success\",\"signature\":\"\\nJohn Doe\\nHead of Customer Success\\n[LinkedIn](https://https://linkedin.com/li/john-doe)\\n          \",\"template\":\"\\nWrite a welcome message for new users of my app Pipe0.\\n\\nPipe0 is a data enrichment framework that serves both software engineers working on products that \\nuse data enrichment and GTM professionals.\\n\\nUse the job title of the user to figure out which function the new user has: {{ input job_title type=\\\"string\\\" required=\\\"true\\\" }}.\\n\\nCustomize the message using the name of the user: {{ input name type=\\\"string\\\" required=\\\"true\\\" }}.\\n            \"}}],\"input\":[{\"id\":\"1\",\"job_title\":\"GTM Engineer\",\"name\":\"Pipe Piper\"}]}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("content-type", "application/json")
	req.Header.Add("authorization", "Bearer <TOKEN>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.pipe0.com/v1/pipes/run', [
  'body' => '{"config":{"environment":"production"},"pipes":[{"pipe_id":"email:write@1","config":{"model":"openai-gpt-latest","persona":"customer_success","signature":"\\nJohn Doe\\nHead of Customer Success\\n[LinkedIn](https://https://linkedin.com/li/john-doe)\\n          ","template":"\\nWrite a welcome message for new users of my app Pipe0.\\n\\nPipe0 is a data enrichment framework that serves both software engineers working on products that \\nuse data enrichment and GTM professionals.\\n\\nUse the job title of the user to figure out which function the new user has: {{ input job_title type=\\"string\\" required=\\"true\\" }}.\\n\\nCustomize the message using the name of the user: {{ input name type=\\"string\\" required=\\"true\\" }}.\\n            "}}],"input":[{"id":"1","job_title":"GTM Engineer","name":"Pipe Piper"}]}',
  'headers' => [
    'authorization' => 'Bearer <TOKEN>',
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
POST /v1/pipes/run HTTP/1.1
Content-Type: application/json
Authorization: Bearer <TOKEN>
Host: api.pipe0.com
Content-Length: 802

{"config":{"environment":"production"},"pipes":[{"pipe_id":"email:write@1","config":{"model":"openai-gpt-latest","persona":"customer_success","signature":"\nJohn Doe\nHead of Customer Success\n[LinkedIn](https://https://linkedin.com/li/john-doe)\n          ","template":"\nWrite a welcome message for new users of my app Pipe0.\n\nPipe0 is a data enrichment framework that serves both software engineers working on products that \nuse data enrichment and GTM professionals.\n\nUse the job title of the user to figure out which function the new user has: {{ input job_title type=\"string\" required=\"true\" }}.\n\nCustomize the message using the name of the user: {{ input name type=\"string\" required=\"true\" }}.\n            "}}],"input":[{"id":"1","job_title":"GTM Engineer","name":"Pipe Piper"}]}