Skip to content

Commit 724882a

Browse files
committed
revert servicenow to use basic auth instead of oauth
1 parent 0598bd7 commit 724882a

File tree

22 files changed

+261
-1086
lines changed

22 files changed

+261
-1086
lines changed

apps/docs/components/icons.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3387,17 +3387,14 @@ export function SalesforceIcon(props: SVGProps<SVGSVGElement>) {
33873387

33883388
export function ServiceNowIcon(props: SVGProps<SVGSVGElement>) {
33893389
return (
3390-
<svg
3391-
{...props}
3392-
xmlns='http://www.w3.org/2000/svg'
3393-
viewBox='0 0 1570 1403'
3394-
width='48'
3395-
height='48'
3396-
>
3390+
<svg {...props} xmlns='http://www.w3.org/2000/svg' viewBox='0 0 71.1 63.6'>
33973391
<path
3398-
fill='#62d84e'
33993392
fillRule='evenodd'
3400-
d='M1228.4 138.9c129.2 88.9 228.9 214.3 286.3 360.2 57.5 145.8 70 305.5 36 458.5S1437.8 1250 1324 1357.9c-13.3 12.9-28.8 23.4-45.8 30.8-17 7.5-35.2 11.9-53.7 12.9-18.5 1.1-37.1-1.1-54.8-6.6-17.7-5.4-34.3-13.9-49.1-25.2-48.2-35.9-101.8-63.8-158.8-82.6-57.1-18.9-116.7-28.5-176.8-28.5s-119.8 9.6-176.8 28.5c-57 18.8-110.7 46.7-158.9 82.6-14.6 11.2-31 19.8-48.6 25.3s-36 7.8-54.4 6.8c-18.4-.9-36.5-5.1-53.4-12.4s-32.4-17.5-45.8-30.2C132.5 1251 53 1110.8 19 956.8s-20.9-314.6 37.6-461c58.5-146.5 159.6-272 290.3-360.3S631.8.1 789.6.5c156.8 1.3 309.6 49.6 438.8 138.4m-291.8 1014c48.2-19.2 92-48 128.7-84.6 36.7-36.7 65.5-80.4 84.7-128.6 19.2-48.1 28.4-99.7 27-151.5 0-103.9-41.3-203.5-114.8-277S889 396.4 785 396.4s-203.7 41.3-277.2 114.8S393 684.3 393 788.2c-1.4 51.8 7.8 103.4 27 151.5 19.2 48.2 48 91.9 84.7 128.6 36.7 36.6 80.5 65.4 128.6 84.6 48.2 19.2 99.8 28.4 151.7 27 51.8 1.4 103.4-7.8 151.6-27'
3393+
clipRule='evenodd'
3394+
fill='#62D84E'
3395+
d='M35.8,0C16.1,0,0,15.9,0,35.6c0,9.8,4,19.3,11.2,26c2.5,2.4,6.4,2.6,9.2,0.5c9-6.7,21.4-6.7,30.4,0
3396+
c2.8,2.1,6.7,1.9,9.2-0.5C74.3,48,74.9,25.4,61.3,11.1C54.7,4.1,45.4,0.1,35.8,0 M35.6,53.5C26,53.8,18,46.2,17.8,36.7
3397+
c0-0.3,0-0.6,0-0.9c0-9.8,8-17.8,17.8-17.8s17.8,8,17.8,17.8c0.3,9.6-7.3,17.5-16.8,17.8C36.2,53.5,35.9,53.5,35.6,53.5'
34013398
/>
34023399
</svg>
34033400
)

apps/docs/components/ui/icon-mapping.ts

Lines changed: 93 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -120,117 +120,117 @@ import {
120120
type IconComponent = ComponentType<SVGProps<SVGSVGElement>>
121121

122122
export const blockTypeToIconMap: Record<string, IconComponent> = {
123-
calendly: CalendlyIcon,
124-
mailchimp: MailchimpIcon,
125-
postgresql: PostgresIcon,
126-
twilio_voice: TwilioIcon,
127-
elasticsearch: ElasticsearchIcon,
128-
rds: RDSIcon,
129-
translate: TranslateIcon,
130-
dynamodb: DynamoDBIcon,
131-
wordpress: WordpressIcon,
132-
tavily: TavilyIcon,
123+
zoom: ZoomIcon,
124+
zep: ZepIcon,
133125
zendesk: ZendeskIcon,
134126
youtube: YouTubeIcon,
135-
supabase: SupabaseIcon,
136-
vision: EyeIcon,
137-
zoom: ZoomIcon,
138-
confluence: ConfluenceIcon,
139-
arxiv: ArxivIcon,
140-
webflow: WebflowIcon,
141-
pinecone: PineconeIcon,
142-
apollo: ApolloIcon,
143-
servicenow: ServiceNowIcon,
127+
x: xIcon,
128+
wordpress: WordpressIcon,
129+
wikipedia: WikipediaIcon,
144130
whatsapp: WhatsAppIcon,
131+
webflow: WebflowIcon,
132+
wealthbox: WealthboxIcon,
133+
vision: EyeIcon,
134+
video_generator: VideoIcon,
145135
typeform: TypeformIcon,
146-
qdrant: QdrantIcon,
147-
shopify: ShopifyIcon,
148-
asana: AsanaIcon,
136+
twilio_voice: TwilioIcon,
137+
twilio_sms: TwilioIcon,
138+
tts: TTSIcon,
139+
trello: TrelloIcon,
140+
translate: TranslateIcon,
141+
thinking: BrainIcon,
142+
telegram: TelegramIcon,
143+
tavily: TavilyIcon,
144+
supabase: SupabaseIcon,
145+
stt: STTIcon,
146+
stripe: StripeIcon,
147+
stagehand: StagehandIcon,
148+
ssh: SshIcon,
149149
sqs: SQSIcon,
150-
apify: ApifyIcon,
151-
memory: BrainIcon,
152-
gitlab: GitLabIcon,
153-
polymarket: PolymarketIcon,
150+
spotify: SpotifyIcon,
151+
smtp: SmtpIcon,
152+
slack: SlackIcon,
153+
shopify: ShopifyIcon,
154+
sharepoint: MicrosoftSharepointIcon,
155+
sftp: SftpIcon,
156+
servicenow: ServiceNowIcon,
154157
serper: SerperIcon,
155-
linear: LinearIcon,
156-
exa: ExaAIIcon,
157-
telegram: TelegramIcon,
158+
sentry: SentryIcon,
159+
sendgrid: SendgridIcon,
160+
search: SearchIcon,
158161
salesforce: SalesforceIcon,
159-
hubspot: HubspotIcon,
160-
hunter: HunterIOIcon,
161-
linkup: LinkupIcon,
162-
mongodb: MongoDBIcon,
163-
airtable: AirtableIcon,
164-
discord: DiscordIcon,
165-
ahrefs: AhrefsIcon,
166-
neo4j: Neo4jIcon,
167-
tts: TTSIcon,
168-
jina: JinaAIIcon,
169-
google_docs: GoogleDocsIcon,
170-
perplexity: PerplexityIcon,
171-
google_search: GoogleIcon,
172-
x: xIcon,
173-
kalshi: KalshiIcon,
174-
google_calendar: GoogleCalendarIcon,
175-
zep: ZepIcon,
162+
s3: S3Icon,
163+
resend: ResendIcon,
164+
reddit: RedditIcon,
165+
rds: RDSIcon,
166+
qdrant: QdrantIcon,
176167
posthog: PosthogIcon,
177-
grafana: GrafanaIcon,
178-
google_slides: GoogleSlidesIcon,
179-
microsoft_planner: MicrosoftPlannerIcon,
180-
thinking: BrainIcon,
168+
postgresql: PostgresIcon,
169+
polymarket: PolymarketIcon,
181170
pipedrive: PipedriveIcon,
182-
dropbox: DropboxIcon,
183-
stagehand: StagehandIcon,
184-
google_forms: GoogleFormsIcon,
185-
file: DocumentIcon,
186-
mistral_parse: MistralIcon,
187-
gmail: GmailIcon,
188-
openai: OpenAIIcon,
171+
pinecone: PineconeIcon,
172+
perplexity: PerplexityIcon,
173+
parallel_ai: ParallelIcon,
189174
outlook: OutlookIcon,
190-
incidentio: IncidentioIcon,
175+
openai: OpenAIIcon,
191176
onedrive: MicrosoftOneDriveIcon,
192-
resend: ResendIcon,
193-
google_vault: GoogleVaultIcon,
194-
sharepoint: MicrosoftSharepointIcon,
195-
huggingface: HuggingFaceIcon,
196-
sendgrid: SendgridIcon,
197-
video_generator: VideoIcon,
198-
smtp: SmtpIcon,
199-
google_groups: GoogleGroupsIcon,
200-
mailgun: MailgunIcon,
201-
clay: ClayIcon,
202-
jira: JiraIcon,
203-
search: SearchIcon,
204-
linkedin: LinkedInIcon,
205-
wealthbox: WealthboxIcon,
206177
notion: NotionIcon,
207-
elevenlabs: ElevenLabsIcon,
178+
neo4j: Neo4jIcon,
179+
mysql: MySQLIcon,
180+
mongodb: MongoDBIcon,
181+
mistral_parse: MistralIcon,
208182
microsoft_teams: MicrosoftTeamsIcon,
209-
github: GithubIcon,
210-
sftp: SftpIcon,
211-
ssh: SshIcon,
212-
google_drive: GoogleDriveIcon,
213-
sentry: SentryIcon,
214-
reddit: RedditIcon,
215-
parallel_ai: ParallelIcon,
216-
spotify: SpotifyIcon,
217-
stripe: StripeIcon,
218-
s3: S3Icon,
219-
trello: TrelloIcon,
183+
microsoft_planner: MicrosoftPlannerIcon,
184+
microsoft_excel: MicrosoftExcelIcon,
185+
memory: BrainIcon,
220186
mem0: Mem0Icon,
187+
mailgun: MailgunIcon,
188+
mailchimp: MailchimpIcon,
189+
linkup: LinkupIcon,
190+
linkedin: LinkedInIcon,
191+
linear: LinearIcon,
221192
knowledge: PackageSearchIcon,
193+
kalshi: KalshiIcon,
194+
jira: JiraIcon,
195+
jina: JinaAIIcon,
222196
intercom: IntercomIcon,
223-
twilio_sms: TwilioIcon,
224-
duckduckgo: DuckDuckGoIcon,
225-
slack: SlackIcon,
226-
datadog: DatadogIcon,
227-
microsoft_excel: MicrosoftExcelIcon,
197+
incidentio: IncidentioIcon,
228198
image_generator: ImageIcon,
199+
hunter: HunterIOIcon,
200+
huggingface: HuggingFaceIcon,
201+
hubspot: HubspotIcon,
202+
grafana: GrafanaIcon,
203+
google_vault: GoogleVaultIcon,
204+
google_slides: GoogleSlidesIcon,
229205
google_sheets: GoogleSheetsIcon,
230-
wikipedia: WikipediaIcon,
231-
cursor: CursorIcon,
206+
google_groups: GoogleGroupsIcon,
207+
google_forms: GoogleFormsIcon,
208+
google_drive: GoogleDriveIcon,
209+
google_docs: GoogleDocsIcon,
210+
google_calendar: GoogleCalendarIcon,
211+
google_search: GoogleIcon,
212+
gmail: GmailIcon,
213+
gitlab: GitLabIcon,
214+
github: GithubIcon,
232215
firecrawl: FirecrawlIcon,
233-
mysql: MySQLIcon,
216+
file: DocumentIcon,
217+
exa: ExaAIIcon,
218+
elevenlabs: ElevenLabsIcon,
219+
elasticsearch: ElasticsearchIcon,
220+
dynamodb: DynamoDBIcon,
221+
duckduckgo: DuckDuckGoIcon,
222+
dropbox: DropboxIcon,
223+
discord: DiscordIcon,
224+
datadog: DatadogIcon,
225+
cursor: CursorIcon,
226+
confluence: ConfluenceIcon,
227+
clay: ClayIcon,
228+
calendly: CalendlyIcon,
234229
browser_use: BrowserUseIcon,
235-
stt: STTIcon,
230+
asana: AsanaIcon,
231+
arxiv: ArxivIcon,
232+
apollo: ApolloIcon,
233+
apify: ApifyIcon,
234+
airtable: AirtableIcon,
235+
ahrefs: AhrefsIcon,
236236
}

apps/docs/content/docs/en/tools/servicenow.mdx

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: ServiceNow
3-
description: Create, read, update, delete, and bulk import ServiceNow records
3+
description: Create, read, update, and delete ServiceNow records
44
---
55

66
import { BlockInfoCard } from "@/components/ui/block-info-card"
@@ -10,9 +10,23 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
1010
color="#032D42"
1111
/>
1212

13+
{/* MANUAL-CONTENT-START:intro */}
14+
[ServiceNow](https://www.servicenow.com/) is a powerful cloud platform designed to streamline and automate IT service management (ITSM), workflows, and business processes across your organization. ServiceNow enables you to manage incidents, requests, tasks, users, and more using its extensive API.
15+
16+
With ServiceNow, you can:
17+
18+
- **Automate IT workflows**: Create, read, update, and delete records in any ServiceNow table, such as incidents, tasks, change requests, and users.
19+
- **Integrate systems**: Connect ServiceNow with your other tools and processes for seamless automation.
20+
- **Maintain a single source of truth**: Keep all your service and operations data organized and accessible.
21+
- **Drive operational efficiency**: Reduce manual work and improve service quality with customizable workflows and automation.
22+
23+
In Sim, the ServiceNow integration enables your agents to interact directly with your ServiceNow instance as part of their workflows. Agents can create, read, update, or delete records in any ServiceNow table and leverage ticket or user data for sophisticated automation and decision-making. This integration bridges your workflow automation and IT operations, empowering your agents to manage service requests, incidents, users, and assets without manual intervention. By connecting Sim with ServiceNow, you can automate service management tasks, improve response times, and ensure consistent, secure access to your organization's vital service data.
24+
{/* MANUAL-CONTENT-END */}
25+
26+
1327
## Usage Instructions
1428

15-
Integrate ServiceNow into your workflow. Can create, read, update, and delete records in any ServiceNow table (incidents, tasks, users, etc.). Supports bulk import operations for data migration and ETL.
29+
Integrate ServiceNow into your workflow. Create, read, update, and delete records in any ServiceNow table including incidents, tasks, change requests, users, and more.
1630

1731

1832

@@ -27,7 +41,8 @@ Create a new record in a ServiceNow table
2741
| Parameter | Type | Required | Description |
2842
| --------- | ---- | -------- | ----------- |
2943
| `instanceUrl` | string | Yes | ServiceNow instance URL \(e.g., https://instance.service-now.com\) |
30-
| `credential` | string | No | ServiceNow OAuth credential ID |
44+
| `username` | string | Yes | ServiceNow username |
45+
| `password` | string | Yes | ServiceNow password |
3146
| `tableName` | string | Yes | Table name \(e.g., incident, task, sys_user\) |
3247
| `fields` | json | Yes | Fields to set on the record \(JSON object\) |
3348

@@ -46,8 +61,9 @@ Read records from a ServiceNow table
4661

4762
| Parameter | Type | Required | Description |
4863
| --------- | ---- | -------- | ----------- |
49-
| `instanceUrl` | string | No | ServiceNow instance URL \(auto-detected from OAuth if not provided\) |
50-
| `credential` | string | No | ServiceNow OAuth credential ID |
64+
| `instanceUrl` | string | Yes | ServiceNow instance URL \(e.g., https://instance.service-now.com\) |
65+
| `username` | string | Yes | ServiceNow username |
66+
| `password` | string | Yes | ServiceNow password |
5167
| `tableName` | string | Yes | Table name |
5268
| `sysId` | string | No | Specific record sys_id |
5369
| `number` | string | No | Record number \(e.g., INC0010001\) |
@@ -70,8 +86,9 @@ Update an existing record in a ServiceNow table
7086

7187
| Parameter | Type | Required | Description |
7288
| --------- | ---- | -------- | ----------- |
73-
| `instanceUrl` | string | No | ServiceNow instance URL \(auto-detected from OAuth if not provided\) |
74-
| `credential` | string | No | ServiceNow OAuth credential ID |
89+
| `instanceUrl` | string | Yes | ServiceNow instance URL \(e.g., https://instance.service-now.com\) |
90+
| `username` | string | Yes | ServiceNow username |
91+
| `password` | string | Yes | ServiceNow password |
7592
| `tableName` | string | Yes | Table name |
7693
| `sysId` | string | Yes | Record sys_id to update |
7794
| `fields` | json | Yes | Fields to update \(JSON object\) |
@@ -91,8 +108,9 @@ Delete a record from a ServiceNow table
91108

92109
| Parameter | Type | Required | Description |
93110
| --------- | ---- | -------- | ----------- |
94-
| `instanceUrl` | string | No | ServiceNow instance URL \(auto-detected from OAuth if not provided\) |
95-
| `credential` | string | No | ServiceNow OAuth credential ID |
111+
| `instanceUrl` | string | Yes | ServiceNow instance URL \(e.g., https://instance.service-now.com\) |
112+
| `username` | string | Yes | ServiceNow username |
113+
| `password` | string | Yes | ServiceNow password |
96114
| `tableName` | string | Yes | Table name |
97115
| `sysId` | string | Yes | Record sys_id to delete |
98116

apps/sim/app/(landing)/components/footer/consts.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export const FOOTER_TOOLS = [
7070
'Salesforce',
7171
'SendGrid',
7272
'Serper',
73+
'ServiceNow',
7374
'SharePoint',
7475
'Slack',
7576
'Smtp',

apps/sim/app/(landing)/landing.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Suspense } from 'react'
22
import dynamic from 'next/dynamic'
33
import { Background, Footer, Nav, StructuredData } from '@/app/(landing)/components'
44

5-
// Lazy load heavy components for better initial load performance
65
const Hero = dynamic(() => import('@/app/(landing)/components/hero/hero'), {
76
loading: () => <div className='h-[600px] animate-pulse bg-gray-50' />,
87
})

apps/sim/app/api/auth/oauth/utils.ts

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,7 @@ export async function getOAuthToken(userId: string, providerId: string): Promise
132132

133133
try {
134134
// Use the existing refreshOAuthToken function
135-
// For ServiceNow, pass the instance URL (stored in idToken) for the token endpoint
136-
const instanceUrl =
137-
providerId === 'servicenow' ? (credential.idToken ?? undefined) : undefined
138-
const refreshResult = await refreshOAuthToken(
139-
providerId,
140-
credential.refreshToken!,
141-
instanceUrl
142-
)
135+
const refreshResult = await refreshOAuthToken(providerId, credential.refreshToken!)
143136

144137
if (!refreshResult) {
145138
logger.error(`Failed to refresh token for user ${userId}, provider ${providerId}`, {
@@ -222,13 +215,9 @@ export async function refreshAccessTokenIfNeeded(
222215
if (shouldRefresh) {
223216
logger.info(`[${requestId}] Token expired, attempting to refresh for credential`)
224217
try {
225-
// For ServiceNow, pass the instance URL (stored in idToken) for the token endpoint
226-
const instanceUrl =
227-
credential.providerId === 'servicenow' ? (credential.idToken ?? undefined) : undefined
228218
const refreshedToken = await refreshOAuthToken(
229219
credential.providerId,
230-
credential.refreshToken!,
231-
instanceUrl
220+
credential.refreshToken!
232221
)
233222

234223
if (!refreshedToken) {
@@ -300,14 +289,7 @@ export async function refreshTokenIfNeeded(
300289
}
301290

302291
try {
303-
// For ServiceNow, pass the instance URL (stored in idToken) for the token endpoint
304-
const instanceUrl =
305-
credential.providerId === 'servicenow' ? (credential.idToken ?? undefined) : undefined
306-
const refreshResult = await refreshOAuthToken(
307-
credential.providerId,
308-
credential.refreshToken!,
309-
instanceUrl
310-
)
292+
const refreshResult = await refreshOAuthToken(credential.providerId, credential.refreshToken!)
311293

312294
if (!refreshResult) {
313295
logger.error(`[${requestId}] Failed to refresh token for credential`)

0 commit comments

Comments
 (0)