Send email with Gmail
Billable Operation | Provider | Billing Mode Docs | Connection Docs | Cost per operation Docs |
---|---|---|---|---|
send-email-gmail | P Gmail | n/a | User | n/a |
const options = {
method: 'POST',
headers: {'content-type': 'application/json', authorization: 'Bearer <TOKEN>'},
body: JSON.stringify({
config: {environment: 'production'},
pipes: [
{
connector: {
strategy: 'first',
connections: [{connection: '<PROVIDE_YOUR_OWN_CONNECTION_VIA_DASHBOARD>', type: 'vault'}]
},
pipe_id: 'email:send:gmail@1',
config: {reply_to: '<REPLY_TO_EMAIL_ADDRESS>'}
}
],
input: [
{
id: '1',
email: '<EMAIL_ADDRESS>',
email_body: '<EMAIL_TEXT>',
email_subject: '<EMAIL_SUBJECT_LINE>'
}
]
})
};
fetch('https://api.pipe0.com/v1/pipes/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));