Aplicar plantilla de automatización
curl --request POST \
--url https://app.famulor.de/api/user/automate/templates/{key} \
--header 'Content-Type: application/json' \
--data '
{
"params": {},
"assistant_id": 123,
"name": "<string>",
"confirm_side_effects": true
}
'import requests
url = "https://app.famulor.de/api/user/automate/templates/{key}"
payload = {
"params": {},
"assistant_id": 123,
"name": "<string>",
"confirm_side_effects": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({params: {}, assistant_id: 123, name: '<string>', confirm_side_effects: true})
};
fetch('https://app.famulor.de/api/user/automate/templates/{key}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.famulor.de/api/user/automate/templates/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'params' => [
],
'assistant_id' => 123,
'name' => '<string>',
'confirm_side_effects' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.famulor.de/api/user/automate/templates/{key}"
payload := strings.NewReader("{\n \"params\": {},\n \"assistant_id\": 123,\n \"name\": \"<string>\",\n \"confirm_side_effects\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.famulor.de/api/user/automate/templates/{key}")
.header("Content-Type", "application/json")
.body("{\n \"params\": {},\n \"assistant_id\": 123,\n \"name\": \"<string>\",\n \"confirm_side_effects\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.famulor.de/api/user/automate/templates/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"params\": {},\n \"assistant_id\": 123,\n \"name\": \"<string>\",\n \"confirm_side_effects\": true\n}"
response = http.request(request)
puts response.read_body{
"automation_id": "aB3xYz01MnOpQrStUvWxY",
"webhook_url": null,
"status": "active",
"test": {
"run_status": "SUCCEEDED",
"steps": []
},
"response": null,
"binding": {
"type": "post_call",
"assistant_id": 123,
"bound": true
}
}
{
"message": "These values are required: spreadsheet_id. Ask the user for them — never guess or reuse example values.",
"error": "missing_params",
"params": [
{
"key": "spreadsheet_id",
"label": "Google Spreadsheet ID",
"description": "The spreadsheet to append rows to.",
"required": true,
"example": "1AbCdEfGhIjKlMnOpQrStUvWxYz"
}
]
}
{
"message": "No template with that key — call the template list first.",
"error": "template_not_found",
"params": null
}
Automatizaciones
Aplicar plantilla de automatización
Crea una automatización de Famulor a partir de una plantilla lista para usar y compruébala con una ejecución de prueba real.
POST
/
api
/
user
/
automate
/
templates
/
{key}
Aplicar plantilla de automatización
curl --request POST \
--url https://app.famulor.de/api/user/automate/templates/{key} \
--header 'Content-Type: application/json' \
--data '
{
"params": {},
"assistant_id": 123,
"name": "<string>",
"confirm_side_effects": true
}
'import requests
url = "https://app.famulor.de/api/user/automate/templates/{key}"
payload = {
"params": {},
"assistant_id": 123,
"name": "<string>",
"confirm_side_effects": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({params: {}, assistant_id: 123, name: '<string>', confirm_side_effects: true})
};
fetch('https://app.famulor.de/api/user/automate/templates/{key}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.famulor.de/api/user/automate/templates/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'params' => [
],
'assistant_id' => 123,
'name' => '<string>',
'confirm_side_effects' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.famulor.de/api/user/automate/templates/{key}"
payload := strings.NewReader("{\n \"params\": {},\n \"assistant_id\": 123,\n \"name\": \"<string>\",\n \"confirm_side_effects\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.famulor.de/api/user/automate/templates/{key}")
.header("Content-Type", "application/json")
.body("{\n \"params\": {},\n \"assistant_id\": 123,\n \"name\": \"<string>\",\n \"confirm_side_effects\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.famulor.de/api/user/automate/templates/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"params\": {},\n \"assistant_id\": 123,\n \"name\": \"<string>\",\n \"confirm_side_effects\": true\n}"
response = http.request(request)
puts response.read_body{
"automation_id": "aB3xYz01MnOpQrStUvWxY",
"webhook_url": null,
"status": "active",
"test": {
"run_status": "SUCCEEDED",
"steps": []
},
"response": null,
"binding": {
"type": "post_call",
"assistant_id": 123,
"bound": true
}
}
{
"message": "These values are required: spreadsheet_id. Ask the user for them — never guess or reuse example values.",
"error": "missing_params",
"params": [
{
"key": "spreadsheet_id",
"label": "Google Spreadsheet ID",
"description": "The spreadsheet to append rows to.",
"required": true,
"example": "1AbCdEfGhIjKlMnOpQrStUvWxYz"
}
]
}
{
"message": "No template with that key — call the template list first.",
"error": "template_not_found",
"params": null
}
API de Famulor 1.0 (legado). Esta página se aplica únicamente a Famulor 1.0 (
app.famulor.de) y se conserva por compatibilidad. Para la plataforma actual, usa la referencia de la API de Famulor 2.0.Las plantillas marcadas con
side_effects: true realmente envían mensajes o inician llamadas durante su ejecución de prueba: aplicarlas requiere confirm_side_effects: true, y la prueba se dirige a los valores reales que has proporcionado. Nunca apliques una plantilla con valores de ejemplo o inventados.Parámetros de ruta
string
requerido
La clave de la plantilla (obtenida de Listar plantillas de automatización). Una clave desconocida devuelve un
404.Cuerpo de la solicitud
object
Los parámetros de la plantilla como pares clave-valor; consulta la lista
params de la plantilla para saber qué necesita cada uno. Los parámetros obligatorios que falten devuelven un 422 (missing_params) con el detalle exacto de lo que se necesita. Máx. 64 KB.integer
El asistente al que se vincula la automatización resultante. Obligatorio para plantillas con
requires_assistant: true.string
Un nombre personalizado para la automatización (máx. 255 caracteres); por defecto usa el nombre de la plantilla
boolean
Obligatorio (
true) para plantillas marcadas con side_effects: trueRespuesta
El mismo formato de Crear automatización:automation_id, webhook_url (para plantillas activadas por webhook, como lead-intake-webhook y las de consulta durante la llamada; null para plantillas de eventos de asistente), status (active / active_untested / test_failed), test (run_status + resultado por paso), response, binding. Devuelve 201 cuando la automatización está activa y 200 cuando su ejecución de prueba falla.
Una plantilla cuya ejecución de prueba se detiene en un paso de Retraso (p. ej. post-call-callback) reporta run_status: "PAUSED"; eso es un éxito, no un fallo: todos los pasos anteriores al retraso se ejecutaron, y la ejecución se reanuda en el momento previsto.
Códigos de error (422)
Los fallos graves devuelven{"message": "...", "error": "<code>", "params": ...} y no se crea nada. Códigos destacados:
| error | Significado |
|---|---|
missing_params | Faltan parámetros obligatorios: el array params de la respuesta indica sus especificaciones completas. |
invalid_param_choice | Un parámetro hace referencia a un recurso (p. ej. una hoja de cálculo) que no existe en tu cuenta conectada; el mensaje enumera las opciones reales por nombre. |
needs_connection / needs_reconnection | Falta una conexión de cuenta obligatoria, o está rota; el mensaje contiene los pasos exactos para solucionarlo en la app de Famulor (una sola vez). |
side_effects_require_confirmation | La plantilla envía datos de verdad: vuelve a intentarlo con confirm_side_effects: true. |
assistant_required / assistant_not_found / binding_conflict | Igual que en Crear automatización. |
{
"automation_id": "aB3xYz01MnOpQrStUvWxY",
"webhook_url": null,
"status": "active",
"test": {
"run_status": "SUCCEEDED",
"steps": []
},
"response": null,
"binding": {
"type": "post_call",
"assistant_id": 123,
"bound": true
}
}
{
"message": "These values are required: spreadsheet_id. Ask the user for them — never guess or reuse example values.",
"error": "missing_params",
"params": [
{
"key": "spreadsheet_id",
"label": "Google Spreadsheet ID",
"description": "The spreadsheet to append rows to.",
"required": true,
"example": "1AbCdEfGhIjKlMnOpQrStUvWxYz"
}
]
}
{
"message": "No template with that key — call the template list first.",
"error": "template_not_found",
"params": null
}
Páginas relacionadas: Listar plantillas de automatización, Crear automatización, y Autenticación.