hello,
I want to write posts in markdown, commit them in git, and then have Activepieces publish it to Ghost. On the way, linebreaks are lost.
I have a markdown file in a git repository, like this:
https://v12.next.forgejo.org/juliuspopp/testrepo/raw/branch/main/Test/test2.md
I use the “HTTP (Send HTTP request)” piece
GET method
URL of the raw file in git
body type: none
Headers: I later want to use it on a private repo, it worked with adding authorization to the header and placing a token there
Query params: none:
As response I get this body:
“beginn inhalt 2 mittelteil inhalt 2 mit [[test1]] Link Ende Inhalt 2”
No linebreaks.
Can I improve my usage of the piece?
Or is this a bug?
thanks in advance!
You need to use POST method on http request to ghost admin api and you needs your API Key.
There’s another “piece” for posting to Ghost.
I use the HTML piece to GET the data, and when I parse what I received to the Ghost piece there are - as already expected from the Activepieces data - no line breaks.
Are you suggesting that I should create Ghost posts via HTTP request instead?
I want
beginn inhalt 2
mittelteil inhalt 2
mit [[test1]] Link
Ende Inhalt 2
I get
{
"status": 200,
"headers": {
"access-control-expose-headers": "Content-Disposition",
"alt-svc": "h3=\":443\"; ma=2592000,h3=\":443\"; ma=2592000",
"cache-control": "private, max-age=300",
"content-disposition": "inline; filename=\"test2.md\"; filename*=UTF-8''test2.md",
"content-length": "70",
"content-type": "text/plain; charset=utf-8",
"date": "Thu, 01 May 2025 06:24:31 GMT",
"etag": "\"50c92107b52f8c7bb64578ad544e84b5492e2163\"",
"last-modified": "Thu, 01 May 2025 04:30:16 GMT",
"set-cookie": "i_like_gitea=edd70841949f1224; Path=/; HttpOnly; Secure; SameSite=Lax, _csrf=ackTpVfn3LCXdlK1DXrE7xEWSvk6MTc0NjA4MDY3MTI5OTgzOTM2MQ; Path=/; Max-Age=86400; HttpOnly; Secure; SameSite=Lax",
"via": "1.1 Caddy",
"x-content-type-options": "nosniff",
"x-frame-options": "SAMEORIGIN",
"connection": "close"
},
"body": "beginn inhalt 2\n\nmittelteil inhalt 2\nmit [[test1]] Link\n\nEnde Inhalt 2"
}
I now see there are linebreaks.
I use markdown to html piece, and then use that as input for the Ghost piece. now it (or a proof of concept of what I want) works.
system
Closed
May 13, 2025, 8:50am
5
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.