Template: Schedule a tweet when it’s added to SharePoint

Matt Wade
AtBot
Published in
6 min readMar 8, 2018

This is the third post in a multi-part series on building a Twitter Scheduler Center using Microsoft Teams, Power Automate, and AtBot. See part 1 for context.

The ability to schedule a tweet ahead of time is critical for maximizing your Twitter presence and, therefore, engagement. It’s pretty easy to set up a SharePoint site as a landing zone for scheduling individual tweets any time up to 30 days in the future using Power Automate.

All you’ve got to do is create a SharePoint list where you submit your tweet and configure this Power Automate template to post the tweet at the date and time you provide.

This tweet scheduler supplements the Batch Tweet Scheduler we set up earlier. If you haven’t done that yet, this template is still super useful, but you should check out my overview of the Tweet Scheduler Center in Microsoft Teams. It’s handy if you want to keep costs low without giving up functionality for scheduling your tweets.

Create your SharePoint list

It’s easy to create the SharePoint list to get this set up. Use the same SharePoint site you used in the Batch Scheduler template. You’ll need to be a site owner or Team owner to be able to perform the following steps.

1. In your SharePoint site, click the Gear > “Add an app”.

2. Click “Custom List”.

3. Give your list a name. I went with “Ad Hoc Tweets”.

4. Browse to your list from the Site Contents page.

After you create the list, SharePoint brings you directly to the Site Contents page, not to the list itself. At this point, your list only has one column: Title.

5. While in the list, click the Gear > “List settings”.

6. Scroll down to the “Columns” section and click “Create column”.

7. Name the column and make some format changes.

Give the column the name Publish Time, change the column type to Date and Time, make the field required, and change the field type to Date & Time from Date Only. (If you don’t do the last step, all your tweets will post at midnight!) Click OK.

That’s it. Your SharePoint list should now be good to go. You can always play with the permissions if you want to allow others to add tweets using this method. (If you’re using this as part of Teams, remember that all members of your Teams have edit access to your site to start, by default.)

Create the Skill

A templated version of this Skill is currently under review for inclusion in the Power Automate website’s template area. At that time, I’ll update this post with the link. Until then, it’s easy enough to add the Power Automate steps as explained below.

Technically, this is just a Flow, since AtBot isn’t included in the template at all. But he can be. You’ll want to check out the next part in this series to see how you can use AtBot to add your tweet and publish time.

While not the most prudent when on desktop (just use the Ad Hoc Scheduler tab in Teams), using AtBot to schedule a tweet while you’re on the go with your mobile phone is a major improvement over both Twitter’s options and using SharePoint (in my humble opinion).

1. Log in to office.com with your user name and password.

2. Browse to the SharePoint Power Automate Connector page and click ‘When an item is created’.

3. Name your Flow.

4. Complete ‘When an item is created’ step.

In Site Address, select the site where you created your list. If you don’t see the site, copy the URL from the site, choose Enter custom value, and paste the URL.

In List Name, select the Ad Hoc Scheduler list from the drop-down menu.

5. Add a ‘Delay until’ action.

In Timestamp, add the Publish Time dynamic content parameter.

6. Add a Twitter ‘Post a tweet’ action.

If it’s your first time using a Twitter connector, you’ll be asked to log in to your Twitter account. Do so.

In Tweet text, add the Title dynamic content parameter.

7. Add a SharePoint ‘Delete item’ action.

This step deletes the list item from SharePoint after it’s published to Twitter. I choose to delete the item from SharePoint so the list doesn’t get overrun with items. If you choose to remove this step (which you can without adverse effect), be aware of the SharePoint list view threshold.

If you plan to include this step, in Site Address, select the site where you created your list. If you don’t see the site, copy the URL from the site, choose Enter custom value, and paste the URL.

In List Name, select the Ad Hoc Scheduler list from the drop-down menu.

In Id, add the ID dynamic content parameter.

13. Save your Flow.

This is what the whole thing should look like from top to bottom.

Add your Ad Hoc Scheduler to Teams

If you’re using this Skill as one part of the Twitter Scheduler Center, you’ll want to add the SharePoint list as a tab in your Teams Channel. This gives you super quick access to the Ad Hoc Scheduler directly in Teams, as shown in the finished Center below. (The Ad Hoc Scheduler is the third callout.)

The Ad Hoc Scheduler we built here is easy to add to the final Tweet Scheduler Center in Teams.

To add the Ad Hoc Scheduler to Teams, we need to copy the link to the list and add it as a tab in Teams. First, browse to the SharePoint list and copy the part that ends with the list name. Forget the xxxxx.aspx part; you don’t really need it.

Copy this URL for use in Teams next.

Next, jump back to your Teams Channel, click the + next to the Batch Scheduler tab (if you’ve already created it), choose Website, name the tab (keep it short), paste the link, uncheck Post to the channel about this tab, and click Save.

Name your tab and paste the link from SharePoint, then click Save.

Your Ad Hoc Scheduler is now available directly in your Teams Channel. You can now schedule individual tweets directly from Teams.

Test it out

Browse to your SharePoint list or access it through the tab in your Twitter Scheduler Center in Teams.

Click + New and add a tweet and publish time a couple minutes from now.

If you jump to Power Automate and check out the status of that Flow, it should be running a job.

And, if all is well and good, you’ll see the tweet posted to Twitter at the designated time.

Remember, this is just the start

Sure, scheduling a tweet and deleting it from the source SharePoint list is useful, but there are a lot more possibilities you could play with. Some ideas:

  1. Add an error reporting mechanism wherein AtBot contacts you if your Flow fails for whatever reason, with a link to the offending scheduled tweet.
  2. Twitter can post images directly and SharePoint items can have files attached. Sounds like a promising way to schedule tweets with images, no?

Next up: connect AtBot to your Ad Hoc Scheduler

There’s one more step to complete your Twitter Scheduler Center, and that’s to hook AtBot up to this list so you can ask AtBot to add your tweets to your Ad Hoc Scheduler.

Next up: Template: Add scheduled tweets to a SharePoint list with AtBot.

--

--

Matt Wade
AtBot
Writer for

Microsoft MVP • Office 365 & Microsoft Teams specialist • NY→USVI→DC→NY