Skip to content

Instantly share code, notes, and snippets.

View lu4t's full-sized avatar

lu4t lu4t

  • Madrid, Spain
  • 13:09 (UTC +02:00)
  • X @lu4t_
View GitHub Profile
@lu4t
lu4t / gist:ea37107995fdfa7ce78494443c38b951
Last active December 29, 2024 10:58
Validate and Fetch whatsapp DP on a google sheet (app script).
Following this guide you will be able to validate if a number is registered on whatsapp, and fetch its Display Picture (if available).
The API used on the guide can be found here: https://rapidapi.com/inutil-inutil-default/api/whatsapp-profile-pic
---
After you create a new Google Sheet, add a dummy phone number in a cell... Let's say the phone is added to cell E10.
Click in the next cell, then go to Extensions > Apps Script.
The first script will validate if the number is registered on whatsapp.
@lu4t
lu4t / gist:6b402667bd0de461125ef7a56f374c2e
Created July 21, 2023 11:44
node-red flows to manage a mywhin instance
[
{
"id": "1a7d158148fe5b79",
"type": "inject",
"z": "bbd7ed3209eaa6b7",
"name": "status",
"props": [
{
"p": "command",
@lu4t
lu4t / wa-pic-url.py
Last active May 1, 2023 09:00
fetch wa profile pic url programmatically
# API used: https://rapidapi.com/inutil-inutil-default/api/whatsapp-profile-pic/details
# This example fetchs the profile pic of the phone number: 34605797764 change this value according to your needs.
import requests
url = "https://whatsapp-profile-pic.p.rapidapi.com/wspic/url"
querystring = {"phone":"34605797764"}
headers = {
@lu4t
lu4t / gist:fcd3439b1bb01c640377e628885bfa39
Created March 21, 2023 20:56
Google form answers, on a whatsapp group
Google form answers, on a whatsapp group
1- create a new google form.
2- create the whatsapp group that will receive notifications.
3- get the unique url of the whatsapp group, for IFTTT.
4- create an ifttt applet, that will be sending a message to the whatsapp group, when a new form answer is received.
@lu4t
lu4t / gist:662809618a6305a0085330390aeed390
Created December 1, 2022 20:31
webhook to whatsapp groups
# The url used on the video has this structure:
https://whin2.p.rapidapi.com/hook/YOUR_RAPID_USERNAME/?rapidapi-key=YOUR_APIKEY&gid=YOUR_GROUP-ID
# This is the schema you need to use on the webhook origin if it does not allow to use headers.
# The API used on the video can be found here:
@lu4t
lu4t / HA_whin.yaml
Last active April 4, 2023 16:46
whin on HA - whatsapp to groups
# add this on the configuration.yaml file of HA
# the a free api key from: https://rapidapi.com/inutil-inutil-default/api/whin2/
rest_command:
send_whatsapp_to_me:
url: "https://whin2.p.rapidapi.com/send"
method: POST
headers:
content-type: application/json