GmailToolkit
⚠️ DEPRECATION WARNING
This component is deprecated and will be removed in a future version of Nappai. Please migrate to the recommended alternative components.
The GmailToolkit component lets you interact with your Gmail account from within Nappai. It can send emails, read messages, and manage your inbox, all through a single, easy‑to‑use component.
How it Works
When you add the GmailToolkit to your workflow, Nappai first retrieves an OAuth access token for the Gmail API using the credential you selected. It then builds a set of tools (such as send_email, read_email, list_messages, etc.) that can be used by other components in your workflow.
You can also specify a default “From” address and a CSS style that will be applied when the toolkit generates PDF attachments from email content.
Inputs
This component requires a GMail credential.
- Configure the credential in the Credentials section of Nappai.
- Select that credential in the Credential field of this component.
Input Fields
- CSS Style for PDF generation: Style of the PDF file
body {font-family: Arial, sans-serif;line-height: 1.6;max-width: 800px;margin: 0 auto;padding: 20px;}h1, h2 {color: #333;}
- From Email: Format:Nombre o Alias email@dominio.com
- description: Toolkit for gmail operations
Outputs
- BaseToolkit: The toolkit object that contains all Gmail tools (method:
get_gmail_tools
).
Usage Example
- Add GmailToolkit to your canvas.
- Select the GMail credential you created earlier.
- (Optional) Set a From Email address and paste the CSS style above.
- Connect the BaseToolkit output to a SendEmail component to send a message, or to a ReadEmail component to fetch messages. text GmailToolkit (BaseToolkit) → SendEmail (uses BaseToolkit)
Related Components
- GmailSendEmail – Send an email using the Gmail API.
- GmailReadEmail – Retrieve the content of a specific email.
- GmailListMessages – List messages in your inbox or a specific label.
Tips and Best Practices
- Keep the CSS style simple to avoid rendering issues in PDFs.
- Verify that the “From Email” address is correctly formatted; otherwise, Gmail may reject the message.
- Test the component with a small test email before using it in production.
- Use the latest Gmail API scopes to ensure you have the necessary permissions.
Security Considerations
- Store your GMail credential securely in Nappai’s credential store; it contains OAuth client secrets.
- The component uses OAuth tokens that expire; Nappai will refresh them automatically, but ensure the credential has the correct scopes.
- Avoid exposing the BaseToolkit output in public workflows; it contains sensitive access to your Gmail account.