Skip to main content

Hi all,

I’m working on an automation that sends information to Discord when a new Instagram post is made. Part of that information is all of the media included in the Instagram post.

In order to send all of the Children Media URL’s via a Discord message, you need to break them up if you have multiple photos/ videos (carousel) in your post because it quickly surpasses Discords character limit per message (2000 characters).

I added Formatter by Zapier as my second step (Transform: Split Text, Input: Instagram’s Children Media Url, Separator: “,”, Segment Index: All).

When I test it, it correctly takes the long list of Children Media URL’s and splits them into separate outputs which shows as follows:

 

I don’t know how to use these individual Outputs to send as separate messages...

 

When I try to get Copilot to auto-generate these for me, it gives me this, which don’t send the outputs to Discord when testing:

 

I’m completely lost. Any and all help would be appreciated!

Hey there, Abdullah here from the Zapier team!

Looking into this, I think what’s happening here is that we’re getting all of the URLs as line items which can cause such issues. To confirm this, I’d appreciate it if you could send us a screenshot of the URLs from the trigger data.

For the description:
 

Line items are subsets of individual items. For example, "apples, oranges, bananas" are line items of "fruit".
 

Line items are a specific kind of JSON data structure. A line item is an object containing an array of objects. In JSON, an array is a comma-separated list inside of square brackets which ["looks", "like", "this"]; a JSON "object" is a set of {key:value} pairs that are surrounded by curly braces.


If this is a line item, the solution:

If that is the case, we’d need to use Formatter by Zapier → Utilities → Line Item to Text. 

What this does is breaks the line items down into separate fields as we need in this case. Can you give this a try and let us know if it helps here?

Thanks!


Hey ​@ImCL,

I think in the Formatter step you should segment it as All(as line- items) rather than All(as separate fields). After that you should Loop from Line- items action to loop through each item.

 


Then you dynamically map those output Send message action to send the messages. Hope it helps!