@weldable/integration-gmail
v1.1.0
Published
Gmail send and search actions for Weldable
Maintainers
Readme
@weldable/integration-gmail
Gmail send and search actions for Weldable.
Part of the Weldable integration library — see @weldable/integration-core for the full catalog.
Install
npm install @weldable/integration-gmail @weldable/integration-core@weldable/integration-core is a peer dependency and must be installed alongside this package.
Usage
import integration from '@weldable/integration-gmail'
// Search your inbox
const list = integration.actions.find(a => a.id === 'gmail.list_messages')!
const messages = await list.execute(
{ q: 'from:[email protected] is:unread', maxResults: 5 },
ctx, // ActionContext from your Weldable-compatible host
)
// Send an email (RFC 2822 format, base64url-encoded)
const send = integration.actions.find(a => a.id === 'gmail.send_message')!
const raw = btoa(
'To: [email protected]\r\n' +
'Subject: Weekly report\r\n' +
'Content-Type: text/plain\r\n\r\n' +
'Here is your weekly summary.'
).replace(/\+/g, '-').replace(/\//g, '_')
await send.execute({ raw }, ctx)Contributing and releasing
See CONTRIBUTING.md in @weldable/integration-core for the development workflow and release process.
License
MIT
