How to Integrate Discord Commands for Scheduling Posts on Twitter?

This topic was automatically generated from Slack. You can find the original thread here.

One integration I’m attempting to work on is using Discord commands to schedule a post to X (Twitter). I don’t have a solid approach yet.

the idea would be to support something like this in Discord:
/schedtweet 2024-03-14T12:00 this is a scheduled tweet
I’m doing Discord->Twitter integrations because I’d like certain members of my Discord community to handle the public relations of the group on social media without needing the community’s Twitter login information.

There are two approaches I can think of:

  1. Use the Twitter Ads API to schedule a post, however there’s no Pipedream action for it yet. Docs here: schedule tweet ref
  2. Use a task scheduler in Pipedream to schedule the sending of a normal post to Twitter. The datetime string in my example above would need to be fed into the task scheduler. I’ve read this page but it’s very confusing. I ultimately want my workflow trigger to be a Discord command. pd task scheduler

The first approach is work I’d like to put off as a last resort. As for the second, does anyone here have a good idea of how I’d accomplish this, if possible?

I feel like the first approach is easier than the second. You only need a discord new command trigger, and then you pass the data to the Twitter ads API. With the second you’d need one workflow to capture the command and store the data somewhere, and have a second workflow that checks the stored data at intervals and then decide if it’s time to post the Tweet and clear the stored data. Lots of moving parts there, plenty of places things can get annoying.