Skip to Content

Send Email with Gmail

Send email with Gmail

Billable OperationProviderBilling Mode
Docs
Connection
Docs
Cost per operation
Docs
send-email-gmail
P
Gmail
n/a
User

n/a

Input Fields

string
email
string
email_body
string
email_subject

Output Fields

boolean
gmail_email_success

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));