PROBLEM MAKING TWITTER THREADS [400] Request body is not valid JSON

Hi, I’m trying to do this project in which from a google document, take the text and download images from a google drive folder to make a twitter thread where you post description and image using as reference the total amount of images inside the drive folder.

I had used the structure of this video which has been quite useful to make the structure of replying to the first tweet https://youtu.be/_IcGDTxlZ0U?si=TgM_YwTn_oua2dNQ

The problem is that when I start the project I get “400: ‘[object Object]’ is not valid JSON” in the last twitter module.

I attach the blueprints of the project in case someone can start it. It uses a code in the body of the module with this code which I think, is the one that is throwing me the problem but I have no idea what is going wrong.

{
  "text": "{{get(5.result; "tweet_" + 45.i)}}",
  "reply": {
    "in_reply_to_tweet_id": "{{46.Prev_Tuit_ID}}"
  }
}

Does anyone have any idea what is going on?

Here is the blueprint
blueprint.json (112.3 KB)

I figure out how to solve it and big shout out to Javier Villa from https://www.youtube.com/watch?v=_IcGDTxlZ0U&lc=UgxR0odAUGLlxd4ZQQR4AaABAg.ABq3bPvT5rsABqQptkhIAV

He was kindly enough to help me figure it out.

The error got solve adding a few lines. Also I tweak it with the help from Javier to adjust the body and alse add images on the replys. Here is the code for the body:

{
  "text": "{{replace(get(116.result; "tweet_" + 109.i); newline; "\n")}}",
  "media": {
    "media_ids": ["{{124.media_ids}}"]
  },
  "reply": {
    "in_reply_to_tweet_id": "{{110.prev_tweet_id}}"
  }
}

Hope it help! this was a tricky one.

2 Likes