I have a list of Telegram post links, and I want to use a formula like IMPORTXML to automatically import their post views to Google Sheet.

I know this formula import the number of subscribers to Google Sheet:

=value(substitute(regexextract(importxml(A1,"//div[@class='tgme_page_extra']"),"[0-9 ]+")," ",""))

But I couldn't change it to something that imports the post views.
Could anybody please help me?

1 Answer 1


First, since Telegram uses Iframe to display the post on the web page, you should use the Iframe's target URL in your URL list (by adding ?embed=1 to URLs. And then you can use this formula:

=IMPORTXML(A1, "//span[contains(@class, 'tgme_widget_message_views')]")

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.