cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

RSS (XML) to Twitter with a photo

Below is a snippet of the XML from an RSS feed. 

I would like to post a Tweet with an image. 

The link to the image is in the enclosed URL tag (replace the & with & to view the image).  

E.g.

https://scontent-ort2-2.cdninstagram.com/v/t51.2885-15/e35/83656913_122453209286778_2085275534449482...

 

I see the option to 'add dynamic content', but need help with making an expression. 

Thanks in advance. 

 

<item>

<title>This place looks amazing</title>
<link>   </link>
<dc:creator>      </dc:creator>
<pubDate>Tue, 04 Feb 2020 07:02:12 PST</pubDate>
<guid isPermaLink="true">     </guid>

<description>

This place looks amazing
</description>

<enclosure url="https://scontent-ort2-2.cdninstagram.com/v/t51.2885-15/e35/83656913_122453209286778_2085275534449482794_n.jpg?_nc_ht=scontent-ort2-2.cdninstagram.com&amp;_nc_cat=106&amp;_nc_ohc=sRbQdob1O5MAX8B1-ff&amp;oh=c3d9aa3fb45c05ca156f2c929ad9eb01&amp;oe=5EC347FA" length="0" />

<activity:object-type xmlns:activity="http://activitystrea.ms/spec/1.0/">http://activitystrea.ms/schema/1.0/photo          </activity:object-type>
						
<activity:verb  xmlns:activity="http://activitystrea.ms/spec/1.0/">http://activitystrea.ms/schema/1.0/post    </activity:verb>

<georss:featureName xmlns:georss="http://www.georss.org/georss">Bolton Abbey   </georss:featureName>
					

</item>

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: RSS (XML) to Twitter with a photo

 

Hi @n1cks ,

 

The best option to extract this data is to use xpath() function to parse the feed and get the URL.

Please check this similar thread and see if it helps:

https://powerusers.microsoft.com/t5/General-Power-Automate/help-with-Xpath-and-Soap-message/td-p/322...

https://powerusers.microsoft.com/t5/Building-Flows/Iterate-XML-with-flow/m-p/163734#M16546

 

Besides, you could also use the WDL function to extract the URL, try to use the following expression:

split(split(outputs('Compose'),'<enclosure url="')[1],'" length="0" />')[0]

Image reference:

22.PNG

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: RSS (XML) to Twitter with a photo

 

Hi @n1cks ,

 

The best option to extract this data is to use xpath() function to parse the feed and get the URL.

Please check this similar thread and see if it helps:

https://powerusers.microsoft.com/t5/General-Power-Automate/help-with-Xpath-and-Soap-message/td-p/322...

https://powerusers.microsoft.com/t5/Building-Flows/Iterate-XML-with-flow/m-p/163734#M16546

 

Besides, you could also use the WDL function to extract the URL, try to use the following expression:

split(split(outputs('Compose'),'<enclosure url="')[1],'" length="0" />')[0]

Image reference:

22.PNG

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Frequent Visitor

Re: RSS (XML) to Twitter with a photo

Thanks. Helps a lot. 

 

I'm just missing the 'compose' step.  

 

Is there an expression to pull out the XML? 

 

Screenshot (4).png

 

 

Edit: 

I got this to work - my flow extracts the image URL from an RSS feed.  But it turns out, the media field in the Post a Tweet action doesn't accept image URL.  Any ideas? 

 

 

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (9,072)