Include Link in Tweeted Posts via Zapier Integration?

AI-generated summary

In a support thread titled ‘Include Link in Tweeted Posts via Zapier Integration?’, chris-remus seeks help configuring Zapier to include the direct URL of new forum topics in tweets from their Discourse forum (forum.stakingdefense.org) to Twitter (twitter.com/stakingdefense). After trying both Discourse-to-Twitter and webhook-based zaps, chris-remus notes the post URL doesn’t appear in Zapier’s dropdown of available fields. simon explains that the URL must be manually constructed using the topic’s slug and ID, following the format: site-url/t/slug/id. Simon provides a screenshot showing how to assemble this in Zapier, including appending the link after the topic title and enabling URL shortening. chris-remus confirms this solution works for both webhook and direct Discourse/Twitter integrations, resolving the issue.

I’d like to Tweet new topics in my forum -

https://forum.stakingdefense.org

To my Twitter account -

twitter.com/stakingdefense

The forum is not particularly active right now, so I’m not concerned about Twitter shutting down the account :wink:

I’ve researched existing topics in this forum yet still can’t find the answer to my question. I’ve sent two test tweets, via Zapier integrations, both direct Discourse/Twitter and Discourse Web Hook/Twitter.

What I can’t figure out is how to include the post link in the Tweet.

Can someone please help me solve this?

Thank you!

Can you share a little more information about what you’ve done so far? Are you using a JSON feed or a webhook to trigger your zaps?

Sure -

1 - Tried a Discourse “new post” trigger to Twitter “new Tweet” zap.

2 - Tried to create a webhook.

https://hooks.zapier.com/hooks/catch/5059183/vd3uaj/

The Tweet posts using both options. However I don’t see how to include the actual URL post in the Tweet. It doesn’t appear in the Zapier drop down menu of available content.

You may have to create the link yourself from the properties that are returned by the webhook. The structure of the link should be your site’s base URL, followed by /t/, followed by the topic’s slug, followed by /, followed by the topic’s ID.

On Zapier, that would look something like this:

In this screenshot, the first section adds the topic’s title to the tweet. Everything that follows that section is used for creating the link to the topic. I have selected the default option (‘yes’) for the ‘Should Shorten URLs’ setting. When I test this on Zapier, it is successfully posting tweets to my twitter account.

Thanks, that’s the info I needed. It’s working as you suggest. Using the same format for the Zapier Discourse/Twitter integration works too.

Thank you!