The raw
value is showing in the JSON Data field, but it doesn’t appear to be sent because the content-length is 0.
{
meta: {
$param: [
{type: "text", name: "OauthId"},
{type: "text", name: "userid"},
{type: "text", name: "threadId"},
{type: "text", name: "subject"},
{type: "text", name: "fromName"},
{type: "text", name: "fromEmail"},
{type: "text", name: "cookie"},
{type: "array", name: "toName"},
{type: "array", name: "toEmail"},
{type: "text", name: "importance"},
{type: "array", name: "attachments"},
{type: "text", name: "replyTo"},
{type: "array", name: "cc"},
{type: "array", name: "bcc"},
{type: "text", name: "body"},
{type: "text", name: "contentType"},
{type: "boolean", name: "embedImages"}
]
},
exec: {
steps: [
{
serverConnect: {
url: "http://mysite.com/api/v1/auth/refresh_google",
site: "mysite.com-v3",
params: {userid: "{{$param.userid}}"},
credentials: true,
name: "refreshToken",
outputType: "object"
}
},
{
condition: {
if: "{{refreshToken}}",
then: {
steps: [
{
serverConnect: {
url: "http://mysite.com/api/v1/oauth",
site: "mysite.com-v3",
params: {provider: "Google", userid: "{{$param.userid}}"},
credentials: true,
name: "getOauthId",
outputType: "object"
}
},
{
condition: {
if: "{{getOauthId.data.userid.AccessToken}}",
then: {
steps: [
{
api.send: {
method: "POST",
url: "https://mysite.com/api/v1/mail",
data: {
fromName: "{{$param.fromName}}",
fromEmail: "{{$param.fromEmail}}",
replyTo: "{{$param.replyTo}}",
toName: "{{$param.toName}}",
toEmail: "{{$param.toEmail}}",
cc: "{{$param.cc}}",
bcc: "{{$param.bcc}}",
importance: "{{$param.importance}}",
subject: "{{$param.subject}}",
contentType: "{{$param.contentType}}",
body: "{{$param.body}}",
attachments: "{{$param.attachments}}",
embedImages: "{{$param.embedImages}}"
},
params: {
fromName: "{{$param.fromName}}",
fromEmail: "{{$param.fromEmail}}",
replyTo: "{{$param.replyTo}}",
toName: "{{$param.toName}}",
toEmail: "{{$param.toEmail}}",
cc: "{{$param.cc}}",
bcc: "{{$param.bcc}}",
importance: "{{$param.importance}}",
subject: "{{$param.subject}}",
contentType: "{{$param.contentType}}",
body: "{{$param.body}}",
attachments: "{{$param.attachments}}",
embedImages: "{{$param.embedImages}}"
},
schema: [
{
type: "object",
name: "data",
sub: [
{type: "boolean", name: "identity"},
{type: "text", name: "rfc822stream"}
]
},
{
type: "object",
name: "headers",
sub: [
{type: "text", name: "access-control-allow-credentials"},
{type: "text", name: "content-encoding"},
{type: "text", name: "content-type"},
{type: "text", name: "date"},
{type: "text", name: "etag"},
{type: "text", name: "transfer-encoding"},
{type: "text", name: "vary"}
]
}
],
name: "rfc822Streamer",
output: true,
outputType: "object",
meta: [
{
type: "object",
name: "data",
sub: [
{type: "boolean", name: "identity"},
{type: "text", name: "rfc822stream"}
]
},
{
type: "object",
name: "headers",
sub: [
{type: "text", name: "access-control-allow-credentials"},
{type: "text", name: "content-encoding"},
{type: "text", name: "content-type"},
{type: "text", name: "date"},
{type: "text", name: "etag"},
{type: "text", name: "transfer-encoding"},
{type: "text", name: "vary"}
]
}
]
}
},
{
condition: {
if: "{{rfc822Streamer.data.rfc822stream}}",
then: {
steps: [
{
comment: {msg: "Send message"}
},
{
api.send: {
url: "https://gmail.googleapis.com/gmail/v1/users/me/messages/send",
headers: {Authorization: "{{'Bearer '+getOauthId.data.userid.AccessToken}}"},
schema: [
{
type: "object",
name: "data",
sub: [
{type: "text", name: "id"},
{type: "text", name: "historyId"},
{
type: "array",
name: "messages",
sub: [
{type: "text", name: "id"},
{type: "text", name: "threadId"},
{
type: "array",
name: "labelIds",
sub: [
{type: "text", name: "$value"}
]
},
{type: "text", name: "snippet"},
{
type: "object",
name: "payload",
sub: [
{type: "text", name: "partId"},
{type: "text", name: "mimeType"},
{type: "text", name: "filename"},
{
type: "array",
name: "headers",
sub: [
{type: "text", name: "name"},
{type: "text", name: "value"}
]
},
{
type: "object",
name: "body",
sub: [
{type: "number", name: "size"}
]
},
{
type: "array",
name: "parts",
sub: [
{type: "text", name: "partId"},
{type: "text", name: "mimeType"},
{type: "text", name: "filename"},
{
type: "array",
name: "headers",
sub: [
{type: "text", name: "name"},
{type: "text", name: "value"}
]
},
{
type: "object",
name: "body",
sub: [
{type: "number", name: "size"}
]
},
{
type: "array",
name: "parts",
sub: [
{type: "text", name: "partId"},
{type: "text", name: "mimeType"},
{type: "text", name: "filename"},
{
type: "array",
name: "headers",
sub: [
{type: "text", name: "name"},
{type: "text", name: "value"}
]
},
{
type: "object",
name: "body",
sub: [
{type: "number", name: "size"}
]
},
{
type: "array",
name: "parts",
sub: [
{type: "text", name: "partId"},
{type: "text", name: "mimeType"},
{type: "text", name: "filename"},
{
type: "array",
name: "headers",
sub: [
{type: "text", name: "name"},
{type: "text", name: "value"}
]
},
{
type: "object",
name: "body",
sub: [
{type: "number", name: "size"},
{type: "text", name: "data"}
]
}
]
}
]
}
]
}
]
},
{type: "number", name: "sizeEstimate"},
{type: "text", name: "historyId"},
{type: "text", name: "internalDate"}
]
}
]
},
{
type: "object",
name: "headers",
sub: [
{type: "text", name: "alt-svc"},
{type: "text", name: "cache-control"},
{type: "text", name: "content-encoding"},
{type: "text", name: "content-length"},
{type: "text", name: "content-type"},
{type: "text", name: "date"},
{type: "text", name: "server"},
{type: "text", name: "vary"},
{type: "text", name: "x-content-type-options"},
{type: "text", name: "x-xss-protection"}
]
}
],
method: "POST",
data: {
raw: "Q29udGVudC1UeXBlOiBtdWx0aXBhcnQvYWx0ZXJuYXRpdmU7DQogYm91bmRhcnk9Ii0tX05tUC1mOTdhNGMyY2VmYTQ0NzIwLVBhcnRfMSINCkZyb206IEphbmUgRG9lIDxrZWl0aC5mYXdjZXR0MkBnbWFpbC5jb20-DQpUbzogaW5mb0Bzb2Z0bmlvLmNvbQ0KU3ViamVjdDogdGVzdA0KTWVzc2FnZS1JRDogPDk0ODJkMzQ0LWE5MTctMmQ2ZC0xYTdlLTJhZTgyM2U1NGQxY0BnbWFpbC5jb20-DQpYLVByaW9yaXR5OiAxIChIaWdoZXN0KQ0KWC1Nc21haWwtUHJpb3JpdHk6IEhpZ2gNCkltcG9ydGFuY2U6IEhpZ2gNCkRhdGU6IFRodSwgMjcgSnVsIDIwMjMgMTg6Mjk6MDcgKzAwMDANCk1JTUUtVmVyc2lvbjogMS4wDQoNCi0tLS1fTm1QLWY5N2E0YzJjZWZhNDQ3MjAtUGFydF8xDQpDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9dXRmLTgNCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IDdiaXQNCg0KdGVzdA0KLS0tLV9ObVAtZjk3YTRjMmNlZmE0NDcyMC1QYXJ0XzENCkNvbnRlbnQtVHlwZTogdGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04DQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiA3Yml0DQoNCnRlc3QNCi0tLS1fTm1QLWY5N2E0YzJjZWZhNDQ3MjAtUGFydF8xLS0NCg"
},
dataType: "json",
passErrors: false,
name: "messagesSend",
output: true,
outputType: "object",
meta: [
{
type: "object",
name: "data",
sub: [
{type: "text", name: "id"},
{type: "text", name: "historyId"},
{
type: "array",
name: "messages",
sub: [
{type: "text", name: "id"},
{type: "text", name: "threadId"},
{
type: "array",
name: "labelIds",
sub: [
{type: "text", name: "$value"}
]
},
{type: "text", name: "snippet"},
{
type: "object",
name: "payload",
sub: [
{type: "text", name: "partId"},
{type: "text", name: "mimeType"},
{type: "text", name: "filename"},
{
type: "array",
name: "headers",
sub: [
{type: "text", name: "name"},
{type: "text", name: "value"}
]
},
{
type: "object",
name: "body",
sub: [
{type: "number", name: "size"}
]
},
{
type: "array",
name: "parts",
sub: [
{type: "text", name: "partId"},
{type: "text", name: "mimeType"},
{type: "text", name: "filename"},
{
type: "array",
name: "headers",
sub: [
{type: "text", name: "name"},
{type: "text", name: "value"}
]
},
{
type: "object",
name: "body",
sub: [
{type: "number", name: "size"}
]
},
{
type: "array",
name: "parts",
sub: [
{type: "text", name: "partId"},
{type: "text", name: "mimeType"},
{type: "text", name: "filename"},
{
type: "array",
name: "headers",
sub: [
{type: "text", name: "name"},
{type: "text", name: "value"}
]
},
{
type: "object",
name: "body",
sub: [
{type: "number", name: "size"}
]
},
{
type: "array",
name: "parts",
sub: [
{type: "text", name: "partId"},
{type: "text", name: "mimeType"},
{type: "text", name: "filename"},
{
type: "array",
name: "headers",
sub: [
{type: "text", name: "name"},
{type: "text", name: "value"}
]
},
{
type: "object",
name: "body",
sub: [
{type: "number", name: "size"},
{type: "text", name: "data"}
]
}
]
}
]
}
]
}
]
},
{type: "number", name: "sizeEstimate"},
{type: "text", name: "historyId"},
{type: "text", name: "internalDate"}
]
}
]
},
{
type: "object",
name: "headers",
sub: [
{type: "text", name: "alt-svc"},
{type: "text", name: "cache-control"},
{type: "text", name: "content-encoding"},
{type: "text", name: "content-length"},
{type: "text", name: "content-type"},
{type: "text", name: "date"},
{type: "text", name: "server"},
{type: "text", name: "vary"},
{type: "text", name: "x-content-type-options"},
{type: "text", name: "x-xss-protection"}
]
}
]
}
}
]
},
outputType: "boolean"
}
}
]
},
outputType: "boolean"
}
}
]
},
outputType: "boolean"
}
}
]
}
}