Green API icon

Green API

Send WhatsApp messages via Green API

Message → Send Location

AI-generated

Overview

This node operation sends a location message via WhatsApp using the Green API. It allows users to specify the chat ID, latitude, longitude, and optionally the name and address of the location. This is useful for sharing precise geographic locations in chats, such as meeting points, business locations, or event venues.

Use Case Examples

  1. Sending a restaurant location to a friend in a private chat.
  2. Sharing the address and coordinates of a conference venue in a group chat.

Properties

Name Meaning
Chat ID The identifier of the chat where the location message will be sent. For private chats, use the format phone@c.us; for group chats, use chatId@g.us.
Location Name Optional name of the location to be sent, e.g., 'Restaurant'.
Address Optional address of the location, e.g., '123456, Perm'.
Latitude The latitude coordinate of the location. This is a required numeric value.
Longitude The longitude coordinate of the location. This is a required numeric value.
Quoted Message ID Optional ID of a message to quote in the chat when sending the location.

Output

JSON

  • chatId - The chat identifier where the location message was sent.
  • latitude - Latitude coordinate of the sent location.
  • longitude - Longitude coordinate of the sent location.
  • nameLocation - Optional name of the location sent.
  • address - Optional address of the location sent.
  • quotedMessageId - Optional ID of the quoted message if provided.
  • response - The response from the Green API after sending the location message.

Dependencies

  • Green API service
  • API credentials including instance ID and API token

Troubleshooting

  • Ensure the chat ID is correctly formatted for private or group chats.
  • Verify that latitude and longitude are valid numeric values.
  • Check API credentials and network connectivity if requests fail.
  • Error messages include details about the failure and the data sent, aiding debugging.

Links

Discussion