Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Send Different PDF Files to Multiple Numbers? #6

Open
gijdoul opened this issue Nov 21, 2024 · 1 comment
Open

How to Send Different PDF Files to Multiple Numbers? #6

gijdoul opened this issue Nov 21, 2024 · 1 comment

Comments

@gijdoul
Copy link

gijdoul commented Nov 21, 2024

Hello,

Thank you for the great script! I’m currently testing it, and it works well for sending messages. However, I need help with attaching files.

Here’s my use case:

I have 5 different phone numbers.
For each number, I want to send a unique PDF file along with the message (the PDF is different for each number).
Could you please guide me on how to achieve this? Is there an example or method I can use to attach specific files for each number?

Thank you for your help!

@DarshanParbadiya
Copy link
Owner

Currently, there is no functionality to change the attachments for different contact numbers. While I plan to add this functionality later, I have a suggestion for you in the meantime.

If you are proficient in Python, you can modify the utils/whatsapp_helper.py file. Specifically, you need to update the check_message_type_and_send_message function. At present, this function sends a static image from the image_path instance variable.

image

you can modify the program to read the file path from a CSV file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants