Pour créer un Smart Message et pouvoir l’utiliser dans les bots (smart message) et dans les posts (icône ampoule), il vous suffit de vous rendre dans la marque et de créer le template que vous souhaitez créer
{%- if social_network =='facebook' and post_type == 'link' -%}
{{- meta_custom_facebook ?? ai_generated -}}
{%- elseif social_network =='linkedin' and post_type == 'link' -%}
{{- meta_custom_facebook ?? title ~ "\\n\\n" ~ description -}}
{%- elseif social_network =='twitter' and post_type == 'photo' -%}
{{- title }}
{{ description -}}
{%- else -%}
{{- ai_generated -}}
{%- endif -%}
{%- if social_network =='twitter' and post_type == 'link' -%}
{{- title ?? ai_generated -}}
{{- '\\n' -}}
➡️ [SHORTLINK]
{%- elseif post_type == 'photo' -%}
{{- ai_generated -}}
{{- '\\n' -}}
➡️ [SHORTLINK]
{%- else -%}
{{- ai_generated -}}
{%- endif -%}
{%- set twitterAccounts = {
'Fabrice Arfi' : '@fabricearfi',
'Antton Rouget': '@AnttonRouget',
'Joseph Confavreux': '@JoConfa'
} -%}
{%- if social_network =='twitter' and post_type == 'link' -%}
{{- title ?? ai_generated -}}
{%- for authorName in authors -%}
{%- if twitterAccounts[authorName] -%}
{{- loop.index == 1 ? '\\nPar ' : ' ' -}}
{{- twitterAccounts[authorName] -}}
{%- endif -%}
{%- endfor -%}
{{- '\\n\\n' -}}
➡️ [SHORTLINK]
{%- else -%}
{{- ai_generated -}}
{%- endif -%}
{%- if social_network =='twitter' and post_type == 'link' -%}
{{- title ?? ai_generated -}}
{%- set isFirstAuthorMentioned = false -%}
{%- for authorName in authors -%}
{%- set mention = airtable('BDD ID', 'Nom de la table', 'Nom du champs que l\\'on envoie (Auteur)', authorName, 'Nom du champs à retourner (mention Twitter)') -%}
{%- if mention -%}
{%- if not isFirstAuthorMentioned -%}
{{- '\\nPar ' -}}
{%- set isFirstAuthorMentioned = true -%}
{%- else -%}
{{- ' ' -}}
{%- endif -%}
{{- mention -}}
{%- endif -%}
{%- endfor -%}
{{- '\\n\\n' -}}
➡️ [SHORTLINK]
{%- else -%}
{{- ai_generated -}}
{%- endif -%}
{%- if social_network == 'twitter' and post_type == 'link' -%}
{{- title ~ '\\n' -}}
➡️ [SHORTLINK]
{{- '\\n' -}}
{%- for tag in tags|slice(0, 10) -%}
{{- loop.index > 1 ? ' #' : '#' -}}{{- tag|ucPhrase|replace({' ': ''}) -}}
{%- endfor -%}
{%- else -%}
{{- ai_generated -}}
{%- endif -%}
aiGenerated(messageVar, charCountMin, charCountTarget, charCountMax, etcChars, justCrop)
Exemple :