Overview
This node queries a PostgreSQL database to retrieve specific contact and message data, then sends a message to the Evolution API. It is useful for workflows that need to extract data from a PostgreSQL database and trigger an action or notification via the Evolution API, such as sending updates or alerts based on database content.
Use Case Examples
- Extract contact and message details from a PostgreSQL database and send a notification message to the Evolution API.
- Run a custom SQL query on PostgreSQL and forward a message to an external API for further processing or alerting.
Properties
| Name | Meaning |
|---|---|
| PostgreSQL Query | The SQL query to run on the PostgreSQL database to fetch data. |
| Message for Evolution API | The message content to send to the Evolution API. |
Output
JSON
responsemessage- Confirmation message indicating the message was sent to the Evolution API.tables- Array of rows returned from the PostgreSQL query containing contact and message details.
Dependencies
- PostgreSQL database connection credentials
- Evolution API credentials including host, instance, and API key
Troubleshooting
- Ensure PostgreSQL credentials are correct and the database is accessible to avoid connection errors.
- Verify the SQL query syntax and table names to prevent query execution errors.
- Check Evolution API credentials and endpoint URL for proper authorization and connectivity.
- Common error: 'Error fetching tables' indicates issues with the database query or connection; verify credentials and query correctness.
