Smartsheet Connector
Documentation
Version: 2
Documentation

EndPoint Send Report via Email (EXCEL, PDF, or PDF_GANTT format)


Name

send_report_email

Description

Sends the report as a Excel / PDF attachment via email to the designated recipients. [API reference]

Parameters

Parameter Label Required Options Description
ReportId ReportId YES
Format Format YES
Option Value
EXCEL EXCEL
PDF PDF
PDF_GANTT PDF_GANTT
Subject Subject NO
Message Message NO
CcMe CC Me NO
Option Value
true true
false false
PaperSize Paper Size (Only for PDF) NO
Option Value
LETTER LETTER
LEGAL LEGAL
WIDE WIDE
ARCHID ARCHID
A4 A4
A3 A3
A2 A2
A1 A1
A0 A0
SendToEmails SendToEmails NO
SendToGroups SendToGroups NO

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Raw Description
Version DT_I4 int False
ResultCode DT_I4 int False
Message DT_WSTR nvarchar(1000) 1000 False
failedItems DT_WSTR nvarchar(4000) 4000 False

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Raw 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 component to read data or in API Destination component to read/write data:

Send Report via Email (EXCEL, PDF, or PDF_GANTT format) using API Source

Smartsheet
Send Report via Email (EXCEL, PDF, or PDF_GANTT format)
SSIS API Source - Read from table or endpoint

Send Report via Email (EXCEL, PDF, or PDF_GANTT format) using API Destination

Smartsheet
Send Report via Email (EXCEL, PDF, or PDF_GANTT format)
SSIS API Destination - Access table or endpoint

ODBC application

Use these SQL queries in your ODBC application data source:

Send Report via Email to Users or Groups (as PDF, Excel)

This example shows how to send Report via Email (PDF or Excel format) to list of emails or groups.

SELECT * FROM send_report_email
WITH(
	  ReportId='2972339541069700'
	, 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 Report via Email to Users or Groups (as PDF, Excel)

This example shows how to send Report via Email (PDF or Excel format) to list of emails or groups.

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM send_report_email
WITH(
	  ReportId=''2972339541069700''
	, 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 [LINKED_SERVER_TO_SMARTSHEET_IN_DATA_GATEWAY];