curl --request POST \
--url https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/routing-form \
--header 'Content-Type: application/json' \
--data '
{
"name": "Platform Test Workflow",
"activation": {
"isActiveOnAllRoutingForms": false,
"activeOnRoutingFormIds": [
"abd1-123edf-a213d-123dfwf"
]
},
"trigger": {
"type": "formSubmitted"
},
"steps": [
{
"action": "email_address",
"stepNumber": 1,
"recipient": "attendee",
"template": "reminder",
"sender": "<string>",
"verifiedEmailId": 31214,
"includeCalendarEvent": true,
"message": {
"subject": "Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com",
"html": "<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>"
},
"autoTranslateEnabled": false,
"sourceLocale": "en"
}
]
}
'import requests
url = "https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/routing-form"
payload = {
"name": "Platform Test Workflow",
"activation": {
"isActiveOnAllRoutingForms": False,
"activeOnRoutingFormIds": ["abd1-123edf-a213d-123dfwf"]
},
"trigger": { "type": "formSubmitted" },
"steps": [
{
"action": "email_address",
"stepNumber": 1,
"recipient": "attendee",
"template": "reminder",
"sender": "<string>",
"verifiedEmailId": 31214,
"includeCalendarEvent": True,
"message": {
"subject": "Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com",
"html": "<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>"
},
"autoTranslateEnabled": False,
"sourceLocale": "en"
}
]
}
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({
name: 'Platform Test Workflow',
activation: {
isActiveOnAllRoutingForms: false,
activeOnRoutingFormIds: ['abd1-123edf-a213d-123dfwf']
},
trigger: {type: 'formSubmitted'},
steps: [
{
action: 'email_address',
stepNumber: 1,
recipient: 'attendee',
template: 'reminder',
sender: '<string>',
verifiedEmailId: 31214,
includeCalendarEvent: true,
message: {
subject: 'Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com',
html: '<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>'
},
autoTranslateEnabled: false,
sourceLocale: 'en'
}
]
})
};
fetch('https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/routing-form', 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://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/routing-form",
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([
'name' => 'Platform Test Workflow',
'activation' => [
'isActiveOnAllRoutingForms' => false,
'activeOnRoutingFormIds' => [
'abd1-123edf-a213d-123dfwf'
]
],
'trigger' => [
'type' => 'formSubmitted'
],
'steps' => [
[
'action' => 'email_address',
'stepNumber' => 1,
'recipient' => 'attendee',
'template' => 'reminder',
'sender' => '<string>',
'verifiedEmailId' => 31214,
'includeCalendarEvent' => true,
'message' => [
'subject' => 'Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com',
'html' => '<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>'
],
'autoTranslateEnabled' => false,
'sourceLocale' => 'en'
]
]
]),
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://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/routing-form"
payload := strings.NewReader("{\n \"name\": \"Platform Test Workflow\",\n \"activation\": {\n \"isActiveOnAllRoutingForms\": false,\n \"activeOnRoutingFormIds\": [\n \"abd1-123edf-a213d-123dfwf\"\n ]\n },\n \"trigger\": {\n \"type\": \"formSubmitted\"\n },\n \"steps\": [\n {\n \"action\": \"email_address\",\n \"stepNumber\": 1,\n \"recipient\": \"attendee\",\n \"template\": \"reminder\",\n \"sender\": \"<string>\",\n \"verifiedEmailId\": 31214,\n \"includeCalendarEvent\": true,\n \"message\": {\n \"subject\": \"Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com\",\n \"html\": \"<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>\"\n },\n \"autoTranslateEnabled\": false,\n \"sourceLocale\": \"en\"\n }\n ]\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://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/routing-form")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Platform Test Workflow\",\n \"activation\": {\n \"isActiveOnAllRoutingForms\": false,\n \"activeOnRoutingFormIds\": [\n \"abd1-123edf-a213d-123dfwf\"\n ]\n },\n \"trigger\": {\n \"type\": \"formSubmitted\"\n },\n \"steps\": [\n {\n \"action\": \"email_address\",\n \"stepNumber\": 1,\n \"recipient\": \"attendee\",\n \"template\": \"reminder\",\n \"sender\": \"<string>\",\n \"verifiedEmailId\": 31214,\n \"includeCalendarEvent\": true,\n \"message\": {\n \"subject\": \"Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com\",\n \"html\": \"<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>\"\n },\n \"autoTranslateEnabled\": false,\n \"sourceLocale\": \"en\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/routing-form")
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 \"name\": \"Platform Test Workflow\",\n \"activation\": {\n \"isActiveOnAllRoutingForms\": false,\n \"activeOnRoutingFormIds\": [\n \"abd1-123edf-a213d-123dfwf\"\n ]\n },\n \"trigger\": {\n \"type\": \"formSubmitted\"\n },\n \"steps\": [\n {\n \"action\": \"email_address\",\n \"stepNumber\": 1,\n \"recipient\": \"attendee\",\n \"template\": \"reminder\",\n \"sender\": \"<string>\",\n \"verifiedEmailId\": 31214,\n \"includeCalendarEvent\": true,\n \"message\": {\n \"subject\": \"Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com\",\n \"html\": \"<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>\"\n },\n \"autoTranslateEnabled\": false,\n \"sourceLocale\": \"en\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": [
{
"id": 101,
"name": "Platform Test Workflow",
"type": "routing-form",
"activation": {
"isActiveOnAllRoutingForms": false,
"activeOnRoutingFormIds": [
"5cacdec7-1234-6e1b-78d9-7bcda8a1b332"
]
},
"trigger": {
"type": "formSubmitted",
"offset": {
"value": 24,
"unit": "hour"
}
},
"steps": [
{
"id": 67244,
"stepNumber": 1,
"recipient": "const",
"template": "reminder",
"sender": "Cal.com Notifications",
"message": {
"subject": "Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com",
"html": "<p>Reminder for {EVENT_NAME}.</p>",
"text": "Reminder for {EVENT_NAME}."
},
"action": "email_host",
"email": "notifications@example.com",
"phone": "<string>",
"phoneRequired": true,
"includeCalendarEvent": true,
"skipNoShowAttendees": false,
"autoTranslateEnabled": false,
"sourceLocale": "en",
"pathId": "3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01"
}
],
"userId": 2313,
"teamId": 4214321,
"createdAt": "2024-05-12T10:00:00.000Z",
"updatedAt": "2024-05-12T11:30:00.000Z"
}
]
}Create organization team workflow for routing-forms
Required membership role: team admin. PBAC permission: workflow.create. Learn more about API access control at https://cal.com/docs/api-reference/v2/access-control. If accessed using an OAuth access token, the TEAM_WORKFLOW_WRITE scope is required.
curl --request POST \
--url https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/routing-form \
--header 'Content-Type: application/json' \
--data '
{
"name": "Platform Test Workflow",
"activation": {
"isActiveOnAllRoutingForms": false,
"activeOnRoutingFormIds": [
"abd1-123edf-a213d-123dfwf"
]
},
"trigger": {
"type": "formSubmitted"
},
"steps": [
{
"action": "email_address",
"stepNumber": 1,
"recipient": "attendee",
"template": "reminder",
"sender": "<string>",
"verifiedEmailId": 31214,
"includeCalendarEvent": true,
"message": {
"subject": "Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com",
"html": "<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>"
},
"autoTranslateEnabled": false,
"sourceLocale": "en"
}
]
}
'import requests
url = "https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/routing-form"
payload = {
"name": "Platform Test Workflow",
"activation": {
"isActiveOnAllRoutingForms": False,
"activeOnRoutingFormIds": ["abd1-123edf-a213d-123dfwf"]
},
"trigger": { "type": "formSubmitted" },
"steps": [
{
"action": "email_address",
"stepNumber": 1,
"recipient": "attendee",
"template": "reminder",
"sender": "<string>",
"verifiedEmailId": 31214,
"includeCalendarEvent": True,
"message": {
"subject": "Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com",
"html": "<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>"
},
"autoTranslateEnabled": False,
"sourceLocale": "en"
}
]
}
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({
name: 'Platform Test Workflow',
activation: {
isActiveOnAllRoutingForms: false,
activeOnRoutingFormIds: ['abd1-123edf-a213d-123dfwf']
},
trigger: {type: 'formSubmitted'},
steps: [
{
action: 'email_address',
stepNumber: 1,
recipient: 'attendee',
template: 'reminder',
sender: '<string>',
verifiedEmailId: 31214,
includeCalendarEvent: true,
message: {
subject: 'Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com',
html: '<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>'
},
autoTranslateEnabled: false,
sourceLocale: 'en'
}
]
})
};
fetch('https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/routing-form', 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://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/routing-form",
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([
'name' => 'Platform Test Workflow',
'activation' => [
'isActiveOnAllRoutingForms' => false,
'activeOnRoutingFormIds' => [
'abd1-123edf-a213d-123dfwf'
]
],
'trigger' => [
'type' => 'formSubmitted'
],
'steps' => [
[
'action' => 'email_address',
'stepNumber' => 1,
'recipient' => 'attendee',
'template' => 'reminder',
'sender' => '<string>',
'verifiedEmailId' => 31214,
'includeCalendarEvent' => true,
'message' => [
'subject' => 'Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com',
'html' => '<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>'
],
'autoTranslateEnabled' => false,
'sourceLocale' => 'en'
]
]
]),
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://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/routing-form"
payload := strings.NewReader("{\n \"name\": \"Platform Test Workflow\",\n \"activation\": {\n \"isActiveOnAllRoutingForms\": false,\n \"activeOnRoutingFormIds\": [\n \"abd1-123edf-a213d-123dfwf\"\n ]\n },\n \"trigger\": {\n \"type\": \"formSubmitted\"\n },\n \"steps\": [\n {\n \"action\": \"email_address\",\n \"stepNumber\": 1,\n \"recipient\": \"attendee\",\n \"template\": \"reminder\",\n \"sender\": \"<string>\",\n \"verifiedEmailId\": 31214,\n \"includeCalendarEvent\": true,\n \"message\": {\n \"subject\": \"Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com\",\n \"html\": \"<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>\"\n },\n \"autoTranslateEnabled\": false,\n \"sourceLocale\": \"en\"\n }\n ]\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://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/routing-form")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Platform Test Workflow\",\n \"activation\": {\n \"isActiveOnAllRoutingForms\": false,\n \"activeOnRoutingFormIds\": [\n \"abd1-123edf-a213d-123dfwf\"\n ]\n },\n \"trigger\": {\n \"type\": \"formSubmitted\"\n },\n \"steps\": [\n {\n \"action\": \"email_address\",\n \"stepNumber\": 1,\n \"recipient\": \"attendee\",\n \"template\": \"reminder\",\n \"sender\": \"<string>\",\n \"verifiedEmailId\": 31214,\n \"includeCalendarEvent\": true,\n \"message\": {\n \"subject\": \"Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com\",\n \"html\": \"<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>\"\n },\n \"autoTranslateEnabled\": false,\n \"sourceLocale\": \"en\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cal.com/v2/organizations/{orgId}/teams/{teamId}/workflows/routing-form")
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 \"name\": \"Platform Test Workflow\",\n \"activation\": {\n \"isActiveOnAllRoutingForms\": false,\n \"activeOnRoutingFormIds\": [\n \"abd1-123edf-a213d-123dfwf\"\n ]\n },\n \"trigger\": {\n \"type\": \"formSubmitted\"\n },\n \"steps\": [\n {\n \"action\": \"email_address\",\n \"stepNumber\": 1,\n \"recipient\": \"attendee\",\n \"template\": \"reminder\",\n \"sender\": \"<string>\",\n \"verifiedEmailId\": 31214,\n \"includeCalendarEvent\": true,\n \"message\": {\n \"subject\": \"Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com\",\n \"html\": \"<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>\"\n },\n \"autoTranslateEnabled\": false,\n \"sourceLocale\": \"en\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": [
{
"id": 101,
"name": "Platform Test Workflow",
"type": "routing-form",
"activation": {
"isActiveOnAllRoutingForms": false,
"activeOnRoutingFormIds": [
"5cacdec7-1234-6e1b-78d9-7bcda8a1b332"
]
},
"trigger": {
"type": "formSubmitted",
"offset": {
"value": 24,
"unit": "hour"
}
},
"steps": [
{
"id": 67244,
"stepNumber": 1,
"recipient": "const",
"template": "reminder",
"sender": "Cal.com Notifications",
"message": {
"subject": "Reminder: Your Meeting {EVENT_NAME} - {EVENT_DATE_ddd, MMM D, YYYY h:mma} with Cal.com",
"html": "<p>Reminder for {EVENT_NAME}.</p>",
"text": "Reminder for {EVENT_NAME}."
},
"action": "email_host",
"email": "notifications@example.com",
"phone": "<string>",
"phoneRequired": true,
"includeCalendarEvent": true,
"skipNoShowAttendees": false,
"autoTranslateEnabled": false,
"sourceLocale": "en",
"pathId": "3f4c11a2-9b7e-4d15-8f0a-2f7de41b6c01"
}
],
"userId": 2313,
"teamId": 4214321,
"createdAt": "2024-05-12T10:00:00.000Z",
"updatedAt": "2024-05-12T11:30:00.000Z"
}
]
}Headers
For non-platform customers - value must be Bearer <token> where <token> is api key prefixed with cal_
For platform customers - OAuth client secret key
For platform customers - OAuth client ID
Path Parameters
The team's uuid (preferred), its short-uuid (Flickr Base58) form, or its numeric id.
Body
Name of the workflow
"Platform Test Workflow"
Activation settings for the workflow
Show child attributes
Show child attributes
Trigger configuration for the routing-form workflow, allowed triggers are formSubmitted,formSubmittedNoEvent
- Form Submitted
- Form Submitted Without Event
Show child attributes
Show child attributes
Steps to execute as part of the routing-form workflow, allowed steps are email_attendee,email_address,sms_attendee,sms_number
- Email Address
- Email Attendee
- SMS Attendee
- SMS Number
Show child attributes
Show child attributes
Was this page helpful?