> ## Documentation Index
> Fetch the complete documentation index at: https://botpress-pb-update-api.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Gmail

export const OpenInHub = ({integration}) => {
  const {version, id} = integration || ({});
  const basePath = 'https://studio.botpress.cloud/home?exploreHub=1&hubItemId=';
  const url = `${basePath}${id}`;
  return <>
            <a className="button rounded-xl" href={url}>
                <span>
                Open in Hub
                </span>
            </a>
            <i style={{
    margin: "0",
    fontStyle: "normal",
    color: "#666",
    fontSize: "0.85rem",
    padding: '.5rem'
  }}>
                v{version}
            </i>
        </>;
};

export const integrationVersions = {
  "accelo": {
    "version": "2.0.0",
    "id": "intver_01JFAQHPVKP4XTKMNXC2RZKZ88"
  },
  "activecampaign": {
    "version": "2.0.0",
    "id": "intver_01JFAQHVA0Z25PFC7H13EQ41FR"
  },
  "acumatica": {
    "version": "2.0.0",
    "id": "intver_01JFAQHZTNGNHPPS9CKD35Q6EY"
  },
  "airtable": {
    "version": "3.0.0",
    "id": "intver_01KQYW202230PVRW9RVA68VRYR"
  },
  "alchemer": {
    "version": "2.0.0",
    "id": "intver_01JFAQQZRS9ZQ7WBWHCF1MKGCM"
  },
  "anthropic": {
    "version": "18.0.1",
    "id": "intver_01KQYW62BM57D669VPPSAKXGHG"
  },
  "anydesk": {
    "version": "2.0.0",
    "id": "intver_01JFAQR4048H4976FCKT2YHD2X"
  },
  "apollo": {
    "version": "3.0.2",
    "id": "intver_01K6BJFKR5WZV44VNENAN6XBT1"
  },
  "asana": {
    "version": "0.3.13",
    "id": "intver_01KMZACD2E15B0RZB8RJ2XN2JX"
  },
  "attio": {
    "version": "1.0.3",
    "id": "intver_01KMZACN5Z3VJK0W280ED7G4Y0"
  },
  "avoma": {
    "version": "2.0.0",
    "id": "intver_01JFAQRC955G4CXN8QTFHXAPXZ"
  },
  "bamboohr": {
    "version": "2.1.2",
    "id": "intver_01KMZACXWM0GDNQF5PS3QBPQDN"
  },
  "beehiiv": {
    "version": "2.0.0",
    "id": "intver_01JFAQRGRRB95YC5YKWB1BFHZH"
  },
  "bigcommerce": {
    "version": "3.2.4",
    "id": "intver_01KMZAD5GM0P6BGFJHKE2QDDR8"
  },
  "bigin": {
    "version": "2.0.0",
    "id": "intver_01JFAQRS4Q0AY8CEAGYTDMPEPV"
  },
  "bolt": {
    "version": "2.0.0",
    "id": "intver_01JFAQRXGEVSFY1PYM195NAWQ6"
  },
  "box": {
    "version": "2.0.0",
    "id": "intver_01JFAQS1NBSGECDYX5MTTFN7RK"
  },
  "braze": {
    "version": "2.0.0",
    "id": "intver_01JFAQS5V6T5HF7MRJ46NMP42B"
  },
  "brevo": {
    "version": "2.0.0",
    "id": "intver_01JFAQSA1R5F1JGJZS55VTC1RP"
  },
  "britive": {
    "version": "2.0.0",
    "id": "intver_01JFAQSE7EMRGQE8EQD2CB6AZR"
  },
  "browser": {
    "version": "0.8.8",
    "id": "intver_01KPBEHKBJD4MZ0ZDWEBMHX74D"
  },
  "bynder": {
    "version": "2.0.0",
    "id": "intver_01JFAQSJT5N0Q2J2K7KGG12QQ5"
  },
  "calcom": {
    "version": "0.4.2",
    "id": "intver_01KMZADKWGWXARSDEH5VES64JY"
  },
  "calendly": {
    "version": "0.0.5",
    "id": "intver_01KMZADVPKFVFATR33S36R2NQ8"
  },
  "canny": {
    "version": "0.2.3",
    "id": "intver_01KMZAE3W37N658H69Y6ZPSREQ"
  },
  "capsule-crm": {
    "version": "2.0.0",
    "id": "intver_01JFAQSQ6CJJ6G9FK7PAACKE6X"
  },
  "cerebras": {
    "version": "9.0.0",
    "id": "intver_01KNRZZPBTBA0FAHVDVGAJNBJ1"
  },
  "charts": {
    "version": "0.2.8",
    "id": "intver_01KMZAEJVYBMNRMP01816TVEBH"
  },
  "chat": {
    "version": "1.0.0",
    "id": "intver_01KNSDHSSEHCX633DGB62V2ZB8"
  },
  "checkout": {
    "version": "2.0.0",
    "id": "intver_01JFAQSVA80GG51V7QKTARFG0E"
  },
  "clari": {
    "version": "2.0.0",
    "id": "intver_01JFAQSZVXNWXV8371M8ACEPFV"
  },
  "clay": {
    "version": "2.0.0",
    "id": "intver_01JFAQT424E25GR5K1Q8PZC4SC"
  },
  "clickup": {
    "version": "0.0.3",
    "id": "intver_01KMZAF5TCYZNN80SFM4MCASB5"
  },
  "close": {
    "version": "2.0.0",
    "id": "intver_01JFAQT8BMZG66DNJM1DBZ2EQ3"
  },
  "cognism": {
    "version": "2.0.0",
    "id": "intver_01JFAQTCC9XR5N28RA4SNZ8KYJ"
  },
  "comeet": {
    "version": "2.0.0",
    "id": "intver_01JFAQTGMDYR086FC0VEQ95VGC"
  },
  "confluence": {
    "version": "3.3.4",
    "id": "intver_01KMZAFH0Z4679X7P0SSY18DPV"
  },
  "copper": {
    "version": "2.0.0",
    "id": "intver_01JFAQTS5YQTVNMSRMTH12X4YC"
  },
  "creatio": {
    "version": "2.0.0",
    "id": "intver_01JFAQTXY9Z4S1XDWSBT4J4KJJ"
  },
  "crmone": {
    "version": "2.0.0",
    "id": "intver_01JFAQV28DCXF7SV71N9Q5BJC8"
  },
  "dalle": {
    "version": "0.3.8",
    "id": "intver_01KMZAFVDB02KE332TQ930T76J"
  },
  "databricks": {
    "version": "0.0.4",
    "id": "intver_01JBMK24H270H1ZTH2E8P34V4J"
  },
  "demandbase": {
    "version": "2.0.0",
    "id": "intver_01JFAQV9ZZ9MHH2ENEQ1ERMY2G"
  },
  "desk": {
    "version": "1.0.0",
    "id": "intver_01KGQ972H97YAN3D3KY9425JYN"
  },
  "discord": {
    "version": "1.2.1",
    "id": "intver_01KREWJHF8AZMBHH3JC5XFSFTB"
  },
  "docusign": {
    "version": "2.0.0",
    "id": "intver_01JFAQVKFW4F7BBRSDD7EEZE6Z"
  },
  "dropbox": {
    "version": "2.0.1",
    "id": "intver_01KMZAG63Y41V6CJGWD858VKQN"
  },
  "email": {
    "version": "0.1.4",
    "id": "intver_01KMZAGF70MCA75BCVVY3DGHXD"
  },
  "enchant": {
    "version": "2.0.0",
    "id": "intver_01JFAQVQQ60DZV01V3D1GA29YG"
  },
  "engagebay": {
    "version": "2.0.0",
    "id": "intver_01JFAQVVW42J4KNWCEZ6VQ3ZSJ"
  },
  "fathom": {
    "version": "2.0.0",
    "id": "intver_01JFAQW0QPEJS7M4EPVN9GJJDK"
  },
  "feature-base": {
    "version": "1.0.3",
    "id": "intver_01KMZAGPXHR49811P7S89CWN35"
  },
  "fireworks-ai": {
    "version": "11.0.0",
    "id": "intver_01KNS0091R8GPT9C088F3F3PE0"
  },
  "fivetran": {
    "version": "2.0.0",
    "id": "intver_01JFAQW55482FWTDSPCYT53DWE"
  },
  "flodesk": {
    "version": "2.0.0",
    "id": "intver_01JFAQW9APE7Z8E81T2F58VDM7"
  },
  "folk": {
    "version": "2.0.0",
    "id": "intver_01JFAQWDVG2DVFYKJRD8DMHVPZ"
  },
  "freshchat": {
    "version": "1.5.5",
    "id": "intver_01KMZAH6YY639ZNJTGDMTH25GT"
  },
  "freshsales": {
    "version": "2.0.0",
    "id": "intver_01JFAQWJ3CC3DJ5KG0W6XP33FD"
  },
  "fullstory": {
    "version": "2.0.0",
    "id": "intver_01JFAQWPM0T9EH5SAGDQ3Z14ZC"
  },
  "gainsight": {
    "version": "2.0.0",
    "id": "intver_01JFAQWTPKB13Y7619A6GEN5HQ"
  },
  "getaccept": {
    "version": "2.0.0",
    "id": "intver_01JFAQWZ0SAMDJVQNNA86RG21M"
  },
  "getresponse": {
    "version": "2.0.0",
    "id": "intver_01JFAQX34P2PBW0EM9NC6ZGFT5"
  },
  "github": {
    "version": "1.2.1",
    "id": "intver_01KMZAHF5WMDMTT9H6V3DQ8T50"
  },
  "gladly": {
    "version": "2.0.0",
    "id": "intver_01JFAQX7B29WE85VA8N5BCST16"
  },
  "gmail": {
    "version": "1.0.7",
    "id": "intver_01KMZAHQQ8YSB2DRVR1B6YXNCN"
  },
  "google-ai": {
    "version": "8.0.0",
    "id": "intver_01KNS00R1R8P4N2J4SVN6HHX4P"
  },
  "google-analytics": {
    "version": "1.0.0",
    "id": "intver_01KPRHR42CF02FMDDGSF0TG0DB"
  },
  "googlecalendar": {
    "version": "2.0.9",
    "id": "intver_01KMZAJAKBEZKGH0ZPQJBR1VAE"
  },
  "googledrive": {
    "version": "0.4.2",
    "id": "intver_01KMZAJJE94ZYG631DQM93B9RN"
  },
  "groq": {
    "version": "16.0.0",
    "id": "intver_01KNS015P14BRMA1C0CJG239M4"
  },
  "gsheets": {
    "version": "2.1.9",
    "id": "intver_01KP5Z7BRNQNGVY406742M7BBE"
  },
  "gusto": {
    "version": "2.0.0",
    "id": "intver_01JFAR75Y17N5EWS6P0PC93RHQ"
  },
  "happyfox": {
    "version": "2.0.0",
    "id": "intver_01JFAQXFNYWCXX819GTBHJ470W"
  },
  "help-scout": {
    "version": "2.0.0",
    "id": "intver_01JFAQXKX61YWJMMHYK3YDFZ0K"
  },
  "hitl": {
    "version": "2.0.2",
    "id": "intver_01K0SV5HZAT9FSVVEB7S91SH4F"
  },
  "honeybook": {
    "version": "2.0.0",
    "id": "intver_01JFAQXRQ8TADY78EBPBKSXFPC"
  },
  "hubspot": {
    "version": "6.0.9",
    "id": "intver_01KTV8S0ZX48N54R7AVG24CHJZ"
  },
  "hunter": {
    "version": "1.0.2",
    "id": "intver_01KMZAKV7RM16T6375G0JXDYHH"
  },
  "instagram": {
    "version": "4.1.9",
    "id": "intver_01KRC18D2WGRKT0G2SRZQ5VE3Z"
  },
  "instantly": {
    "version": "2.0.0",
    "id": "intver_01JFAQXWNN3ZM0DAQBE7N2BP54"
  },
  "intercom": {
    "version": "2.0.4",
    "id": "intver_01KMZAMCN5KTKK60239ADVZGCP"
  },
  "keap": {
    "version": "2.0.0",
    "id": "intver_01JFAQY1A6AQGSZRPKRJ11649R"
  },
  "kit": {
    "version": "2.0.0",
    "id": "intver_01JFAQYAZCH51RNSK7XT8ZKFZC"
  },
  "klaviyo": {
    "version": "3.0.2",
    "id": "intver_01K6BFXSKB0G4KMVGJPTR1X835"
  },
  "knack": {
    "version": "2.0.0",
    "id": "intver_01JFAQYKKW7JQJYH5GQW95AXFJ"
  },
  "kommo": {
    "version": "0.1.0",
    "id": "intver_01KN89QSX1YDM04NFRHK0WKZMG"
  },
  "kustomer": {
    "version": "2.0.0",
    "id": "intver_01JFAQYR6A4M0527JHDSNXN4TY"
  },
  "kylas": {
    "version": "2.0.0",
    "id": "intver_01JFAQYWG9PSP9076S99BE546R"
  },
  "leadsquared": {
    "version": "2.0.0",
    "id": "intver_01JFAQZ0PFZ7W5AJN0MZQJHGW7"
  },
  "leandata": {
    "version": "2.0.0",
    "id": "intver_01JFAQZ54J1MYP5D4WXZ1Z7KK7"
  },
  "less-annoying-crm": {
    "version": "2.0.0",
    "id": "intver_01JFAQZ99G8ZWD4847189A4EGS"
  },
  "line": {
    "version": "2.0.6",
    "id": "intver_01KMZAMNQDY2BZAW86RZ58VSQY"
  },
  "linear": {
    "version": "2.5.0",
    "id": "intver_01KRHWEFJX783DXZG4XZ7B6ER8"
  },
  "linkedin": {
    "version": "0.1.3",
    "id": "intver_01KN89RB1CBCP1MGAYEBHMCT5Q"
  },
  "localiq": {
    "version": "2.0.0",
    "id": "intver_01JFAQZDKZQV3J44CJF074YHXZ"
  },
  "loops": {
    "version": "0.1.5",
    "id": "intver_01KMZANASVEZEW761JG63F1RM0"
  },
  "mailchimp": {
    "version": "0.3.12",
    "id": "intver_01KMZANJGYPESPJHZJ7NPEE7C6"
  },
  "mailerlite": {
    "version": "3.0.2",
    "id": "intver_01K6BFZTMA8A1Z3KV1QXGWB61S"
  },
  "make": {
    "version": "0.3.9",
    "id": "intver_01KMZANTJE8DN94EE6K74ETJ0Z"
  },
  "mcp-client": {
    "version": "0.1.0",
    "id": "intver_01KQWWKVJFV3DD65PR233GRHMH"
  },
  "messenger": {
    "version": "5.1.8",
    "id": "intver_01KPDRM4RJN85JM6DRP43W48PX"
  },
  "mindtickle": {
    "version": "2.0.0",
    "id": "intver_01JFAQZNRAZMBAEZ943WY44EXD"
  },
  "mintlify": {
    "version": "1.0.1",
    "id": "intver_01KMZAPEVTD6HZ9BPRHVK09DC5"
  },
  "mistral-ai": {
    "version": "1.0.0",
    "id": "intver_01KNS021C2ZFXWGAXC5TFAXBA9"
  },
  "monday": {
    "version": "1.0.2",
    "id": "intver_01KMZAQ1357YEQBMVPHQ8QYSAF"
  },
  "mural": {
    "version": "2.0.0",
    "id": "intver_01JFAQZT1R0PR8C59Z1MHWMG83"
  },
  "notion": {
    "version": "3.0.5",
    "id": "intver_01KN89RW8Z2ZK98F8JM8X66RXS"
  },
  "nutshell": {
    "version": "2.0.0",
    "id": "intver_01JFAQZYAY7HCM2VTWTZK0GHZ6"
  },
  "odoo": {
    "version": "0.1.0",
    "id": "intver_01KRC19AE1XTHSSW6D0FZPJZ1H"
  },
  "okta": {
    "version": "2.0.0",
    "id": "intver_01JFAR02JMED7RK95YXCDRVNXX"
  },
  "openai": {
    "version": "20.0.0",
    "id": "intver_01KNS02E7FF0WQAYXWJDM3ZZNQ"
  },
  "outreach": {
    "version": "2.0.0",
    "id": "intver_01JFAR0717CX7YJNEX0FXRR8TN"
  },
  "pandadoc": {
    "version": "2.0.0",
    "id": "intver_01JFAR0BBGR1EGMRR2PRGHRABB"
  },
  "pdf-generator": {
    "version": "0.0.7",
    "id": "intver_01KMZAQP6WG231KVJSEY88KG2J"
  },
  "pimcore": {
    "version": "2.0.0",
    "id": "intver_01JFAR0FRDMZNK1B1EYKTHKANP"
  },
  "pipedrive": {
    "version": "5.0.1",
    "id": "intver_01K6BG0EMJ1FQ0E5DCZZEN9301"
  },
  "pipeliner": {
    "version": "2.0.0",
    "id": "intver_01JFAR0R7XHB7VYX0Q0ETV9B3F"
  },
  "plaid": {
    "version": "2.0.0",
    "id": "intver_01JFAR0WH09T4MRTTQHRAH2ESD"
  },
  "planhat": {
    "version": "2.0.0",
    "id": "intver_01JFAR10SHDPEPXTJN6RRB9H6S"
  },
  "plus/apify": {
    "version": "1.0.4",
    "id": "intver_01KH6R8P2ZYNACH8KQED02E9YC"
  },
  "plus/brevo-hitl": {
    "version": "2.0.0",
    "id": "intver_01K392AS04342HT6Z2HZZ60A2D"
  },
  "plus/chatwoot": {
    "version": "1.0.4",
    "id": "intver_01KD3BFCBTV2PNJ80V3VYFBC4M"
  },
  "plus/email-notifier": {
    "version": "1.1.1",
    "id": "intver_01KB0YDR2AQ5A8H0GBZ35J51MQ"
  },
  "plus/go-high-level": {
    "version": "1.0.4",
    "id": "intver_01K6BDMWTZ7FNKTGD4N8YDPH1H"
  },
  "plus/google-analytics": {
    "version": "0.2.4",
    "id": "intver_01HXS7S3FCANEG2EN5FKKWH722"
  },
  "plus/google-chat-spaces": {
    "version": "1.0.3",
    "id": "intver_01K6BDNG0ZNW5JXRA5RDQJQCWN"
  },
  "plus/google-sheets": {
    "version": "1.2.5",
    "id": "intver_01K6BDP63K6Y5HFVJ84R7EKP0Y"
  },
  "plus/hitl-api": {
    "version": "0.2.0",
    "id": "intver_01J804C5W78Y5FWHHNVWMR5VM3"
  },
  "plus/hubspot-help-desk-hitl": {
    "version": "3.1.1",
    "id": "intver_01KC2AWT9BDMTHV36AJRVEF4DN"
  },
  "plus/hubspot-hitl": {
    "version": "5.0.4",
    "id": "intver_01K6BF9Q6D3M6T3J3V541ZJC8Z"
  },
  "plus/huggingface": {
    "version": "0.0.1",
    "id": "intver_01J6FP62B7KEHH4NC4R7NBBTW5"
  },
  "plus/intercom-hitl": {
    "version": "2.0.5",
    "id": "intver_01KEWH6D0NF81Q1WB8W8V225A8"
  },
  "plus/jira": {
    "version": "0.2.4",
    "id": "intver_01KCVM0T96KA8YK723W3N8P494"
  },
  "plus/livechat-hitl": {
    "version": "3.0.2",
    "id": "intver_01K6BFYE44DVXKVFXBHKZED8P9"
  },
  "plus/magento2": {
    "version": "2.0.4",
    "id": "intver_01K6BKG43JX1R6ZEB4CXJ6R65D"
  },
  "plus/messaging": {
    "version": "0.2.3",
    "id": "intver_01HVM0R2R0QXWNH3BEZPYFK6ZJ"
  },
  "plus/mixpanel": {
    "version": "0.2.3",
    "id": "intver_01HXABTRSS5J9K0G1S1MPCX8J9"
  },
  "plus/persat": {
    "version": "1.0.0",
    "id": "intver_01K75D7C0JTQ5FY058T1187G32"
  },
  "plus/salesforce": {
    "version": "1.0.2",
    "id": "intver_01JRTXEF3N4CG8D668ANNW40DS"
  },
  "plus/segment": {
    "version": "0.2.4",
    "id": "intver_01HX7R8GHK3BKX2RHER1KYV0VT"
  },
  "plus/sharepoint": {
    "version": "4.1.0",
    "id": "intver_01K8XWKTBHY5AX8JTBV4T0D4V6"
  },
  "plus/sharepoint-excel": {
    "version": "2.2.1",
    "id": "intver_01K6BKHB4TQ5RFVA6W1VKAREFB"
  },
  "plus/shopify-products-sync": {
    "version": "3.0.2",
    "id": "intver_01K8VDHZ8FM3ZDMTYA8Y7EDXTT"
  },
  "plus/twiliovoice": {
    "version": "0.2.3",
    "id": "intver_01K6BKKDTZ1X8ECNS52N96M8AM"
  },
  "plus/zoho": {
    "version": "3.0.0",
    "id": "intver_01JNRREVZ0BA8VKEKMPMRF0DW5"
  },
  "plus/zohosalesiq": {
    "version": "2.0.0",
    "id": "intver_01JP37YJSERZGZQQW369F7W27C"
  },
  "plus/zoho-sales-iq-hitl": {
    "version": "3.0.0",
    "id": "intver_01K397TXPTA9982A829WV7XNX5"
  },
  "plus/zoom": {
    "version": "3.1.1",
    "id": "intver_01KAEBBGJ327TGZ0AZW31H6S19"
  },
  "posthog": {
    "version": "2.0.0",
    "id": "intver_01JFAR153DTQEGNZXMA4PAAV7D"
  },
  "postman": {
    "version": "2.0.0",
    "id": "intver_01JFAR19F7PZWCD9CBKAB30540"
  },
  "postmark": {
    "version": "0.1.0",
    "id": "intver_01KQ01G3YEPEXVNP2SFH49079G"
  },
  "quickbooks": {
    "version": "2.0.0",
    "id": "intver_01JFAR1E05TRXX8ZHQ52QMG2KJ"
  },
  "reachdesk": {
    "version": "2.0.0",
    "id": "intver_01JFAR1JD70W5VTGDEDGFQXKEB"
  },
  "resend": {
    "version": "0.1.10",
    "id": "intver_01KMZAQXVC4KP20TFCJNGY8PKV"
  },
  "revenuehero": {
    "version": "2.0.0",
    "id": "intver_01JFAR1PDG5ZQHDAT4PX3J67N5"
  },
  "rippling": {
    "version": "0.0.4",
    "id": "intver_01JBMK2M3NWMH63ZTQBSQSEXHB"
  },
  "sage": {
    "version": "2.0.0",
    "id": "intver_01JFAR8RTCW2P6C8VWSMN7FQFS"
  },
  "salesflare": {
    "version": "2.0.0",
    "id": "intver_01JFAR2316BGX6S5NS812P3K1Z"
  },
  "salesforce": {
    "version": "1.0.0",
    "id": "intver_01KN5FRKT6KRAB6RM9T34J70M2"
  },
  "salesloft": {
    "version": "2.0.0",
    "id": "intver_01JFAR27CFAGF2479ER2FSSDF7"
  },
  "sap": {
    "version": "2.0.0",
    "id": "intver_01JFAR2BP4TDJTAGWN841KBC1S"
  },
  "seismic": {
    "version": "2.0.0",
    "id": "intver_01JFAR2G7J0GAC6J69K8TN3429"
  },
  "sendgrid": {
    "version": "0.1.10",
    "id": "intver_01KMZAR5KN275G2NPSSFZ9WTSE"
  },
  "showpad": {
    "version": "2.0.0",
    "id": "intver_01JFAR2MD45546TPY7V2CPBAMD"
  },
  "sisense": {
    "version": "2.0.0",
    "id": "intver_01JFAR2RSBXRYQ5YX9JNTP4A9C"
  },
  "slack": {
    "version": "5.0.2",
    "id": "intver_01KQF3XKNH2W5EPAXK6G4CMW96"
  },
  "smartsheet": {
    "version": "2.0.0",
    "id": "intver_01JFAR2WXTE6FV2C2HP7V0WBTE"
  },
  "splunk": {
    "version": "0.0.4",
    "id": "intver_01JBMK2Y874WV5BGHXYN07HKHE"
  },
  "square": {
    "version": "2.0.0",
    "id": "intver_01JFARACGK6NT3YTKC5KVXVKX6"
  },
  "stripe": {
    "version": "0.5.6",
    "id": "intver_01KMZARNC46Y0CJTQNR5AA8AKD"
  },
  "sunco": {
    "version": "2.0.1",
    "id": "intver_01KMZARX5E90SJEDCQ6GKZ4ZBV"
  },
  "surveymonkey": {
    "version": "2.0.0",
    "id": "intver_01JFAR3A2K8BEMP4XHQ7F5R47R"
  },
  "tableau": {
    "version": "2.0.0",
    "id": "intver_01JFAR3E9K4XXVYFE7SSGT1C9E"
  },
  "tally": {
    "version": "0.1.2",
    "id": "intver_01KMZAS4KR8F34JNE9VP1HJXT9"
  },
  "teamleader": {
    "version": "2.0.0",
    "id": "intver_01JFAR3JKE5HAGV6TBCW7SV4QM"
  },
  "teams": {
    "version": "2.0.4",
    "id": "intver_01KMZASBVV28FFKB2227618RRM"
  },
  "teamviewer": {
    "version": "2.0.0",
    "id": "intver_01JFAR3PY3EBMYYBKQTZAHESXP"
  },
  "telegram": {
    "version": "1.0.7",
    "id": "intver_01KQYYDZKSAHXH5DRK1ES6CKNS"
  },
  "thryv": {
    "version": "2.0.0",
    "id": "intver_01JFAR3VQXXNJTR85472MM0RDY"
  },
  "todoist": {
    "version": "1.0.5",
    "id": "intver_01KMZASWGQHERWV5WESYJR1W1R"
  },
  "trello": {
    "version": "2.1.3",
    "id": "intver_01KMZAT7K4J1JWT5VCV838TFRN"
  },
  "twilio": {
    "version": "1.3.2",
    "id": "intver_01KMZATFC2J1KF4J3T93HPFKGF"
  },
  "vcita": {
    "version": "2.0.0",
    "id": "intver_01JFAR3ZXVBWKYYJ53W7C4E4VB"
  },
  "vercel": {
    "version": "2.0.0",
    "id": "intver_01JFAR44YN7JA1Z86S8CACVG5C"
  },
  "viber": {
    "version": "1.0.5",
    "id": "intver_01KMZATNKPMTPMYBQNZN6744N4"
  },
  "vonage": {
    "version": "1.0.4",
    "id": "intver_01KMZATWVPMNCXAF3XB72FNHKS"
  },
  "webchat": {
    "version": "0.3.0",
    "id": "intver_01JBVV0VQW8XN3Z5V9K8DB1M3B"
  },
  "webflow": {
    "version": "3.1.4",
    "id": "intver_01KMZAV5CCPAJKR8S1M36266M8"
  },
  "webhook": {
    "version": "1.1.5",
    "id": "intver_01KMZAVBMNBFJBA9SM7ATDS5R8"
  },
  "wechat": {
    "version": "0.1.1",
    "id": "intver_01KMZAVJTKWA8CQ8A7KFRDYR5X"
  },
  "whatsapp": {
    "version": "4.15.0",
    "id": "intver_01KRC1AEDCE4P5HTZP5G41495H"
  },
  "workable": {
    "version": "0.1.2",
    "id": "intver_01KMZAWAMH776SVXW1R98ABBHP"
  },
  "workday": {
    "version": "2.0.0",
    "id": "intver_01JFARBCCKWG9BS7DT2RBW9D7B"
  },
  "wrike": {
    "version": "2.0.0",
    "id": "intver_01JFAR4H5WXG78YBE7MEG967MW"
  },
  "zapier": {
    "version": "0.3.10",
    "id": "intver_01KMZAWN77ZX053EB5VJH7C9B9"
  },
  "zendesk": {
    "version": "3.0.6",
    "id": "intver_01KFGPZM7JH7PMSEBRSSM5C4H8"
  },
  "zendesk-messaging-hitl": {
    "version": "1.1.0",
    "id": "intver_01KPRHTAYTB64Z5QEDC1XZCSYH"
  },
  "zendesk-sell": {
    "version": "2.0.0",
    "id": "intver_01JFAR4NP3JGG1BPV4MFJ2HBC3"
  },
  "zoho": {
    "version": "3.1.4",
    "id": "intver_01KMZAX48A0JA4Q0CD3B7REDT0"
  },
  "zoom": {
    "version": "0.1.0",
    "id": "intver_01KNSQZR3F06SRHJY3BCN20JH9"
  }
};

{/* vale on */}

<OpenInHub integration={integrationVersions.gmail} />

The Gmail integration allows your bot to chat with users via your Gmail address.

<Danger>
  Once you've successfully configured the Gmail integration, **the email address you provided will begin responding to all incoming emails as your bot**. Please be aware of this behaviour before configuring the integration.
</Danger>

## Setup

<Tabs>
  <Tab title="Basic configuration">
    <Info>
      You will need:

      * A [published bot](/get-started/quick-start)
      * A [Google account](https://accounts.google.com/)
    </Info>

    <Steps>
      <Step>
        In Botpress Studio, select **Explore Hub** in the upper-right corner.
      </Step>

      <Step>
        Search for the **Gmail** integration, then select **Install Integration**.
      </Step>

      <Step>
        In the **Configuration** menu, select **Authorize Gmail**.
      </Step>

      <Step>
        Follow the instructions to connect Botpress to your Google account.
      </Step>
    </Steps>

    <Note>
      When using basic configuration, a Botpress-managed Gmail application will be used to connect to your Gmail account. However, actions taken by the bot will be attributed to the user who authorized the connection rather than the application.

      For this reason, **we don't recommend using personal Gmail accounts** for this integration. You should set up a [service account](https://docs.cloud.google.com/iam/docs/service-account-overview) and use that account to authorize the connection.
    </Note>
  </Tab>

  <Tab title="Manual configuration">
    For more advanced use cases, you can manually configure the integration.

    <Info>
      You will need:

      * A [published bot](/get-started/quick-start)
      * A [Google account](https://accounts.google.com/)
      * Access to [Google Cloud Console](https://console.cloud.google.com/)
    </Info>

    ### Step 1. Create a Google Cloud Platform project

    <Steps>
      <Step>
        Log in to [Google Cloud Console](https://console.cloud.google.com/) with your Gmail account.
      </Step>

      <Step>
        Select **Select a project** dropdown in the top navigation. Then, select **New Project**.
      </Step>

      <Step>
        Follow the on-screen instructions to create the new project.
      </Step>
    </Steps>

    ### Step 2. Enable the Gmail API

    <Steps>
      <Step>
        In Google Cloud Console, navigate to the **APIs & Services** section.
      </Step>

      <Step>
        Select **Library** from the left sidebar.
      </Step>

      <Step>
        Search for **Gmail API** and select the result.
      </Step>

      <Step>
        Select **Enable** to enable the Gmail API for your project.
      </Step>
    </Steps>

    ### Step 3. Configure the OAuth consent screen

    <Steps>
      <Step>
        In Google Cloud Console, navigate to the **APIs & Services** section.
      </Step>

      <Step>
        Select **OAuth consent screen** in the left sidebar.
      </Step>

      <Step>
        Select **Get Started** and fill out the **App Information** section. Then, select **Next**.
      </Step>

      <Step>
        Under **Audience**, select **External**.
      </Step>

      <Step>
        Fill in the other required sections, then select **Create**.
      </Step>

      <Step>
        Navigate to the **Data Access** tab, then select **Add or remove scopes**.
      </Step>

      <Step>
        Under **Manually add scopes**, enter the following:

        ```plaintext theme={null}
        https://www.googleapis.com/auth/userinfo.email
        https://www.googleapis.com/auth/userinfo.profile
        https://mail.google.com/
        https://www.googleapis.com/auth/gmail.send
        ```
      </Step>

      <Step>
        Select **Add to table**, then **Update**.
      </Step>

      <Step>
        Select **Save** at the bottom of the screen.
      </Step>

      <Step>
        Navigate to the **Audience** tab. Under **Test users**, select **+ Add users**.
      </Step>

      <Step>
        Add an email address for testing the app, then select **Save**.
      </Step>
    </Steps>

    ### Step 4. Create OAuth credentials

    <Steps>
      <Step>
        In Google Cloud Console, navigate to the **APIs & Services** section.
      </Step>

      <Step>
        Select **Credentials** in the left sidebar.
      </Step>

      <Step>
        Select **Create credentials**, then **OAuth client ID**.
      </Step>

      <Step>
        Select **Web application** as the application type.
      </Step>

      <Step>
        Enter a name for the OAuth client ID.
      </Step>

      <Step>
        Under **Authorized redirect URIs**, enter `https://botpress.com`.
      </Step>

      <Step>
        Select **Add URI**, then **Create**.
      </Step>

      <Step>
        Copy the **Client ID** and **Client secret** for use in the next steps.

        <Note>
          The client ID is the string that ends with `.apps.googleusercontent.com`.
        </Note>
      </Step>
    </Steps>

    ### Step 5. Create a service account

    <Steps>
      <Step>
        In Google Cloud Console, navigate to the **IAM & Admin** section.
      </Step>

      <Step>
        Select **Service accounts** in the left sidebar.
      </Step>

      <Step>
        Select **Create service account**.
      </Step>

      <Step>
        Enter a name for the service account. Then, select **Done**.

        <Note>
          You don't need to grant any roles to the service account, as it will only be used to sign webhook events.
        </Note>
      </Step>

      <Step>
        Copy the service account email address for use in the next steps.

        <Tip>
          The service account email address is the string that ends with `.gserviceaccount.com`.
        </Tip>
      </Step>
    </Steps>

    ### Step 6. Create a Pub/Sub topic

    <Steps>
      <Step>
        In Google Cloud Console, search for and navigate to the **Pub/Sub** section.
      </Step>

      <Step>
        Select **Topics** in the left sidebar.
      </Step>

      <Step>
        Select **Create topic**.
      </Step>

      <Step>
        Enter a name for the topic in the **Topic ID** field.
      </Step>

      <Step>
        Uncheck the **Add default subscription** checkbox. Leave the other options unchanged.
      </Step>

      <Step>
        Select **Create** to create the topic.
      </Step>

      <Step>
        Copy the **Topic name** for use in the next steps.

        <Note>
          The topic name is the string that starts with `projects/`.
        </Note>
      </Step>
    </Steps>

    ### Step 7. Grant publish rights on the Pub/Sub topic

    <Steps>
      <Step>
        In Google Cloud Console, search for and navigate to the **Pub/Sub** section.
      </Step>

      <Step>
        Select **Topics** in the left sidebar.
      </Step>

      <Step>
        From the topic list, find the topic you created earlier. Then, select the triple-dot <kbd>⋮</kbd> button on the right.
      </Step>

      <Step>
        Select **View permissions** from the dropdown menu.
      </Step>

      <Step>
        Select **Add principal**.
      </Step>

      <Step>
        Under **Add principals**, enter `gmail-api-push@system.gserviceaccount.com`.

        <Note>
          This service account is managed by Google and is used to push events to Pub/Sub.
        </Note>
      </Step>

      <Step>
        Under **Assign roles**, select `Pub/Sub Publisher`.
      </Step>

      <Step>
        Select **Save** to grant publish rights to the service account.
      </Step>
    </Steps>

    ### Step 8. Generate a shared secret

    <Steps>
      <Step>
        Generate an alphanumeric string to use as a shared secret for signing Pub/Sub push events. We recommend using a string with at least 32 characters.

        <Tip>
          You can use an [online password generator](https://bitwarden.com/password-generator/) to create a secure string.
        </Tip>
      </Step>

      <Step>
        Copy this string for use in the next steps.
      </Step>
    </Steps>

    ### Step 9. Create a Pub/Sub subscription

    <Steps>
      <Step>
        In Google Cloud Console, search for and navigate to the **Pub/Sub** section.
      </Step>

      <Step>
        Select **Subscriptions** in the left sidebar.
      </Step>

      <Step>
        Select **Create subscription**.
      </Step>

      <Step>
        Enter a name for the subscription in the **Subscription ID** field.
      </Step>

      <Step>
        Select the topic you created earlier from the topic dropdown.
      </Step>

      <Step>
        Under **Delivery type**, select **Push**.
      </Step>

      <Step>
        Enter your integration's Botpress-provided webhook URL in the **Endpoint URL** field. To this URL, add `?shared_secret=`, followed by the shared secret you generated earlier.

        <Tip>
          For example, if:

          * Your integration's webhook URL is: `https://webhook.botpress.cloud/57fcfb04-51fd-4381-909a-10e6ae53d310`
          * Your shared secret is `Ut5hzrxs7uV87mzCAKL3ztrzesWWBiNa`

          You would enter:

          `https://webhook.botpress.cloud/57fcfb04-51fd-4381-909a-10e6ae53d310?shared_secret=Ut5hzrxs7uV87mzCAKL3ztrzesWWBiNa`

          in the **Endpoint URL** field.
        </Tip>
      </Step>

      <Step>
        Check the **Enable authentication** checkbox.
      </Step>

      <Step>
        Select the service account email address you created earlier in the **Service account** field.
      </Step>

      <Step>
        Enter the shared secret you generated earlier in the **Audience** field.

        <Note>
          Although this field is marked optional in Google Console, it's required for the integration to work properly.
        </Note>
      </Step>

      <Step>
        Under **Expiration period**, select **Never expire**.
      </Step>

      <Step>
        Under **Acknowledgement deadline**, enter 60 seconds.
      </Step>

      <Step>
        Under **Retry policy**, select **Retry after exponential backoff delay**. Set the minimum backoff to 60 seconds and the maximum backoff to 600 seconds.
      </Step>

      <Step>
        Select **Create** to create the subscription.
      </Step>
    </Steps>

    ### Step 10. Authorize the OAuth application

    <Steps>
      <Step>
        On Gmail, log in to the Google account you want to use with the Gmail integration.
      </Step>

      <Step>
        Once logged in, go to the following URL in your browser:

        ```
        https://accounts.google.com/o/oauth2/auth?response_type=code&scope=https://mail.google.com/%20https://www.googleapis.com/auth/gmail.send&access_type=offline&prompt=consent&redirect_uri=https://botpress.com&client_id=YOUR_CLIENT_ID
        ```

        Replace `YOUR_CLIENT_ID` with your OAuth **Client ID** from [Step 4](#step-4-create-oauth-credentials). For example, if your OAuth client ID is `abcd`, the URL should end with `&client_id=abcd`.
      </Step>

      <Step>
        Follow the on-screen instructions to authorize the OAuth application with your personal Gmail account.

        <Warning>
          After completing the authorization, you will be redirected to [botpress.com](https://botpress.com). Don't close this page.
        </Warning>
      </Step>

      <Step>
        Copy the **authorization code** from the URL in your browser's address bar. The authorization code is the string that appears after `code=` and before `&scope=` in the URL.

        <Tip>
          If you have difficulty finding the authorization code in the URL, you can use online tools like [https://semalt.tools/en/url-parser](https://semalt.tools/en/url-parser) or [https://parseurlonline.com](https://parseurlonline.com).
        </Tip>

        <Note>
          If you update any scopes, you need to generate a new authorization code and add it to the integration's configuration in Botpress Studio. The previous authorization code won't have the correct scope permissions.
        </Note>
      </Step>

      <Step>
        You can now safely close this page.
      </Step>
    </Steps>

    ### Step 11. Configure the integration in Botpress

    <Steps>
      <Step>
        In Botpress Studio, select **Explore Hub** in the upper-right corner.
      </Step>

      <Step>
        Search for the **Gmail** integration, then select **Install Integration**.
      </Step>

      <Step>
        In the **Configuration** menu, select **Configure manually with your own GCP App**.
      </Step>

      <Step>
        Fill in the required fields with all the information you saved from the previous steps.

        <Warning>
          The authorization code is only valid for a short period of time. If the code has expired, you will need to repeat the steps outlined in [Step 10](#step-10-authorize-the-oauth-application).
        </Warning>
      </Step>

      <Step>
        Select **Save Configuration**. If no error message is displayed, the integration was successfully configured.
      </Step>
    </Steps>
  </Tab>
</Tabs>

***

## Using the integration

Once you’ve successfully configured the integration, the email address you provided will begin responding to all incoming messages as your bot. If this is your desired behaviour, no additional setup is required.

You can also use the integration's [Cards](#cards) to interact with your Gmail inbox. This allows you to manage threads, drafts, attachments, and other data associated with your inbox.

***

## Limitations

<AccordionGroup>
  <Accordion title="Costs">
    Botpress shall not be held responsible for any costs you may incur on the Google Cloud Platform while using the Gmail integration, should you choose to use the manual configuration mode. Ensure that you are aware of the costs associated with using the Gmail API and the Google Cloud Platform before using the manual configuration mode.
  </Accordion>

  <Accordion title="API limits">
    Standard Gmail API limitations apply to the Gmail integration in Botpress. These limitations include rate limits, message size restrictions, and other constraints imposed by the Gmail and Google Cloud platforms. Ensure that your bot adheres to these limitations to maintain optimal performance and reliability.

    More details are available in the [Gmail API documentation](https://developers.google.com/gmail/api/reference/quota).
  </Accordion>
</AccordionGroup>

***

## Cards

{/* vale off */}

Here's a reference for all [Cards](/studio/concepts/cards/introduction) available with the integration:

### Change Message Labels

<span>
  {"Modifies the labels on the specified message by adding or removing label IDs."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="id" type="string" required>
      <span>
        {"The ID of the message to modify."}
      </span>
    </ResponseField>

    <ResponseField name="addLabelIds" type="array">
      <span>
        {"A list of IDs of labels to add to this message."}
      </span>
    </ResponseField>

    <ResponseField name="removeLabelIds" type="array">
      <span>
        {"A list of IDs of labels to remove from this message."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  This Card has no output.
</ResponseField>

### Create Draft

<span>
  {"Creates a new draft with the specified email content."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="to" type="string" required>
      <span>
        {"The recipient email address."}
      </span>
    </ResponseField>

    <ResponseField name="subject" type="string" required>
      <span>
        {"The subject of the email."}
      </span>
    </ResponseField>

    <ResponseField name="body" type="string" required>
      <span>
        {"The body content of the email."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  <Expandable>
    <ResponseField name="id" type="string">
      <span>
        {"The immutable ID of the created draft."}
      </span>
    </ResponseField>

    <ResponseField name="message" type="object">
      <span>
        {"The message content of the draft."}
      </span>

      <Expandable>
        <ResponseField name="id" type="string">
          <span>
            {"The ID of the message."}
          </span>
        </ResponseField>

        <ResponseField name="threadId" type="string">
          <span>
            {"The ID of the thread."}
          </span>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

### Create Label

<span>
  {"Creates a new label in the user's mailbox."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="name" type="string" required>
      <span>
        {"The display name of the label to create."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  <Expandable>
    <ResponseField name="id" type="string">
      <span>
        {"The immutable ID of the created label."}
      </span>
    </ResponseField>

    <ResponseField name="name" type="string">
      <span>
        {"The display name of the label."}
      </span>
    </ResponseField>

    <ResponseField name="type" type="string">
      <span>
        {"The owner type for the label (system or user)."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

### Delete Draft

<span>
  {"Immediately and permanently deletes the specified draft. This operation cannot be undone."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="id" type="string" required>
      <span>
        {"The ID of the draft to delete."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  This Card has no output.
</ResponseField>

### Delete Label

<span>
  {"Immediately and permanently deletes the specified label. Messages and threads are not deleted, they simply lose this label."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="id" type="string" required>
      <span>
        {"The ID of the label to delete."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  This Card has no output.
</ResponseField>

### Delete Message

<span>
  {"Immediately and permanently deletes the specified message using its ID. This operation cannot be undone. Prefer messages.trash instead"}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="id" type="string" required>
      <span>
        {"The ID of the message to delete."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  This Card has no output.
</ResponseField>

### Get Draft

<span>
  {"Gets the specified draft by its ID."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="id" type="string" required>
      <span>
        {"The ID of the draft to retrieve."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  <Expandable>
    <ResponseField name="id" type="string">
      <span>
        {"The immutable ID of the draft."}
      </span>
    </ResponseField>

    <ResponseField name="message" type="object">
      <span>
        {"The message content of the draft."}
      </span>

      <Expandable>
        <ResponseField name="id" type="string">
          <span>
            {"The ID of the message."}
          </span>
        </ResponseField>

        <ResponseField name="threadId" type="string">
          <span>
            {"The ID of the thread."}
          </span>
        </ResponseField>

        <ResponseField name="labelIds" type="array">
          <span>
            {"List of label IDs applied to the draft message."}
          </span>
        </ResponseField>

        <ResponseField name="snippet" type="string">
          <span>
            {"A short part of the message text."}
          </span>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

### Get Label

<span>
  {"Gets the specified label by its ID."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="id" type="string" required>
      <span>
        {"The ID of the label to retrieve."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  <Expandable>
    <ResponseField name="id" type="string">
      <span>
        {"The immutable ID of the label."}
      </span>
    </ResponseField>

    <ResponseField name="name" type="string">
      <span>
        {"The display name of the label."}
      </span>
    </ResponseField>

    <ResponseField name="type" type="string">
      <span>
        {"The owner type for the label (system or user)."}
      </span>
    </ResponseField>

    <ResponseField name="messageListVisibility" type="string">
      <span>
        {"The visibility of messages with this label in the message list."}
      </span>
    </ResponseField>

    <ResponseField name="labelListVisibility" type="string">
      <span>
        {"The visibility of the label in the label list."}
      </span>
    </ResponseField>

    <ResponseField name="messagesTotal" type="number">
      <span>
        {"The total number of messages with the label."}
      </span>
    </ResponseField>

    <ResponseField name="messagesUnread" type="number">
      <span>
        {"The number of unread messages with the label."}
      </span>
    </ResponseField>

    <ResponseField name="threadsTotal" type="number">
      <span>
        {"The total number of threads with the label."}
      </span>
    </ResponseField>

    <ResponseField name="threadsUnread" type="number">
      <span>
        {"The number of unread threads with the label."}
      </span>
    </ResponseField>

    <ResponseField name="color" type="object">
      <span>
        {"The color to assign to the label."}
      </span>

      <Expandable>
        <ResponseField name="backgroundColor" type="string">
          <span>
            {"The background color."}
          </span>
        </ResponseField>

        <ResponseField name="textColor" type="string">
          <span>
            {"The text color."}
          </span>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

### Get Message Attachment

<span>
  {"Gets the specified message attachment by its ID."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="messageId" type="string" required>
      <span>
        {"The ID of the message containing the attachment."}
      </span>
    </ResponseField>

    <ResponseField name="attachmentId" type="string" required>
      <span>
        {"The ID of the attachment to retrieve."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  <Expandable>
    <ResponseField name="attachment" type="object" required>
      <span>
        {"The attachment retrieved from the message."}
      </span>

      <Expandable>
        <ResponseField name="size" type="number | null" />

        <ResponseField name="data" type="string | null" />

        <ResponseField name="attachmentId" type="string | null" />
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

### Get Message Attachment From Mail

<span>
  {"Gets the first attachment from a message by automatically finding the attachment ID from the message."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="messageId" type="string" required>
      <span>
        {"The ID of the message containing the attachment."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  <Expandable>
    <ResponseField name="attachment" type="object" required>
      <span>
        {"The attachment retrieved from the message."}
      </span>

      <Expandable>
        <ResponseField name="size" type="number | null" />

        <ResponseField name="data" type="string | null" />

        <ResponseField name="attachmentId" type="string | null" />
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

### Get Thread

<span>
  {"Gets the specified thread by its ID, including all messages in the thread."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="id" type="string" required>
      <span>
        {"The ID of the thread to retrieve."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  <Expandable>
    <ResponseField name="id" type="string">
      <span>
        {"The unique ID of the thread."}
      </span>
    </ResponseField>

    <ResponseField name="snippet" type="string">
      <span>
        {"A short part of the message text."}
      </span>
    </ResponseField>

    <ResponseField name="historyId" type="string">
      <span>
        {"The history ID of the thread."}
      </span>
    </ResponseField>

    <ResponseField name="messages" type="array">
      <span>
        {"The list of messages in the thread."}
      </span>

      <Expandable title="array item properties">
        <ResponseField name="id" type="string">
          <span>
            {"The ID of the message."}
          </span>
        </ResponseField>

        <ResponseField name="threadId" type="string">
          <span>
            {"The ID of the thread the message belongs to."}
          </span>
        </ResponseField>

        <ResponseField name="labelIds" type="array">
          <span>
            {"List of label IDs applied to this message."}
          </span>
        </ResponseField>

        <ResponseField name="snippet" type="string">
          <span>
            {"A short part of the message text."}
          </span>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

### List Drafts

<span>
  {"Lists all drafts in the user's mailbox."}
</span>

<ResponseField name="input" type="object">
  This Card has no input fields.
</ResponseField>

<ResponseField name="output" type="object">
  <Expandable>
    <ResponseField name="drafts" type="array">
      <span>
        {"List of drafts."}
      </span>

      <Expandable title="array item properties">
        <ResponseField name="id" type="string">
          <span>
            {"The immutable ID of the draft."}
          </span>
        </ResponseField>

        <ResponseField name="message" type="object">
          <span>
            {"The message content of the draft."}
          </span>

          <Expandable>
            <ResponseField name="id" type="string">
              <span>
                {"The ID of the message contained in the draft."}
              </span>
            </ResponseField>

            <ResponseField name="threadId" type="string">
              <span>
                {"The ID of the thread the draft belongs to."}
              </span>
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="resultSizeEstimate" type="number">
      <span>
        {"Estimated total number of results."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

### List Labels

<span>
  {"Lists all labels in the user's mailbox, including system labels and user-created labels."}
</span>

<ResponseField name="input" type="object">
  This Card has no input fields.
</ResponseField>

<ResponseField name="output" type="object">
  <Expandable>
    <ResponseField name="labels" type="array">
      <span>
        {"List of labels."}
      </span>

      <Expandable title="array item properties">
        <ResponseField name="id" type="string">
          <span>
            {"The immutable ID of the label."}
          </span>
        </ResponseField>

        <ResponseField name="name" type="string">
          <span>
            {"The display name of the label."}
          </span>
        </ResponseField>

        <ResponseField name="type" type="string">
          <span>
            {"The owner type for the label (system or user)."}
          </span>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

### List Threads

<span>
  {"Lists all email threads in the user's mailbox."}
</span>

<ResponseField name="input" type="object">
  This Card has no input fields.
</ResponseField>

<ResponseField name="output" type="object">
  <Expandable>
    <ResponseField name="threads" type="array">
      <span>
        {"List of threads in the mailbox."}
      </span>

      <Expandable title="array item properties">
        <ResponseField name="id" type="string">
          <span>
            {"The unique ID of the thread."}
          </span>
        </ResponseField>

        <ResponseField name="snippet" type="string">
          <span>
            {"A short part of the message text."}
          </span>
        </ResponseField>

        <ResponseField name="historyId" type="string">
          <span>
            {"The history ID of the thread."}
          </span>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="resultSizeEstimate" type="number">
      <span>
        {"Estimated total number of results."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

### Send Draft

<span>
  {"Sends the specified draft. The draft will be deleted after being sent."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="id" type="string" required>
      <span>
        {"The ID of the draft to send."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  <Expandable>
    <ResponseField name="id" type="string">
      <span>
        {"The ID of the sent message."}
      </span>
    </ResponseField>

    <ResponseField name="threadId" type="string">
      <span>
        {"The ID of the thread the message belongs to."}
      </span>
    </ResponseField>

    <ResponseField name="labelIds" type="array">
      <span>
        {"List of label IDs applied to the sent message."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

### Trash Message

<span>
  {"Moves the specified message to the trash. The message can be restored from the trash using untrashMessage."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="id" type="string" required>
      <span>
        {"The ID of the message to trash."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  This Card has no output.
</ResponseField>

### Trash Thread

<span>
  {"Moves the specified thread to the trash. All messages in the thread will be moved to trash. The thread can be restored using untrashThread."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="id" type="string" required>
      <span>
        {"The ID of the thread to trash."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  This Card has no output.
</ResponseField>

### Untrash Message

<span>
  {"Removes the specified message from the trash and restores it to the inbox."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="id" type="string" required>
      <span>
        {"The ID of the message to untrash."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  This Card has no output.
</ResponseField>

### Untrash Thread

<span>
  {"Removes the specified thread from the trash. All messages in the thread will be restored."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="id" type="string" required>
      <span>
        {"The ID of the thread to restore from trash."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  This Card has no output.
</ResponseField>

### Update Draft

<span>
  {"Replaces a draft's content with the new email content provided."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="id" type="string" required>
      <span>
        {"The ID of the draft to update."}
      </span>
    </ResponseField>

    <ResponseField name="to" type="string" required>
      <span>
        {"The recipient email address."}
      </span>
    </ResponseField>

    <ResponseField name="subject" type="string" required>
      <span>
        {"The subject of the email."}
      </span>
    </ResponseField>

    <ResponseField name="body" type="string" required>
      <span>
        {"The body content of the email."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  <Expandable>
    <ResponseField name="id" type="string">
      <span>
        {"The immutable ID of the updated draft."}
      </span>
    </ResponseField>

    <ResponseField name="message" type="object">
      <span>
        {"The message content of the draft."}
      </span>

      <Expandable>
        <ResponseField name="id" type="string">
          <span>
            {"The ID of the message."}
          </span>
        </ResponseField>

        <ResponseField name="threadId" type="string">
          <span>
            {"The ID of the thread."}
          </span>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

### Update Label

<span>
  {"Updates the specified label with new properties like name or color."}
</span>

<ResponseField name="input" type="object">
  <Expandable>
    <ResponseField name="id" type="string" required>
      <span>
        {"The ID of the label to update."}
      </span>
    </ResponseField>

    <ResponseField name="name" type="string">
      <span>
        {"The new display name for the label."}
      </span>
    </ResponseField>

    <ResponseField name="backgroundColor" type="string">
      <span>
        {"The background color as hex string (e.g., #ffffff)."}
      </span>
    </ResponseField>

    <ResponseField name="textColor" type="string">
      <span>
        {"The text color as hex string (e.g., #000000)."}
      </span>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="output" type="object">
  <Expandable>
    <ResponseField name="id" type="string">
      <span>
        {"The immutable ID of the label."}
      </span>
    </ResponseField>

    <ResponseField name="name" type="string">
      <span>
        {"The display name of the label."}
      </span>
    </ResponseField>

    <ResponseField name="type" type="string">
      <span>
        {"The owner type for the label (system or user)."}
      </span>
    </ResponseField>

    <ResponseField name="color" type="object">
      <span>
        {"The color assigned to the label."}
      </span>

      <Expandable>
        <ResponseField name="backgroundColor" type="string">
          <span>
            {"The background color."}
          </span>
        </ResponseField>

        <ResponseField name="textColor" type="string">
          <span>
            {"The text color."}
          </span>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>
