Best answer

Strategies for Parsing / Presenting Info From an XML Feed?


Userlevel 2

Hi Zapier Godz!

I’m still a Zapier noob and a tech mortal. Currently, I’m working on some fun Zaps from an MMO game I play online that offers all kinds of really cool data feeds out of the game. For one, they offer XML feeds of all the towns in the game (this is a massive file,), as well as feeds for the game’s map, players, alliances, etc. Additionally, players can generate their own personal XML data feeds for their in-game notifications, combat data, etc. as you can imagine, the possibilities are limitless.

 

Are any good strategies for creating Zaps that leverage XML data feeds like these? I’m not a programmer, so I’m not fluent in working in this space. I’ve tried using the IMPORTXML feature in Google Sheets, but to no avail because I can’t seem to find an X_Path query that works with the game’s XML town feed. I’m also not seeing any apps in Zapier that explicitly deal with working with XML.

 

Any thoughts?   

icon

Best answer by Danvers 18 June 2020, 15:08

If anyone is looking to do something similar, there’s isn’t an easy way to do this I’m afraid. Here’s what the Support Team said:

 

At this time, we don't have any apps on Zapier that can parse XML without some legwork. Google Sheets is what I would have normally recommended but it looks like you've already tried that. The only other option is to use a Code by Zapier step but that's pretty technical.

Stack Overflow is a good resource for questions like this, though: http://stackoverflow.com. Just tag your question with a “Zapier” tag and usually there will be folks who are willing to help you out. You can see all the questions that have already been asked here: https://stackoverflow.com/questions/tagged/zapier
 

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Userlevel 7
Badge +7

Hi @Jejune ,

Thanks for reaching out- interesting workflow!!

I have escalated this to Support as they are more familiar with XML and can dig into this for you. They will be in touch just as soon as they can!

Keep us posted on how your workflow comes together!

Userlevel 2

Many thanks @Liz_Roberts . I was finally able to start using IMPORTXML in Google Sheets, but I would be much more interested in having a Zapier app that would let me easily extract certain things from an XML feed and then do things with them. I think it would be a great tool!

Userlevel 7
Badge +11

Hi @Jejune! Thanks for your thoughts on this. We have a couple of feature requests for the Formatter around parsing XML into fields that would be usable in a Zap, do you think that would cover what you’re looking for or would you be looking for something specifically around triggering off the feed? If you let me know than I can either add you to a feature request or create one 🙂

Userlevel 2

Hiya @Danvers -- thanks very much for looking into this. For my purposes in working with the XML data feeds from Illyriad, I would most likely be using them in tandem with Slack and Google Sheets. What would be great is to be able to grab specific items from an XML feed as they come in and auto-push them into a Google Sheet and/or Slack channel.

 

Just as I had shown before, the game has general XML data feeds, such as for players, alliances, towns, etc., but individual players can also generate API “keys” to all of their combat data, notifications, and in-game mail. This is an example of a notification feed. Notice how each action in the game has a notification type and ID. Some of these are really important for an entire guild/alliance to see happening in real-time. For example:

<notification>

<notification id="1338978037"/>

<notificationtype id="68">Military Army Dispatched</notificationtype>

<notificationoveralltype id="4">Military</notificationoveralltype>

<notificationtown id="519320"/>

<notificationdetail>Military units from [@ps=Darth Tardigrade|398092|YARR!|1278|1|0||||0-387-284-60] town [@t=Darth A|518392|366|-1812|1026|398092|1|0|51|1|Darth Tardigrade|YARR!|0|1-2] inbound to [@ps=Jejune|394156|ELVES|2123|2|0|0-364-0-0-0-0-0-609-0-0-0-0-545|Ring of the Firstborn|People of the Stars|0-385-263-34] town [@t=Malek|519320|368|-1820|546|394156|2|1|51|0|Jejune|ELVES|0|2-2 wall] with Hostile intentions.</notificationdetail>

<notificationoccurrencedate>2020-05-19T21:13:57.060</notificationoccurrencedate>

</notification>

 

If every player in a group gives app their notifications key, there can be an “incoming” channel in Slack so that as soon as a hostile army in inbound to anyone’s city, the whole alliance sees it and can respond.

 

In the past, the only way that players could wield data like this was to know how to code and use databases. Now,  with Zapier, even someone like myself can use A Zapier parser, a Google Sheet, and Slack to basically accomplish the same functionality. 

 

By the way, the skills and uses that I’m developing for this game is also translating into use for my company as well, which heavily uses Slack. So, I’m seeing a lot of crossover value here.  : )

 

 

 

 

Userlevel 7
Badge +11

If anyone is looking to do something similar, there’s isn’t an easy way to do this I’m afraid. Here’s what the Support Team said:

 

At this time, we don't have any apps on Zapier that can parse XML without some legwork. Google Sheets is what I would have normally recommended but it looks like you've already tried that. The only other option is to use a Code by Zapier step but that's pretty technical.

Stack Overflow is a good resource for questions like this, though: http://stackoverflow.com. Just tag your question with a “Zapier” tag and usually there will be folks who are willing to help you out. You can see all the questions that have already been asked here: https://stackoverflow.com/questions/tagged/zapier