n8n auto-hébergé | automatisation sécurisée et évolutive
🎥 Watch This Tutorial
Telegram – a new era of messaging
Telegram credentials | n8n Docs
// Parse the Telegram message and extract three comma-separated values
const messageText = $input.first().json.message.text;
// Split by commas and trim whitespace
const parts = messageText.split(';').map(part => part.trim());
// Extract the three values
const sector = parts[0] || '';
const limit = parseInt(parts[1]) || 0;
const mapsUrl = parts[2] || '';
// Return the parsed data as a JSON object
return [
{
json: {
sector: sector,
limit: limit,
mapsUrl: mapsUrl
}
}
];
{
"includeWebResults": false,
"language": "fr",
"locationQuery": "",
"maxCrawledPlacesPerSearch": {{ $('Extract Input Data').item.json.limit }},
"maxImages": 0,
"maximumLeadsEnrichmentRecords": 0,
"scrapeContacts": false,
"scrapeDirectories": false,
"scrapeImageAuthors": false,
"scrapePlaceDetailPage": false,
"scrapeReviewsPersonalData": true,
"scrapeTableReservationProvider": false,
"searchStringsArray": [
"{{ $('Extract Input Data').item.json.sector }}"
],
"skipClosedPlaces": false,
"startUrls": [
{
"url": "{{ $('Extract Input Data').item.json.mapsUrl }}"
}
]
}