Actions55
- Message Actions
- Contact Actions
- Chat Actions
- Group Actions
- Queue Actions
- Account Actions
- Session Actions
- Session Control Actions
- Call Actions
Session → Get Screen
AI-generatedOverview
This node integrates with the Maytapi WhatsApp Unofficial API, enabling automation and interaction with WhatsApp accounts through various resources such as messages, contacts, chats, groups, queues, calls, sessions, session controls, and account management.
Specifically for the Session resource and the Get Screen operation, the node retrieves a screenshot image of the current WhatsApp session screen. This can be useful for monitoring or debugging purposes, such as visually confirming the session state or capturing the QR code scanning status without manual intervention.
Practical example:
- Automatically capture and save the current WhatsApp session screen to verify that the session is active and connected.
- Use the screenshot in workflows that require visual confirmation or logging of the WhatsApp client state.
Properties
| Name | Meaning |
|---|---|
| Phone ID Source | Select how to provide the Phone ID: either "From Credentials" (uses Phone ID stored in credentials) or "Custom" (enter a custom Phone ID). |
| Phone ID | The WhatsApp instance Phone ID to use when "Custom" Phone ID Source is selected. Required if using custom source. |
Output
The output contains:
- A JSON object indicating success and a message, e.g.,
{ success: true, message: "Screen captured successfully" }. - A binary data field named
datacontaining the screenshot image in PNG format. This binary data represents the current screen of the WhatsApp session.
This allows downstream nodes to access the screenshot image for saving, processing, or sending elsewhere.
Dependencies
- Requires an API key credential for authenticating with the Maytapi API.
- Needs the Phone ID of the WhatsApp instance, either from credentials or provided manually.
- Uses the Maytapi API endpoint to fetch the session screen image.
- The node uses internal helper methods to prepare the binary data for the screenshot.
Troubleshooting
- Missing Phone ID error: If neither credentials nor custom Phone ID is provided, the node will throw an error stating "Phone ID is required." Ensure you have set the Phone ID correctly.
- API authentication errors: If the API key credential is invalid or missing, requests to Maytapi API will fail. Verify your API key configuration.
- Network or API errors: If the Maytapi service is unreachable or returns errors, the node will throw exceptions. Check network connectivity and Maytapi service status.
- Binary data preparation issues: If the screenshot cannot be properly retrieved or processed, the binary data may be empty or invalid. Confirm the session is active and accessible.
Links and References
- Maytapi Official Website
- Maytapi API Documentation (for detailed API endpoints and usage)
- n8n documentation on Working with Binary Data