This repository has been archived by the owner on Jul 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
/
email_cm_to_bigquery.json
executable file
·57 lines (57 loc) · 2.63 KB
/
email_cm_to_bigquery.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
"script":{
"released":"2020-03-11",
"license":"Licensed under the Apache License, Version 2.0",
"copyright":"Copyright 2020 Google LLC",
"icon":"email",
"title":"CM360 Report Emailed To BigQuery",
"description":"Pulls a CM Report from a gMail powered email account into BigQuery.",
"image":"https://github.com/google/starthinker/raw/master/tutorials/images/email_cm.png",
"test":"https://github.com/google/starthinker/blob/master/tests/email_cm.json",
"from":["cm360", "gmail"],
"to":["bigquery"],
"pitches":[
"Acquire client CM data without having an account.",
"Build new data ingestion service for clients.",
"Consolidate client data in a central data warehouse.",
"Automate emailed report downloading.",
"Build dashboards from emailed reports."
],
"impacts":{
"spend optimization":0,
"spend growth":70,
"time savings":100,
"account health":80,
"csat improvement":80
},
"instructions":[
"The person executing this recipe must be the recipient of the email.",
"Schedule a CM report to be sent to **{field:recipe_email_token}**.",
"Or set up a redirect rule to forward a report you already receive.",
"The report must be sent as an attachment.",
"Ensure this recipe runs after the report is email daily.",
"Give a regular expression to match the email subject.",
"Configure the destination in BigQuery to write the data."
],
"authors":["kenjora@google.com"]
},
"tasks":[
{ "email":{
"auth":{"field":{ "name":"auth_read", "kind":"authentication", "order":1, "default":"user", "description":"Credentials used for reading data." }},
"read":{
"from":"noreply-cm@google.com",
"to": {"field":{ "name":"email", "kind":"string", "order":1, "default":"", "description":"Email address report was sent to." }},
"subject": {"field":{ "name":"subject", "kind":"string", "order":2, "default":".*", "description":"Regular expression to match subject. Double escape backslashes." }},
"attachment":".*"
},
"write":{
"bigquery":{
"dataset":{"field":{ "name":"dataset", "kind":"string", "order":3, "default":"", "description":"Existing dataset in BigQuery." }},
"table":{"field":{ "name":"table", "kind":"string", "order":4, "default":"", "description":"Name of table to be written to." }},
"header":true,
"is_incremental_load":{"field":{ "name":"is_incremental_load", "kind":"boolean", "order":6, "default":false, "description":"Append report data to table based on date column, de-duplicates." }}
}
}
}}
]
}