Tweet with media

During my test with the Twitter connector in Flow i tried a lot with tweeting.

Here I want to show how you add an attachment to your tweet from a sharepoint list.

First you have to load the item from the sharepoint which should be tweeted.

With the output of this you can a condition to your flow to filter items with attachments. In my flow I do not use these filter.

The next step is to get the attachment. This is done by an action called “Get Attachments”.

Here you have to select the Sharepoint Site and the SharePoint List and the ID which attachment we want to get.

This ID comes from the first step in this flow. Because of the possible multiple results from the first step an “apply to each” is entered in the flow.

After we get the attachments we have to enter a flow step to get the file content of the attachment. This is done by the attachment “get file content”. In this step we have to select the site adress and the ID of Sharepoint List attachment as file identifiert. Because of the possible multiple results from the step before an “apply to each” is entered in the flow.

Now we have all things to post a tweet with an attached media.

For this we use the action “post a tweet”. Here we use as tweet text the text columnn from our sharepoint list item from the first step and as media we use the output from the get file content step.

How cool is this?

Here is the complete flow in one view