ARTICLE AD BOX
I'm building a scheduled automation in Python that reads rows from
Google Sheets and sends formatted messages to specific Viber
communities based on a branch name column. The script runs 24/7
on a local Windows machine.
What I'm trying to do
- Read rows from Google Sheets using gspread
- For each row that is "due" (3 days since last sent), build a
formatted message
- Send that message to the correct Viber community based on a
branch name mapped to a community ID
- Also send a file attachment (PDF or image) if a link is present
What I've tried
Based on the Viber REST API docs, I'm using the /pa/post endpoint
since I need proactive/outbound sends — not a reply to a user
message. Here is my current implementation:
My questions
1. Is /pa/post the correct endpoint for sending to a Viber
Community proactively (without a user messaging the bot first)?
2. Does the bot need to be set as Admin of the community, or is
being a regular member enough?
3. When sending a file attachment (PDF), is this the correct
payload structure?
4. Are there any known regional restrictions for the Viber Bot API
in the Philippines?
Environment
- Python 3.11
- requests 2.31
- Windows 11
- Viber Bot created at partners.viber.com
Any help is appreciated. Thanks!
