What is your goal?
I want to publish the page content of a Notion page in a Reddit post.
https://www.loom.com/share/e237256623d04389b1184cc4d73b04d6
What is the problem & what have you tried?
I have gotten almost everything done and pulled out all the values of the page content but I’m struggling on the final aspect of putting it all back together so that I can post it to Reddit.
Error messages or input/output bundles
The final bundle is
[
{
“value”: "These are some words to put into the body so I can see it inside ",
“IMTINDEX”: 1,
“IMTLENGTH”: 9
},
{
“value”: “make.com”,
“IMTINDEX”: 2,
“IMTLENGTH”: 9
},
{
“value”: ". More and more and more in the text. Go go go go go. ",
“IMTINDEX”: 3,
“IMTLENGTH”: 9
},
{
“value”: null,
“IMTINDEX”: 4,
“IMTLENGTH”: 9
},
{
“value”: “Header3”,
“IMTINDEX”: 5,
“IMTLENGTH”: 9
},
{
“value”: “random, random, random, random, random words”,
“IMTINDEX”: 6,
“IMTLENGTH”: 9
},
{
“value”: "These are more random words ",
“IMTINDEX”: 7,
“IMTLENGTH”: 9
},
{
“value”: “Just one more set of the random words.”,
“IMTINDEX”: 8,
“IMTLENGTH”: 9
},
{
“value”: null,
“IMTINDEX”: 9,
“IMTLENGTH”: 9
}
]
Create public scenario page
Hello @Frank_Velez,
I’ve removed the link to your public scenario.
You were using the HTTP module with an unencrypted bearer token, which made it publicly accessible. Please use the Authentication type instead so your token is stored securely and not exposed in the blueprint.
Also remember to change your Notion token immediately!
Thank you! Yes I forgot that I had the token hardcoded in the HTTP. I have changed the token
Sooo many iterators and aggregators no wonder it doesn’t work. Most likely you have the wrong array being iterated with the wrong source module of the final aggregation but I’m not going to attempt to untangle this mess.
Instead I suggest you have a look here. You need map() functions to create primitive arrays of only the stuff you need and then join() functions on top of them to turn it in text strings.
You need to join all the value items into one text string before sending it to Reddit.
Right now you have an array of text pieces, but Reddit wants one body text.
Simple fix:
-
Use an Array Aggregator
-
Aggregate only the value field
-
Skip the null values
-
Join everything into one long text
-
Map that final text into the Reddit post body
So the idea is:
Notion blocks → Iterator → get each value → Aggregate → join into one text → Reddit
If your final bundle looks like:
then you want the result to become:
text text text text
Main point:
Iterator breaks it apart. Aggregator puts it back together.
For Reddit, you need the final combined text, not the raw array…
Thank you for reminding me about mapping. I have figured everything out. I can now capture all the post information and comments for Reddit and response back to them directly through Notion.