I’ve followed this to upload an image to Twitter via the 1.1 API: Tweet image - media type unrecognised - #2 by MutedJam
As we all know, the 1.1 API is no longer available to post Tweets, so the method used in this example to attach the media (media_ids) to an actual tweet doesn’t work with Twitter API V2.
I’ve found this: How to show an image in a v2 api tweet? - #5 by cloudworxx - Media APIs - Twitter Developers
Which says you need to format the media_ids inside a “media” field:
{"text": "Tweeting with media!", "media": {"media_ids": ["1455952740635586573"]}}
But I’m not sure how to do this with n8n using JSON and the “Using the fields below” boxes. I realize I can format the JSON from scratch, but that will screw up all the formatting in the tweet itself, and among many, many workflows, will create a lot of work for me to fix. I’m hoping there’s a way to make this work with the pre-defined boxes in n8n.
Here’s what I have. I don’t know what to put in the boxes under “name” and “value” for the media_id_string to make the media nest as Twitter API V2 requires.
I’ve tried dot notation and a colon, like “media.media_ids” and “media:media_ids” but (obviously) those didn’t work.