Created
April 29, 2025 19:08
-
-
Save ejscribner/355a46a0a383a4878e65e2230b92c6b5 to your computer and use it in GitHub Desktop.
Load Travel Points of Interest to n8n Webhook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Check if URL argument is provided | |
| if [ "$#" -ne 1 ]; then | |
| echo "Usage: $0 <webhook-url>" | |
| echo "Example: $0 http://localhost:5678/webhook-test/1234-5678-9101112-13141516-17181920" | |
| exit 1 | |
| fi | |
| # URL endpoint from command-line argument | |
| URL="$1" | |
| # Array of points of interest | |
| declare -a points=( | |
| '{ | |
| "raw_body": { | |
| "point_of_interest": { | |
| "title": "Eiffel Tower", | |
| "description": "Iconic iron lattice tower located on the Champ de Mars in Paris, France." | |
| } | |
| } | |
| }' | |
| '{ | |
| "raw_body": { | |
| "point_of_interest": { | |
| "title": "Inca Trail to Machu Picchu", | |
| "description": "Historic hiking trail through the Andes Mountains of Peru, leading to the ancient Incan citadel." | |
| } | |
| } | |
| }' | |
| '{ | |
| "raw_body": { | |
| "point_of_interest": { | |
| "title": "Acropolis of Athens", | |
| "description": "Ancient citadel located on a rocky outcrop above the city of Athens, containing several historically significant buildings including the Parthenon." | |
| } | |
| } | |
| }' | |
| '{ | |
| "raw_body": { | |
| "point_of_interest": { | |
| "title": "Grand Canyon", | |
| "description": "Steep-sided canyon carved by the Colorado River in Arizona, known for its overwhelming size and intricate landscape." | |
| } | |
| } | |
| }' | |
| '{ | |
| "raw_body": { | |
| "point_of_interest": { | |
| "title": "Tsukiji Outer Market", | |
| "description": "Bustling marketplace in Tokyo featuring fresh seafood, traditional foods, and specialty cooking tools, offering an authentic glimpse into Japanese culinary culture." | |
| } | |
| } | |
| }' | |
| '{ | |
| "raw_body": { | |
| "point_of_interest": { | |
| "title": "Blue Lagoon", | |
| "description": "Geothermal spa in southwestern Iceland featuring mineral-rich waters amid a stunning lava field landscape." | |
| } | |
| } | |
| }' | |
| ) | |
| # Loop through each point and make the curl request | |
| for point in "${points[@]}" | |
| do | |
| echo "Sending point of interest..." | |
| curl -X POST "$URL" \ | |
| -H "Content-Type: application/json" \ | |
| -d "$point" | |
| echo -e "\n\nWaiting 2 seconds before next request...\n" | |
| sleep 2 | |
| done | |
| echo "All points of interest have been sent!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment