Skip to content

Instantly share code, notes, and snippets.

@srz-zumix
Created June 9, 2021 00:41
Show Gist options
  • Save srz-zumix/f40424396de4d801f928b36bcdd5e511 to your computer and use it in GitHub Desktop.
Save srz-zumix/f40424396de4d801f928b36bcdd5e511 to your computer and use it in GitHub Desktop.
{
"name": "Integration Blogger, Twitter",
"flow": [
{
"id": 1,
"module": "blogger:TriggerNewPost",
"version": 4,
"parameters": {
"blogId": "1887782251735454807",
"labels": [],
"status": "onlyLive",
"account": 397330,
"maxResults": 5
},
"mapper": {},
"metadata": {
"designer": {
"x": 0,
"y": 300
},
"restore": {
"blogId": {
"label": "ブログズミ"
},
"labels": {
"items": []
},
"status": {
"label": "Only live"
},
"account": {
"label": "My Google connection"
}
},
"parameters": [
{
"name": "account",
"type": "account",
"label": "Connection",
"required": true
},
{
"name": "status",
"type": "select",
"label": "Status",
"required": true,
"validate": {
"enum": [
"onlyLive",
"onlyScheduled",
"onlyDraft"
]
}
},
{
"name": "maxResults",
"type": "number",
"label": "Maximum number of results",
"required": true
},
{
"name": "labels",
"spec": {
"name": " ",
"type": "text",
"label": "Label"
},
"type": "array",
"label": "Labels",
"labels": {
"add": "Add a label",
"edit": "Edit a label"
}
},
{
"name": "blogId",
"type": "select",
"label": "Blog",
"required": true
}
],
"advanced": true
},
"onerror": [
{
"id": 24,
"module": "builtin:Ignore",
"version": 1,
"metadata": {
"designer": {
"x": 300,
"y": 600
}
}
}
]
},
{
"id": 25,
"module": "util:SetVariables",
"version": 1,
"parameters": {},
"mapper": {
"scope": "roundtrip",
"variables": [
{
"name": "published_t",
"value": "{{setSecond(1.datePublished; 0)}}"
},
{
"name": "update_t",
"value": "{{setSecond(1.dateUpdated; 0)}}"
},
{
"name": "tags",
"value": "{{replace(\"#\" + join(1.labels; space + \"#\"); \":\"; space)}}"
}
]
},
"metadata": {
"designer": {
"x": 300,
"y": 150
},
"restore": {
"scope": {
"label": "One cycle"
},
"variables": {
"items": [
"undefined",
"undefined",
"undefined"
]
}
},
"expect": [
{
"name": "variables",
"spec": [
{
"name": "name",
"type": "text",
"label": "Variable name",
"required": true
},
{
"name": "value",
"type": "any",
"label": "Variable value"
}
],
"type": "array",
"label": "Variables"
},
{
"name": "scope",
"type": "select",
"label": "Variable lifetime",
"required": true,
"validate": {
"enum": [
"roundtrip",
"execution"
]
}
}
],
"interface": [
{
"name": "published_t",
"type": "any",
"label": "published_t"
},
{
"name": "update_t",
"type": "any",
"label": "update_t"
},
{
"name": "tags",
"type": "any",
"label": "tags"
}
]
}
},
{
"id": 23,
"module": "regexp:Replace",
"version": 1,
"parameters": {},
"filter": {
"name": "is_not_too_old",
"conditions": [
[
{
"a": "{{25.published_t}}",
"b": "{{addYears(timestamp; -3)}}",
"o": "date:greater"
}
]
]
},
"mapper": {
"text": "{{25.tags}}",
"value": "$1",
"global": true,
"pattern": "\\s([^#])",
"multiline": false,
"sensitive": true,
"singleline": false
},
"metadata": {
"designer": {
"x": 600,
"y": 150
},
"restore": {
"global": {
"mode": "chose"
},
"multiline": {
"mode": "chose"
},
"sensitive": {
"mode": "chose"
},
"singleline": {
"mode": "chose"
}
},
"expect": [
{
"name": "pattern",
"type": "text",
"label": "Pattern",
"required": true
},
{
"name": "value",
"type": "text",
"label": "New value"
},
{
"name": "global",
"type": "boolean",
"label": "Global match",
"required": true
},
{
"name": "sensitive",
"type": "boolean",
"label": "Case sensitive",
"required": true
},
{
"name": "multiline",
"type": "boolean",
"label": "Multiline",
"required": true
},
{
"name": "singleline",
"type": "boolean",
"label": "Singleline",
"required": true
},
{
"name": "text",
"type": "text",
"label": "Text"
}
]
}
},
{
"id": 4,
"module": "builtin:BasicRouter",
"version": 1,
"filter": {
"name": "test",
"conditions": [
[
{
"a": "1",
"b": "1",
"o": "text:equal"
}
]
]
},
"mapper": null,
"metadata": {
"designer": {
"x": 900,
"y": 150
}
},
"routes": [
{
"flow": [
{
"id": 17,
"module": "twitter:createTweet",
"version": 5,
"parameters": {
"__IMTCONN__": 394960
},
"filter": {
"name": "is_new",
"conditions": [
[
{
"a": "{{25.published_t}}",
"b": "{{25.update_t}}",
"o": "number:equal"
}
]
]
},
"mapper": {
"select": "image",
"status": "ブログ更新。\nブログズミ: {{1.title}}\n{{1.url}}\n{{23.text}}",
"possibly_sensitive": false,
"display_coordinates": true
},
"metadata": {
"designer": {
"x": 1200,
"y": 0
},
"restore": {
"select": {
"label": "Image or GIF"
},
"__IMTCONN__": {
"label": "srz_zumix (Z.Z.ずみっくす)"
},
"attachments": {
"mode": "chose",
"items": []
},
"display_coordinates": {
"mode": "chose"
}
},
"parameters": [
{
"name": "__IMTCONN__",
"type": "account",
"label": "Connection",
"required": true
}
],
"expect": [
{
"name": "status",
"type": "text",
"label": "Status",
"required": true
},
{
"name": "select",
"type": "select",
"label": "Upload",
"validate": {
"enum": [
"image",
"video"
]
}
},
{
"name": "possibly_sensitive",
"type": "boolean",
"label": "Attached images contain sensitive content (nudity, violence, etc).",
"required": true
},
{
"name": "lat",
"type": "number",
"label": "Geographic Latitude",
"validate": {
"max": 90,
"min": -90
}
},
{
"name": "long",
"type": "number",
"label": "Geographic Longitude",
"validate": {
"max": 180,
"min": -180
}
},
{
"name": "display_coordinates",
"type": "boolean",
"label": "Display tweets coordinates",
"required": true
},
{
"name": "attachments",
"spec": [
{
"name": "filename",
"type": "filename",
"label": "File Name",
"semantic": "file:name"
},
{
"name": "data",
"type": "buffer",
"label": "Data",
"semantic": "file:data"
},
{
"name": "media_category",
"type": "select",
"label": "Media Category",
"options": [
{
"label": "Tweet Gif",
"value": "tweet_gif"
},
{
"label": "Tweet Image",
"value": "tweet_image"
}
]
}
],
"type": "array",
"label": "Attachments",
"validate": {
"maxItems": 4
}
}
],
"advanced": true
}
}
]
},
{
"flow": [
{
"id": 18,
"module": "twitter:createTweet",
"version": 5,
"parameters": {
"__IMTCONN__": 394960
},
"filter": {
"name": "is_update",
"conditions": [
[
{
"a": "{{25.published_t}}",
"b": "{{25.update_t}}",
"o": "date:less"
}
]
]
},
"mapper": {
"select": "image",
"status": "ブログ内容の更新をしました\nブログズミ: {{1.title}}\n{{1.url}}\n{{23.text}}",
"possibly_sensitive": false,
"display_coordinates": true
},
"metadata": {
"designer": {
"x": 1200,
"y": 300
},
"restore": {
"select": {
"label": "Image or GIF"
},
"__IMTCONN__": {
"label": "srz_zumix (Z.Z.ずみっくす)"
},
"attachments": {
"mode": "chose",
"items": []
},
"display_coordinates": {
"mode": "chose"
}
},
"parameters": [
{
"name": "__IMTCONN__",
"type": "account",
"label": "Connection",
"required": true
}
],
"expect": [
{
"name": "status",
"type": "text",
"label": "Status",
"required": true
},
{
"name": "select",
"type": "select",
"label": "Upload",
"validate": {
"enum": [
"image",
"video"
]
}
},
{
"name": "possibly_sensitive",
"type": "boolean",
"label": "Attached images contain sensitive content (nudity, violence, etc).",
"required": true
},
{
"name": "lat",
"type": "number",
"label": "Geographic Latitude",
"validate": {
"max": 90,
"min": -90
}
},
{
"name": "long",
"type": "number",
"label": "Geographic Longitude",
"validate": {
"max": 180,
"min": -180
}
},
{
"name": "display_coordinates",
"type": "boolean",
"label": "Display tweets coordinates",
"required": true
},
{
"name": "attachments",
"spec": [
{
"name": "filename",
"type": "filename",
"label": "File Name",
"semantic": "file:name"
},
{
"name": "data",
"type": "buffer",
"label": "Data",
"semantic": "file:data"
},
{
"name": "media_category",
"type": "select",
"label": "Media Category",
"options": [
{
"label": "Tweet Gif",
"value": "tweet_gif"
},
{
"label": "Tweet Image",
"value": "tweet_image"
}
]
}
],
"type": "array",
"label": "Attachments",
"validate": {
"maxItems": 4
}
}
]
}
}
]
}
]
}
],
"metadata": {
"version": 1,
"scenario": {
"roundtrips": 1,
"shatter": false,
"maxErrors": 3,
"autoCommit": false,
"sequential": false,
"confidential": false,
"dataloss": false,
"dlq": false
},
"designer": {
"orphans": []
},
"zone": "eu1.integromat.com"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment