{
    "name": "ContentForge Social Publisher",
    "flow": [
        {
            "id": 1,
            "module": "gateway:CustomWebHook",
            "version": 1,
            "parameters": {
                "hook": null
            },
            "mapper": {},
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0
                },
                "restore": {
                    "parameters": {
                        "hook": {
                            "label": ""
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "hook",
                        "type": "hook:gateway-webhook",
                        "label": "Webhook",
                        "required": true
                    }
                ],
                "interface": [
                    {
                        "name": "platform",
                        "type": "text",
                        "label": "Platform"
                    },
                    {
                        "name": "caption",
                        "type": "text",
                        "label": "Caption"
                    },
                    {
                        "name": "image_url",
                        "type": "text",
                        "label": "Image URL"
                    },
                    {
                        "name": "headline",
                        "type": "text",
                        "label": "Headline"
                    },
                    {
                        "name": "cta_text",
                        "type": "text",
                        "label": "CTA Text"
                    },
                    {
                        "name": "cta_url",
                        "type": "text",
                        "label": "CTA URL"
                    },
                    {
                        "name": "hashtags",
                        "type": "text",
                        "label": "Hashtags"
                    },
                    {
                        "name": "brand_name",
                        "type": "text",
                        "label": "Brand Name"
                    },
                    {
                        "name": "angle",
                        "type": "text",
                        "label": "Angle"
                    },
                    {
                        "name": "published_at",
                        "type": "text",
                        "label": "Published At"
                    }
                ]
            }
        },
        {
            "id": 2,
            "module": "builtin:BasicRouter",
            "version": 1,
            "mapper": null,
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 0
                }
            },
            "routes": [
                {
                    "flow": [
                        {
                            "id": 3,
                            "module": "facebookpages:CreateAPost",
                            "version": 4,
                            "parameters": {
                                "__IMTCONN__": null
                            },
                            "filter": {
                                "name": "Facebook",
                                "conditions": [
                                    [
                                        {
                                            "a": "{{1.platform}}",
                                            "b": "facebook",
                                            "o": "text:equal"
                                        }
                                    ],
                                    [
                                        {
                                            "a": "{{1.platform}}",
                                            "b": "all",
                                            "o": "text:equal"
                                        }
                                    ]
                                ]
                            },
                            "mapper": {
                                "message": "{{1.caption}}{{if(1.hashtags; \"\n\n\" & 1.hashtags; \"\")}}",
                                "link": "{{1.cta_url}}",
                                "url": "{{1.image_url}}"
                            },
                            "metadata": {
                                "designer": {
                                    "x": 600,
                                    "y": -300
                                },
                                "restore": {
                                    "parameters": {
                                        "__IMTCONN__": {
                                            "label": "My Facebook Pages connection"
                                        }
                                    }
                                },
                                "expect": [
                                    {
                                        "name": "message",
                                        "type": "text",
                                        "label": "Message"
                                    },
                                    {
                                        "name": "link",
                                        "type": "url",
                                        "label": "Link"
                                    },
                                    {
                                        "name": "url",
                                        "type": "url",
                                        "label": "Photo URL"
                                    }
                                ]
                            }
                        }
                    ]
                },
                {
                    "flow": [
                        {
                            "id": 4,
                            "module": "instagram:CreateAPhotoPost",
                            "version": 2,
                            "parameters": {
                                "__IMTCONN__": null
                            },
                            "filter": {
                                "name": "Instagram",
                                "conditions": [
                                    [
                                        {
                                            "a": "{{1.platform}}",
                                            "b": "instagram",
                                            "o": "text:equal"
                                        }
                                    ],
                                    [
                                        {
                                            "a": "{{1.platform}}",
                                            "b": "all",
                                            "o": "text:equal"
                                        }
                                    ]
                                ]
                            },
                            "mapper": {
                                "imageUrl": "{{1.image_url}}",
                                "caption": "{{1.caption}}{{if(1.hashtags; \"\n\n\" & 1.hashtags; \"\")}}"
                            },
                            "metadata": {
                                "designer": {
                                    "x": 600,
                                    "y": 0
                                },
                                "restore": {
                                    "parameters": {
                                        "__IMTCONN__": {
                                            "label": "My Instagram connection"
                                        }
                                    }
                                },
                                "expect": [
                                    {
                                        "name": "imageUrl",
                                        "type": "url",
                                        "label": "Photo URL",
                                        "required": true
                                    },
                                    {
                                        "name": "caption",
                                        "type": "text",
                                        "label": "Caption"
                                    },
                                    {
                                        "name": "locationId",
                                        "type": "text",
                                        "label": "Location ID"
                                    },
                                    {
                                        "name": "userTags",
                                        "type": "array",
                                        "label": "User Tags"
                                    }
                                ]
                            }
                        }
                    ]
                },
                {
                    "flow": [
                        {
                            "id": 5,
                            "module": "linkedin:CreateAShareUpdate",
                            "version": 3,
                            "parameters": {
                                "__IMTCONN__": null
                            },
                            "filter": {
                                "name": "LinkedIn",
                                "conditions": [
                                    [
                                        {
                                            "a": "{{1.platform}}",
                                            "b": "linkedin",
                                            "o": "text:equal"
                                        }
                                    ],
                                    [
                                        {
                                            "a": "{{1.platform}}",
                                            "b": "all",
                                            "o": "text:equal"
                                        }
                                    ]
                                ]
                            },
                            "mapper": {
                                "text": "{{1.caption}}{{if(1.hashtags; \"\n\n\" & 1.hashtags; \"\")}}",
                                "shareMediaCategory": "ARTICLE",
                                "originalUrl": "{{1.cta_url}}",
                                "title": "{{1.headline}}",
                                "description": "{{1.caption}}"
                            },
                            "metadata": {
                                "designer": {
                                    "x": 600,
                                    "y": 300
                                },
                                "restore": {
                                    "parameters": {
                                        "__IMTCONN__": {
                                            "label": "My LinkedIn connection"
                                        }
                                    }
                                },
                                "expect": [
                                    {
                                        "name": "text",
                                        "type": "text",
                                        "label": "Text",
                                        "required": true
                                    },
                                    {
                                        "name": "shareMediaCategory",
                                        "type": "select",
                                        "label": "Share Media Category"
                                    },
                                    {
                                        "name": "originalUrl",
                                        "type": "url",
                                        "label": "Original URL"
                                    },
                                    {
                                        "name": "title",
                                        "type": "text",
                                        "label": "Title"
                                    },
                                    {
                                        "name": "description",
                                        "type": "text",
                                        "label": "Description"
                                    }
                                ]
                            }
                        }
                    ]
                },
                {
                    "flow": [
                        {
                            "id": 6,
                            "module": "builtin:BasicFeeder",
                            "version": 1,
                            "parameters": {},
                            "filter": {
                                "name": "Log All Posts",
                                "conditions": [
                                    [
                                        {
                                            "a": "{{1.caption}}",
                                            "b": "",
                                            "o": "text:notequal"
                                        }
                                    ]
                                ]
                            },
                            "mapper": {
                                "data": "Brand: {{1.brand_name}} | Platform: {{1.platform}} | Angle: {{1.angle}} | Time: {{1.published_at}} | Caption: {{1.caption}} | CTA: {{1.cta_url}} | Image: {{1.image_url}}"
                            },
                            "metadata": {
                                "designer": {
                                    "x": 600,
                                    "y": 600
                                },
                                "expect": [
                                    {
                                        "name": "data",
                                        "type": "text",
                                        "label": "Data"
                                    }
                                ]
                            }
                        }
                    ]
                }
            ]
        }
    ],
    "metadata": {
        "instant": true,
        "version": 1,
        "scenario": {
            "roundtrips": 1,
            "maxErrors": 3,
            "autoCommit": true,
            "autoCommitTriggerLast": true,
            "sequential": false,
            "slots": null,
            "confidential": false,
            "dataloss": false,
            "dlq": false,
            "freshVariables": false
        },
        "designer": {
            "orphans": []
        },
        "zone": "us1.make.com"
    }
}
