cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Community Support
Community Support

 

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
Community Support
Community Support

 

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

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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (9,173)