n8n workflow: Notion to Linkedin

Nodes:
name: Merge
type: n8n-nodes-base.merge
parameters: mode: combine
combinationMode: mergeByPosition
name: Sticky Note
type: n8n-nodes-base.stickyNote
parameters: color: 4
height: 141.4092845296238
content: ## Start the flow every day at the same time
name: Sticky Note1
type: n8n-nodes-base.stickyNote
parameters: color: 6
width: 367.12018536439575
height: 382.294335406698
content: ## Fetch the day's post from my Notion database
name: Sticky Note2
type: n8n-nodes-base.stickyNote
parameters: color: 6
width: 627.4768047417825
height: 380.3367219655605
content: ## Process and format the post
name: Schedule Trigger
type: n8n-nodes-base.scheduleTrigger
parameters: rule: interval: 15
name: Filter the table for the day's post
type: n8n-nodes-base.notion
parameters: filters: conditions: key: Date|date
date: ={{ $today.format("yyyy/mM/dd") }}
condition: equals
resource: databasePage
operation: getAll
databaseId: __rl: yes
mode: list
value: f09dc21b-1070-4d5a-bf7f-a9ab3dbb69fb
cachedResultUrl: https://www.notion.so/f09dc21b10704d5abf7fa9ab3dbb69fb
cachedResultName: Postagens
filterType: manual
name: Fetch the content on the page
type: n8n-nodes-base.notion
parameters: blockId: __rl: yes
mode: url
value: ={{ $json.url }}
resource: block
operation: getAll
returnAll: yes
name: Aggregate the Notion blocks
type: n8n-nodes-base.aggregate
parameters: fieldsToAggregate: fieldToAggregate: content
image.file.url
name: Format the post
type: n8n-nodes-base.code
parameters: jsCode: const notionData = items[0].json.content;

let formattedText = notionData[0] 

for (let i = 1; i < notionData.length; i++) {
    if (notionData[i].startsWith('-')) {
        formattedText += '\n\n' + notionData[i];
    } else {
        formattedText += '\n' + notionData[i];
    }
}

return [{ formattedText: formattedText }];

name: Download image
type: n8n-nodes-base.httpRequest
parameters: url: ={{ $json.url[0] }}
name: Publish on LinkedIn
type: n8n-nodes-base.linkedIn
parameters: text: ={{ $json.formattedText }}
person: CcS-_lLyzG
shareMediaCategory: IMAGE
name: Update post status in notion database
type: n8n-nodes-base.notion
parameters: pageId: __rl: yes
mode: url
value: ={{ $('Filter the table for the day\'s post').item.json.url }}
resource: databasePage
operation: update
propertiesUi: propertyValues: Published
name: Sticky Note3
type: n8n-nodes-base.stickyNote
parameters: color: 3
width: 567.6073693795047
height: 137.6834217043934
content: ## 1. Setup
Set up your Notion and LinkedIn credentials.
Attention to the LinkedIn credential: to post on your personal or company profile, you need to have a company page assigned to your profile. After that, you can choose where you want to post.

Connections:
Merge: main: node: Publish on LinkedIn
type: main
Download image: main: node: Merge
type: main
Format the post: main: node: Merge
type: main
Schedule Trigger: main: node: Filter the table for the day's post
type: main
Publish on LinkedIn: main: node: Update post status in notion database
type: main
Aggregate the Notion blocks: main: node: Format the post
type: main
node: Download image
type: main
Fetch the content on the page: main: node: Aggregate the Notion blocks
type: main
Filter the table for the day's post: main: node: Fetch the content on the page
type: main