There are many topics about this that you can see at: Search results for 'zapier' - Discourse Meta
But I want a little discussion about it.
Here I have up a script on zapier to post new posts to the Facebook Fanpage.
I use Rss instead of Discourse API on zapier. Since I tried it but the problem was that the content was too long and I came across some blocked urls I wanted to trim it short or summarize it. So I turned to Rss to describe it.
I use cut instead of summary (I am using a paragraph summary API and will look at the effect before applying, I cut it first)
You can see I use https://api.thuvienmuasam.com/rss/?url=https://thuvienmuasam.com/latest.rss that instead https://thuvienmuasam.com/latest.rss
Since the description is content consisting of html tags, I tried it in html and markdown format but when it posted to FB it was still in raw form.
Should I search like https://meta.discourse.org/latest.rss?excerpt = trueexcerpt = true
Why don’t I use the integrated API I did not find the short description field, just found the content but when posting it it was in raw html. Hard to read … too long. I want users to come to the site to see it in full.
Topic excerpts are not pulled into Zapier with the official Zapier Discourse integration. Excerpts are also not sent from Discourse if you connect a Discourse webhook to Zapier by adding it to a webhook trigger (details about setting that up are found here: https://meta.discourse.org/t/discourse-webhooks-and-zapier/56753.) You can create excerpts from the post’s raw content on Zapier though. Here’s how I set that up with the New Post in Discourse trigger:
First setup the New Post in Discourse trigger. Details about setting that up are here: Use the Zapier Discourse Zap Templates. When configured, the trigger step should look something like this:
Then add a Formatter by Zapier step. Choose the “Text” event. For the Transform option, select Truncate. Select the Raw content from your trigger step as the input and set the Max Length value to the number of characters you want to display in the post. When configured, the Text step should look something like this:
Note that if you use either the official Discourse integration, or a Discourse webhook instead of using the RSS feed, the topic’s permalink will not be set for you. You can construct the permalink in the action step’s Link URL input from the topic slug and topic id that are passed from your initial trigger step:
Details about creating a permalink and also about adding a filter step are given in this topic: Use the Zapier Discourse Zap Templates. Details about how to truncate the raw post content are not given in that guide. It is useful information, so I will add it there.
The approach that I’ve outlined here will also work when connecting a Discourse webhook to Zapier with the Zapier webhook trigger.