Endpoint Send Sheet Via Email Excel Pdf Or Pdf Gantt Format
Name
send_sheet_email
Description
Sends the sheet as a Excel / PDF attachment via email to the designated recipients. [API reference]
Parameters
| Parameter | Required | Options | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Name:
Label: SheetId |
YES | |||||||||||||||||||||
|
Name:
Label: Format |
YES |
|
||||||||||||||||||||
|
Name:
Label: Subject |
||||||||||||||||||||||
|
Name:
Label: Message |
||||||||||||||||||||||
|
Name:
Label: CC Me |
|
|||||||||||||||||||||
|
Name:
Label: Paper Size (Only for PDF) |
|
|||||||||||||||||||||
|
Name:
Label: Send To Email(s) |
||||||||||||||||||||||
|
Name:
Label: Send To Group(s) |
Output Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| Version |
DT_I4
|
int
|
||
| ResultCode |
DT_I4
|
int
|
||
| Message |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
| failedItems |
DT_WSTR
|
nvarchar(4000)
|
4000 |
Input Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Examples
SSIS
Use Smartsheet Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Source
| Required Parameters | |
|---|---|
| SheetId | Fill-in the parameter... |
API Destination
| Required Parameters | |
|---|---|
| SheetId | Fill-in the parameter... |
ODBC application
Use these SQL queries in your ODBC application data source:
Send sheet via email
<p>Sends a sheet as an email attachment (PDF or Excel) to a list of emails or groups.</p>
SELECT * FROM send_sheet_email
WITH(
SheetId='1592926391979908'
, Subject='Test report'
, Message='This email contains report attachment'
, CcMe='true'
, PaperSize='LETTER'
, SendToEmails='bob@mycompany.com~sam@mycompany.com'
--OR (Emails or Group only - one allowed)
--, SendToGroups='10022222001~10333330002'
)
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Send sheet via email
<p>Sends a sheet as an email attachment (PDF or Excel) to a list of emails or groups.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM send_sheet_email
WITH(
SheetId=''1592926391979908''
, Subject=''Test report''
, Message=''This email contains report attachment''
, CcMe=''true''
, PaperSize=''LETTER''
, SendToEmails=''bob@mycompany.com~sam@mycompany.com''
--OR (Emails or Group only - one allowed)
--, SendToGroups=''10022222001~10333330002''
)';
EXEC (@MyQuery) AT [LS_TO_SMARTSHEET_IN_GATEWAY];